mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Fix tab and trailing spaces
This commit is contained in:
parent
9d3827e6fe
commit
719271b1d9
@ -41,7 +41,8 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
|
|||||||
public static final String VM_WORK_JOB_WAKEUP_DISPATCHER = "VmWorkJobWakeupDispatcher";
|
public static final String VM_WORK_JOB_WAKEUP_DISPATCHER = "VmWorkJobWakeupDispatcher";
|
||||||
|
|
||||||
@Inject private VirtualMachineManagerImpl _vmMgr;
|
@Inject private VirtualMachineManagerImpl _vmMgr;
|
||||||
@Inject private AsyncJobManager _asyncJobMgr;
|
@Inject
|
||||||
|
private AsyncJobManager _asyncJobMgr;
|
||||||
@Inject private VMInstanceDao _instanceDao;
|
@Inject private VMInstanceDao _instanceDao;
|
||||||
|
|
||||||
private Map<String, VmWorkJobHandler> _handlers;
|
private Map<String, VmWorkJobHandler> _handlers;
|
||||||
|
|||||||
@ -56,11 +56,11 @@ public class VmWorkStart extends VmWork {
|
|||||||
|
|
||||||
public DeploymentPlan getPlan() {
|
public DeploymentPlan getPlan() {
|
||||||
|
|
||||||
if(podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) {
|
if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) {
|
||||||
// this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely
|
// this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely
|
||||||
// this has to be refactored together with migrating legacy code into the new way
|
// this has to be refactored together with migrating legacy code into the new way
|
||||||
ReservationContext context = null;
|
ReservationContext context = null;
|
||||||
if(reservationId != null) {
|
if (reservationId != null) {
|
||||||
Journal journal = new Journal.LogJournal("VmWorkStart", s_logger);
|
Journal journal = new Journal.LogJournal("VmWorkStart", s_logger);
|
||||||
context = new ReservationContextImpl(reservationId, journal,
|
context = new ReservationContextImpl(reservationId, journal,
|
||||||
CallContext.current().getCallingUser(),
|
CallContext.current().getCallingUser(),
|
||||||
@ -77,7 +77,7 @@ public class VmWorkStart extends VmWork {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setPlan(DeploymentPlan plan) {
|
public void setPlan(DeploymentPlan plan) {
|
||||||
if(plan != null) {
|
if (plan != null) {
|
||||||
dcId = plan.getDataCenterId();
|
dcId = plan.getDataCenterId();
|
||||||
podId = plan.getPodId();
|
podId = plan.getPodId();
|
||||||
clusterId = plan.getClusterId();
|
clusterId = plan.getClusterId();
|
||||||
@ -86,7 +86,7 @@ public class VmWorkStart extends VmWork {
|
|||||||
physicalNetworkId = plan.getPhysicalNetworkId();
|
physicalNetworkId = plan.getPhysicalNetworkId();
|
||||||
avoids = plan.getAvoids();
|
avoids = plan.getAvoids();
|
||||||
|
|
||||||
if(plan.getReservationContext() != null)
|
if (plan.getReservationContext() != null)
|
||||||
reservationId = plan.getReservationContext().getReservationId();
|
reservationId = plan.getReservationContext().getReservationId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -102,8 +102,8 @@ public class VmWorkStart extends VmWork {
|
|||||||
public Map<VirtualMachineProfile.Param, Object> getParams() {
|
public Map<VirtualMachineProfile.Param, Object> getParams() {
|
||||||
Map<VirtualMachineProfile.Param, Object> map = new HashMap<VirtualMachineProfile.Param, Object>();
|
Map<VirtualMachineProfile.Param, Object> map = new HashMap<VirtualMachineProfile.Param, Object>();
|
||||||
|
|
||||||
if(rawParams != null) {
|
if (rawParams != null) {
|
||||||
for(Map.Entry<String, String> entry : rawParams.entrySet()) {
|
for (Map.Entry<String, String> entry : rawParams.entrySet()) {
|
||||||
VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey());
|
VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey());
|
||||||
Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue());
|
Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue());
|
||||||
map.put(key, val);
|
map.put(key, val);
|
||||||
@ -114,9 +114,9 @@ public class VmWorkStart extends VmWork {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setParams(Map<VirtualMachineProfile.Param, Object> params) {
|
public void setParams(Map<VirtualMachineProfile.Param, Object> params) {
|
||||||
if(params != null) {
|
if (params != null) {
|
||||||
rawParams = new HashMap<String, String>();
|
rawParams = new HashMap<String, String>();
|
||||||
for(Map.Entry<VirtualMachineProfile.Param, Object> entry : params.entrySet()) {
|
for (Map.Entry<VirtualMachineProfile.Param, Object> entry : params.entrySet()) {
|
||||||
rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString(
|
rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString(
|
||||||
entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString()));
|
entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString()));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user