use of com.cloud.storage.command.IntroduceObjectAnswer in project cosmic by MissionCriticalCloud.
the class XenServerStorageProcessor method introduceObject.
@Override
public Answer introduceObject(final IntroduceObjectCmd cmd) {
try {
final Connection conn = hypervisorResource.getConnection();
final DataStoreTO store = cmd.getDataTO().getDataStore();
final SR poolSr = hypervisorResource.getStorageRepository(conn, store.getUuid());
poolSr.scan(conn);
return new IntroduceObjectAnswer(cmd.getDataTO());
} catch (final Exception e) {
s_logger.debug("Failed to introduce object", e);
return new Answer(cmd, false, e.toString());
}
}
use of com.cloud.storage.command.IntroduceObjectAnswer in project cosmic by MissionCriticalCloud.
the class XenServerStorageProcessor method forgetObject.
@Override
public Answer forgetObject(final ForgetObjectCmd cmd) {
try {
final Connection conn = hypervisorResource.getConnection();
final DataTO data = cmd.getDataTO();
final VDI vdi = VDI.getByUuid(conn, data.getPath());
vdi.forget(conn);
return new IntroduceObjectAnswer(cmd.getDataTO());
} catch (final Exception e) {
s_logger.debug("Failed to introduce object", e);
return new Answer(cmd, false, e.toString());
}
}
Aggregations