Beispiel #1
0
    def test_migration_on_error(self):
        c = _Counter()

        def on_error():
            c.decrease()

        l0 = VNXLun(name='lun0', cli=t_cli())
        l2 = VNXLun(name='lun2', cli=t_cli())
        l2.migrate(l0, on_error=on_error).join()
        assert_that(c.x, equal_to(-1))
Beispiel #2
0
    def test_migration_on_complete_session_not_found(self):
        c = _Counter()

        def on_complete():
            c.increase()

        l0 = VNXLun(name='lun0', cli=t_cli())
        l1 = VNXLun(name='lun1', cli=t_cli())
        l0.migrate(l1, on_complete=on_complete).join()
        assert_that(c.x, equal_to(1))
Beispiel #3
0
 def f():
     l1 = VNXLun(lun_id=1, cli=t_cli())
     l2 = VNXLun(lun_id=2, cli=t_cli())
     l1.migrate(l2)
Beispiel #4
0
 def f():
     l1 = VNXLun(lun_id=1, cli=t_cli())
     l2 = VNXLun(lun_id=2, cli=t_cli())
     l1.migrate(l2)