def test_remove_from_group_already_removed(self): mirror = VNXMirrorGroupAsync.get(t_cli(), name='testdr_003') mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1') def _inner(): mg1.remove_mirror(mirror) assert_that(_inner, raises(VNXMirrorGroupMirrorNotMemberError))
def test_delete_non_empty_group(self): mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg') def _inner(): mg1.delete() assert_that(_inner, raises(VNXMirrorException, 'still has members'))
def test_add_to_group_existed(self): mirror = VNXMirrorViewAsync.get(t_cli(), name='testdr_004') mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1') def _inner(): mg1.add_mirror(mirror) assert_that(_inner, raises(VNXMirrorGroupAlreadyMemberError))
def test_get_single(self): mg = VNXMirrorGroupAsync.get(t_cli(), name='petermg') assert_that(mg, instance_of(VNXMirrorGroupAsync)) assert_that(mg.name, equal_to('petermg')) assert_that(mg.gid, equal_to('50:06:01:60:B6:60:23:8F:03:00:00:00')) assert_that(mg.description, equal_to('')) assert_that(mg.state, equal_to('Synchronized')) assert_that(mg.role, equal_to('Primary')) assert_that(mg.condition, equal_to('Normal')) assert_that(mg.policy, equal_to(VNXMirrorGroupRecoveryPolicy.AUTO))
def test_delete_group(self): mg1 = VNXMirrorGroupAsync.get(t_cli(), name='test_group') mg1.delete()
def test_sync_group(self): mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg') mg1.sync_group()
def test_remove_from_group(self): mirror = VNXMirrorGroupAsync.get(t_cli(), name='testdr_004') mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1') mg1.remove_mirror(mirror)
def test_add_to_group(self): mirror = VNXMirrorViewAsync.get(t_cli(), name='testdr_004') mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1') mg1.add_mirror(mirror)
def test_fracture_group(self): mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1') mg1.fracture_group()
def test_promote_group(self): mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg2') mg1.promote_group()
def test_get_all(self): mg_list = VNXMirrorGroupAsync.get(t_cli()) assert_that(len(mg_list), equal_to(2)) assert_that(mg_list, instance_of(VNXMirrorGroupAsyncList))
def get_mirror_group_async(self, name=None): return VNXMirrorGroupAsync.get(self._cli, name)