@@ -49,6 +49,7 @@ class TestCreateSecurityGroupNetwork(TestSecurityGroupNetwork):
4949 'name' ,
5050 'project_id' ,
5151 'rules' ,
52+ 'stateful' ,
5253 'tags' ,
5354 )
5455
@@ -58,6 +59,7 @@ class TestCreateSecurityGroupNetwork(TestSecurityGroupNetwork):
5859 _security_group .name ,
5960 _security_group .project_id ,
6061 security_group .NetworkSecurityGroupRulesColumn ([]),
62+ _security_group .stateful ,
6163 _security_group .tags ,
6264 )
6365
@@ -101,20 +103,23 @@ def test_create_all_options(self):
101103 '--description' , self ._security_group .description ,
102104 '--project' , self .project .name ,
103105 '--project-domain' , self .domain .name ,
106+ '--stateful' ,
104107 self ._security_group .name ,
105108 ]
106109 verifylist = [
107110 ('description' , self ._security_group .description ),
108111 ('name' , self ._security_group .name ),
109112 ('project' , self .project .name ),
110113 ('project_domain' , self .domain .name ),
114+ ('stateful' , self ._security_group .stateful ),
111115 ]
112116 parsed_args = self .check_parser (self .cmd , arglist , verifylist )
113117
114118 columns , data = self .cmd .take_action (parsed_args )
115119
116120 self .network .create_security_group .assert_called_once_with (** {
117121 'description' : self ._security_group .description ,
122+ 'stateful' : self ._security_group .stateful ,
118123 'name' : self ._security_group .name ,
119124 'tenant_id' : self .project .id ,
120125 })
@@ -421,11 +426,13 @@ def test_set_all_options(self):
421426 arglist = [
422427 '--name' , new_name ,
423428 '--description' , new_description ,
429+ '--stateful' ,
424430 self ._security_group .name ,
425431 ]
426432 verifylist = [
427433 ('description' , new_description ),
428434 ('group' , self ._security_group .name ),
435+ ('stateful' , self ._security_group .stateful ),
429436 ('name' , new_name ),
430437 ]
431438
@@ -435,6 +442,7 @@ def test_set_all_options(self):
435442 attrs = {
436443 'description' : new_description ,
437444 'name' : new_name ,
445+ 'stateful' : True ,
438446 }
439447 self .network .update_security_group .assert_called_once_with (
440448 self ._security_group ,
@@ -489,6 +497,7 @@ class TestShowSecurityGroupNetwork(TestSecurityGroupNetwork):
489497 'name' ,
490498 'project_id' ,
491499 'rules' ,
500+ 'stateful' ,
492501 'tags' ,
493502 )
494503
@@ -499,6 +508,7 @@ class TestShowSecurityGroupNetwork(TestSecurityGroupNetwork):
499508 _security_group .project_id ,
500509 security_group .NetworkSecurityGroupRulesColumn (
501510 [_security_group_rule ._info ]),
511+ _security_group .stateful ,
502512 _security_group .tags ,
503513 )
504514
0 commit comments