def test_migrate_deduplicated_lun_success(self): with mock.patch.object(UnitySystem, 'model', create=True, return_value='Unity 650F', new_callable=mock.PropertyMock): lun = UnityLun('sv_5620', cli=t_rest('4.5')) dest_pool = UnityPool('pool_5', cli=t_rest('4.5')) r = lun.migrate(dest_pool) assert_that(r, equal_to(True))
def test_migrate_lun_source_deduplicated_dest_thin(self): lun = UnityLun('sv_5621', cli=t_rest('4.5')) dest_pool = UnityPool('pool_5', cli=t_rest('4.5')) # If dest LUN is not compressed (is_compressed == False), # is_advanced_dedup_enabled parameter will be changed to # False in lun.migrate() r = lun.migrate(dest_pool, is_thin=True, is_compressed=False, is_advanced_dedup_enabled=True) assert_that(r, equal_to(True))
def test_migrate_lun_source_thin_dest_thick(self): lun = UnityLun('sv_2', cli=t_rest()) dest_pool = UnityPool('pool_4', cli=t_rest()) # If dest LUN is thick (is_thin == False), is_compressed and # is_advanced_dedup_enabled parameters will be changed to # False in lun.migrate() r = lun.migrate(dest_pool, is_thin=False, is_compressed=True, is_advanced_dedup_enabled=True) assert_that(r, equal_to(True))
def test_migrate_lun_cancelled(self): lun = UnityLun('sv_2', cli=t_rest()) dest_pool = UnityPool('pool_8', cli=t_rest()) r = lun.migrate(dest_pool) assert_that(r, equal_to(False))
def test_migrate_lun_has_thin_clone(self): lun = UnityLun('sv_2', cli=t_rest()) dest_pool = UnityPool('pool_6', cli=t_rest()) r = lun.migrate(dest_pool) assert_that(r, equal_to(False))
def test_migrate_lun_source_compressed_dest_not_flash(self): lun = UnityLun('sv_18', cli=t_rest()) dest_pool = UnityPool('pool_4', cli=t_rest()) r = lun.migrate(dest_pool) assert_that(r, equal_to(False))
def test_migrate_compressed_lun_success(self): lun = UnityLun('sv_18', cli=t_rest()) dest_pool = UnityPool('pool_5', cli=t_rest()) r = lun.migrate(dest_pool) assert_that(r, equal_to(True))
def test_migrate_lun_source_deduplicated_dest_not_supported(self): lun = UnityLun('sv_5620', cli=t_rest()) dest_pool = UnityPool('pool_5', cli=t_rest()) r = lun.migrate(dest_pool) assert_that(r, equal_to(False))