2222TEST_DESCR = "TEST DESCRIPTION"
2323
2424
25- def setup_device_group_test (request , mgmt_root , name , partition ):
25+ def setup_device_group_test (request , mgmt_root , name ):
2626 def teardown ():
2727 try :
2828 for d in dg .devices_s .get_collection ():
@@ -34,21 +34,20 @@ def teardown():
3434 request .addfinalizer (teardown )
3535
3636 dgs = mgmt_root .tm .cm .device_groups
37- dg = dgs .device_group .create (name = name , partition = partition )
37+ dg = dgs .device_group .create (name = name )
3838 return dg , dgs
3939
4040
4141class TestDeviceGroup (object ):
4242 def test_device_group_CURDL (self , request , mgmt_root ):
4343 # Create and delete are taken care of by setup
4444 dg1 , dgs = setup_device_group_test (
45- request , mgmt_root , name = 'test-device-group' , partition = 'Common' )
45+ request , mgmt_root , name = 'test-device-group' )
4646 assert dg1 .generation > 0
4747 assert dg1 .name == 'test-device-group'
4848
4949 # Load
50- dg2 = mgmt_root .tm .cm .device_groups .device_group .load (
51- name = dg1 .name , partition = dg1 .partition )
50+ dg2 = mgmt_root .tm .cm .device_groups .device_group .load (name = dg1 .name )
5251 assert dg1 .generation == dg2 .generation
5352
5453 # Update
@@ -63,20 +62,20 @@ def test_device_group_CURDL(self, request, mgmt_root):
6362
6463 def test_add_device (self , request , mgmt_root ):
6564 dg1 , dgs = setup_device_group_test (
66- request , mgmt_root , name = 'test-device-group' , partition = 'Common' )
65+ request , mgmt_root , name = 'test-device-group' )
6766 devices = mgmt_root .tm .cm .devices .get_collection ()
6867 this_device = devices [0 ]
6968 assert this_device .selfDevice == 'true'
7069 d1 = dg1 .devices_s .devices .create (
71- name = this_device .name , partition = this_device . partition )
70+ name = this_device .name )
7271 assert len (dg1 .devices_s .get_collection ()) == 1
7372 # This needs to be in this format due to the change between
7473 # 11.6.0 Final and other versions.
7574 assert this_device .name in d1 .name
7675
7776 def test_cm_sync_to_group (self , request , mgmt_root ):
7877 dg1 , dgs = setup_device_group_test (
79- request , mgmt_root , name = 'test-device-group' , partition = 'Common' )
78+ request , mgmt_root , name = 'test-device-group' )
8079 sync_cmd = 'config-sync to-group %s' % dg1 .name
8180 cm_obj = mgmt_root .tm .cm .exec_cmd ('run' , utilCmdArgs = sync_cmd )
8281 assert cm_obj .utilCmdArgs == sync_cmd
@@ -88,7 +87,7 @@ def test_cm_sync_to_group(self, request, mgmt_root):
8887 reason = 'Skip test if on a version greater than or equal to 11.6.1' )
8988 def test_cm_sync_from_group_pre_12_0 (self , request , mgmt_root ):
9089 dg1 , dgs = setup_device_group_test (
91- request , mgmt_root , name = 'test-device-group' , partition = 'Common' )
90+ request , mgmt_root , name = 'test-device-group' )
9291 sync_cmd = 'config-sync from-group %s' % dg1 .name
9392 cm_obj = mgmt_root .tm .cm .exec_cmd ('run' , utilCmdArgs = sync_cmd )
9493 assert cm_obj .utilCmdArgs == sync_cmd
@@ -100,7 +99,7 @@ def test_cm_sync_from_group_pre_12_0(self, request, mgmt_root):
10099 reason = 'Skip test if on a version earlier than 12.0.0' )
101100 def test_cm_sync_from_group_post_11_6 (self , request , mgmt_root ):
102101 dg1 , dgs = setup_device_group_test (
103- request , mgmt_root , name = 'test-device-group' , partition = 'Common' )
102+ request , mgmt_root , name = 'test-device-group' )
104103 with pytest .raises (iControlUnexpectedHTTPError ) as err :
105104 sync_cmd = 'config-sync from-group %s' % dg1 .name
106105 mgmt_root .tm .cm .exec_cmd ('run' , utilCmdArgs = sync_cmd )
0 commit comments