File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
src/Networking/v2/Extensions/SecurityGroups Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,10 @@ public function getSecurityGroups()
2424 return [
2525 'method ' => 'GET ' ,
2626 'path ' => $ this ->pathPrefix .'/security-groups ' ,
27- 'params ' => [],
27+ 'params ' => [
28+ 'tenantId ' => $ this ->params ->queryTenantId (),
29+ 'name ' => $ this ->params ->filterName (),
30+ ],
2831 ];
2932 }
3033
Original file line number Diff line number Diff line change @@ -89,4 +89,13 @@ public function tenantIdJson()
8989 'description ' => 'The UUID of the tenant who owns the security group rule. Only administrative users can specify a tenant UUID other than their own. ' ,
9090 ];
9191 }
92+
93+ public function filterName (): array
94+ {
95+ return [
96+ 'description ' => sprintf ('Filter the list result by the human-readable name of the resource ' ),
97+ 'type ' => self ::STRING_TYPE ,
98+ 'location ' => self ::QUERY ,
99+ ];
100+ }
92101}
Original file line number Diff line number Diff line change @@ -22,11 +22,13 @@ private function securityGroupRule(array $info = []): SecurityGroupRule
2222 }
2323
2424 /**
25+ * @param array $options
26+ *
2527 * @return \Generator
2628 */
27- public function listSecurityGroups (): \Generator
29+ public function listSecurityGroups (array $ options = [] ): \Generator
2830 {
29- return $ this ->securityGroup ()->enumerate ($ this ->api ->getSecurityGroups ());
31+ return $ this ->securityGroup ()->enumerate ($ this ->api ->getSecurityGroups (), $ options );
3032 }
3133
3234 /**
You can’t perform that action at this time.
0 commit comments