File tree Expand file tree Collapse file tree 3 files changed +63
-0
lines changed
samples/networking/v2ext/security_group Expand file tree Collapse file tree 3 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 26
26
'description ' => 'Foo Barrr '
27
27
]);
28
28
29
+
30
+ $ networkingExtSecGroup ->listSecurityGroups ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use OpenStack \Networking \v2 \Extensions \SecurityGroups \Models \SecurityGroup ;
4
+
5
+ require 'vendor/autoload.php ' ;
6
+
7
+ $ openstack = new OpenStack \OpenStack ([
8
+ 'authUrl ' => '{authUrl} ' ,
9
+ 'region ' => '{region} ' ,
10
+ 'user ' => [
11
+ 'id ' => '{userId} ' ,
12
+ 'password ' => '{password} '
13
+ ],
14
+ 'scope ' => [
15
+ 'project ' => [
16
+ 'id ' => '{projectId} '
17
+ ]
18
+ ]
19
+ ]);
20
+
21
+ $ networkingExtSecGroup = $ openstack ->networkingV2ExtSecGroups ();
22
+
23
+ foreach ($ networkingExtSecGroup ->listSecurityGroups () as $ group )
24
+ {
25
+
26
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use OpenStack \Networking \v2 \Extensions \SecurityGroups \Models \SecurityGroup ;
4
+
5
+ require 'vendor/autoload.php ' ;
6
+
7
+ $ openstack = new OpenStack \OpenStack ([
8
+ 'authUrl ' => '{authUrl} ' ,
9
+ 'region ' => '{region} ' ,
10
+ 'user ' => [
11
+ 'id ' => '{userId} ' ,
12
+ 'password ' => '{password} '
13
+ ],
14
+ 'scope ' => [
15
+ 'project ' => [
16
+ 'id ' => '{projectId} '
17
+ ]
18
+ ]
19
+ ]);
20
+
21
+ $ networkingExtSecGroup = $ openstack ->networkingV2ExtSecGroups ();
22
+
23
+ //List rules belong to a security group
24
+ $ securityGroup = $ networkingExtSecGroup ->getSecurityGroup (['id ' => '{uuid} ' ]);
25
+ foreach ($ securityGroup ->securityGroupRules as $ rule )
26
+ {
27
+
28
+ }
29
+
30
+
31
+ //All rules
32
+ foreach ($ networkingExtSecGroup ->listSecurityGroupRules () as $ group )
33
+ {
34
+
35
+ }
You can’t perform that action at this time.
0 commit comments