File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
tests/OpenCloud/Smoke/Unit Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -272,6 +272,30 @@ protected function testSecurityGroupOperations()
272
272
$ securityGroup = $ this ->getService ()->getSecurityGroup ($ securityGroup ->getId ());
273
273
$ this ->stepInfo ('Security Group ID: ' . $ securityGroup ->getId ());
274
274
$ this ->stepInfo ('Security Group Name: ' . $ securityGroup ->getName ());
275
+
276
+ $ network1 = $ this ->getService ()->createNetwork (array (
277
+ 'name ' => 'test_network_for_test_port_sg '
278
+ ));
279
+ $ this ->cleanupNetworkIds [] = $ network1 ->getId ();
280
+
281
+ $ subnet1 = $ this ->getService ()->createSubnet (array (
282
+ 'cidr ' => '192.165.66.0/25 ' ,
283
+ 'networkId ' => $ network1 ->getId (),
284
+ 'ipVersion ' => 4 ,
285
+ 'name ' => 'test_subnet_for_test_port_sg '
286
+ ));
287
+ $ this ->cleanupSubnetIds [] = $ subnet1 ->getId ();
288
+
289
+ $ port1 = $ this ->getService ()->createPort (array (
290
+ 'networkId ' => $ network1 ->getId (),
291
+ 'name ' => 'test_port_for_test_port_sg '
292
+ ));
293
+ $ this ->cleanupPortIds [] = $ port1 ->getId ();
294
+
295
+ $ this ->step ('Apply security group to port ' );
296
+ $ port1 ->update (array (
297
+ 'securityGroups ' => array ($ securityGroup ->getId ())
298
+ ));
275
299
}
276
300
277
301
protected function testSecurityGroupRuleOperations ()
You can’t perform that action at this time.
0 commit comments