def test_sync_group_already_promoted(self):
     mg1 = VNXMirrorGroup.get(t_cli(), name='mg_promote_on_primary')
     assert_that(mg1.sync_group, raises(VNXMirrorGroupAlreadyPromotedError))
 def test_promote_group(self):
     mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg2')
     mg1.promote_group()
 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_create(self):
     mg = VNXMirrorGroupAsync.create(t_cli(), name='test_group')
     assert_that(mg, instance_of(VNXMirrorGroupAsync))
 def test_create_and_add(self):
     mirror = VNXMirrorViewAsync.get(t_cli(), name='testdr_004')
     mg = VNXMirrorGroupAsync.create(t_cli(),
                                     name='petermg1',
                                     mirror=mirror)
     assert_that(mg, instance_of(VNXMirrorGroupAsync))
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.promote_image()
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.delete()
 def test_get_all(self):
     mv_list = VNXMirrorView.get(t_cli())
     assert_that(len(mv_list), equal_to(4))
 def test_add_image_success(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.add_image('192.168.1.94', 71)
     assert_that(len(mv.images), equal_to(2))
Exemplo n.º 10
0
 def f():
     VNXMirrorViewAsync.create(t_cli(), 'mv0', 244)
Exemplo n.º 11
0
 def f():
     VNXMirrorViewAsync.create(t_cli(), 'testdr_003', 72)
Exemplo n.º 12
0
 def test_create_success(self):
     mv = VNXMirrorViewAsync.create(t_cli(), 'testdr_003', 71)
     assert_that(mv.name, equal_to('testdr_003'))
Exemplo n.º 13
0
 def test_image_properties(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_001')
     assert_that(mv.is_primary, equal_to(True))
     assert_that(mv.primary_image.is_primary, equal_to(True))
     assert_that(mv.secondary_image.is_primary, equal_to(False))
Exemplo n.º 14
0
 def test_delete_group(self):
     mg1 = VNXMirrorGroup.get(t_cli(), name='petermg')
     mg1.delete()
Exemplo n.º 15
0
 def test_fracture_image_success(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     # no error raised
     mv.fracture_image()
Exemplo n.º 16
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.add_image('192.168.1.94', 72)
Exemplo n.º 17
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.promote_image('50:06:01:60:88:60:05:FF')
Exemplo n.º 18
0
 def test_get_image_found(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_004')
     image = mv.get_image('50:06:01:60:B6:60:23:7E')
     assert_that(image.state, equal_to(VNXMirrorImageState.SYNCHRONIZED))
Exemplo n.º 19
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'mv8')
     mv.delete()
Exemplo n.º 20
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_004')
     mv.remove_image('50:06:01:60:88:60:05:FF')
Exemplo n.º 21
0
 def test_force_delete_mirror_has_secondary(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_006')
     # no error raised
     mv.delete(force=True)
Exemplo n.º 22
0
 def test_remove_image_success(self):
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_004')
     # no error raised
     mv.remove_image()
Exemplo n.º 23
0
 def _inner():
     VNXMirrorGroupAsync.create(t_cli(), name='test_group_in_use')
Exemplo n.º 24
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_003')
     mv.remove_image()
Exemplo n.º 25
0
 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))
Exemplo n.º 26
0
    def test_mirror_view_not_installed(self):
        mv_list = VNXMirrorView.get(t_cli())
        assert_that(len(mv_list), equal_to(0))

        mv = VNXMirrorView.get(t_cli(), 'mv_sync_2')
        assert_that(mv.existed, equal_to(False))
Exemplo n.º 27
0
 def test_fracture_group(self):
     mg1 = VNXMirrorGroupAsync.get(t_cli(), name='petermg1')
     mg1.fracture_group()
Exemplo n.º 28
0
 def f():
     mv = VNXMirrorViewAsync.get(t_cli(), 'testdr_005')
     mv.fracture_image('50:06:01:60:B6:60:23:8F')
Exemplo n.º 29
0
 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)
Exemplo n.º 30
0
 def test_sync_group(self):
     mg1 = VNXMirrorGroup.get(t_cli(), name='petermg')
     mg1.sync_group()