@Override public void afterChangePrimaryStorageState(PrimaryStorageInventory inv, PrimaryStorageStateEvent evt, PrimaryStorageState previousState) { if (!isLocal(inv)) { return; } if (PrimaryStorageState.Enabled.equals(PrimaryStorageState.valueOf(inv.getState()))) { LocalStorageFactory.type.setSupportVolumeMigrationInCurrentPrimaryStorage(true); } else { LocalStorageFactory.type.setSupportVolumeMigrationInCurrentPrimaryStorage(false); } } }