use of com.cloud.utils.ReflectionUse in project cloudstack by apache.
the class VirtualMachineManagerImpl method orchestrateReconfigure.
@ReflectionUse
private Pair<JobInfo.Status, String> orchestrateReconfigure(final VmWorkReconfigure work) throws Exception {
final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId());
if (vm == null) {
s_logger.info("Unable to find vm " + work.getVmId());
}
assert vm != null;
final ServiceOffering newServiceOffering = _offeringDao.findById(vm.getId(), work.getNewServiceOfferingId());
reConfigureVm(vm.getUuid(), newServiceOffering, work.isSameHost());
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
}
use of com.cloud.utils.ReflectionUse in project cloudstack by apache.
the class VirtualMachineManagerImpl method orchestrateStorageMigration.
@ReflectionUse
private Pair<JobInfo.Status, String> orchestrateStorageMigration(final VmWorkStorageMigration work) throws Exception {
final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId());
if (vm == null) {
s_logger.info("Unable to find vm " + work.getVmId());
}
assert vm != null;
final StoragePool pool = (PrimaryDataStoreInfo) dataStoreMgr.getPrimaryDataStore(work.getDestStoragePoolId());
orchestrateStorageMigration(vm.getUuid(), pool);
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, null);
}
use of com.cloud.utils.ReflectionUse in project cloudstack by apache.
the class VolumeApiServiceImpl method orchestrateTakeVolumeSnapshot.
@ReflectionUse
private Pair<JobInfo.Status, String> orchestrateTakeVolumeSnapshot(VmWorkTakeVolumeSnapshot work) throws Exception {
Account account = _accountDao.findById(work.getAccountId());
orchestrateTakeVolumeSnapshot(work.getVolumeId(), work.getPolicyId(), work.getSnapshotId(), account, work.isQuiesceVm(), work.getLocationType());
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(work.getSnapshotId()));
}
use of com.cloud.utils.ReflectionUse in project cloudstack by apache.
the class VirtualMachineManagerImpl method orchestrateAddVmToNetwork.
@ReflectionUse
private Pair<JobInfo.Status, String> orchestrateAddVmToNetwork(final VmWorkAddVmToNetwork work) throws Exception {
final VMInstanceVO vm = _entityMgr.findById(VMInstanceVO.class, work.getVmId());
if (vm == null) {
s_logger.info("Unable to find vm " + work.getVmId());
}
assert vm != null;
final Network network = _networkDao.findById(work.getNetworkId());
final NicProfile nic = orchestrateAddVmToNetwork(vm, network, work.getRequestedNicProfile());
return new Pair<JobInfo.Status, String>(JobInfo.Status.SUCCEEDED, _jobMgr.marshallResultObject(nic));
}
Aggregations