Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
k0ka committed Jan 21, 2024
1 parent 3e5073a commit 3b2ec58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions samples/Networking/v2/securityGroupRules/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
'scope' => ['project' => ['id' => '{projectId}']]
]);

/** @var Service $networkingExtSecGroup */
$networkingExtSecGroup = $openstack->networkingV2();
$networking = $openstack->networkingV2();

//List all security group rules
foreach ($networkingExtSecGroup->listSecurityGroupRules() as $rule) {
foreach ($networking->listSecurityGroupRules() as $rule) {
/** @var SecurityGroupRule $rule */
}

/** @var SecurityGroup $securityGroup */
$securityGroup = $networkingExtSecGroup->getSecurityGroup(['id' => '{uuid}']);
$securityGroup = $networking->getSecurityGroup('{uuid}');

//List rules belong to a security group
foreach ($securityGroup->securityGroupRules as $rule) {
Expand Down
2 changes: 1 addition & 1 deletion src/Networking/v2/Extensions/SecurityGroups/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function securityGroupIdJson()
];
}

public function tenantIdJson()
public function tenantIdJson(): array
{
return [
'sentAs' => 'tenant_id',
Expand Down

0 comments on commit 3b2ec58

Please sign in to comment.