Skip to content

Commit f8c4121

Browse files
Add access modifiers to VirtualMachineTO (#9277)
Co-authored-by: Fabricio Duarte <[email protected]>
1 parent 6aaaa83 commit f8c4121

File tree

1 file changed

+85
-44
lines changed

1 file changed

+85
-44
lines changed

api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java

Lines changed: 85 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ public class VirtualMachineTO {
3131
private String name;
3232
private BootloaderType bootloader;
3333
private VirtualMachine.State state;
34-
Type type;
35-
int cpus;
34+
private Type type;
35+
private int cpus;
3636

3737
/**
3838
'speed' is still here since 4.0.X/4.1.X management servers do not support
@@ -43,49 +43,50 @@ public class VirtualMachineTO {
4343
So this is here for backwards compatibility with 4.0.X/4.1.X management servers
4444
and newer agents.
4545
*/
46-
Integer speed;
47-
Integer minSpeed;
48-
Integer maxSpeed;
49-
50-
long minRam;
51-
long maxRam;
52-
String hostName;
53-
String arch;
54-
String os;
55-
String platformEmulator;
56-
String bootArgs;
57-
String[] bootupScripts;
58-
boolean enableHA;
59-
boolean limitCpuUse;
60-
boolean enableDynamicallyScaleVm;
46+
private Integer speed;
47+
private Integer minSpeed;
48+
private Integer maxSpeed;
49+
50+
private long minRam;
51+
private long maxRam;
52+
private String hostName;
53+
private String arch;
54+
private String os;
55+
private String platformEmulator;
56+
private String bootArgs;
57+
private String[] bootupScripts;
58+
private boolean enableHA;
59+
private boolean limitCpuUse;
60+
private boolean enableDynamicallyScaleVm;
6161
@LogLevel(LogLevel.Log4jLevel.Off)
62-
String vncPassword;
63-
String vncAddr;
64-
Map<String, String> details;
65-
String uuid;
66-
String bootType;
67-
String bootMode;
68-
boolean enterHardwareSetup;
69-
70-
DiskTO[] disks;
71-
NicTO[] nics;
72-
GPUDeviceTO gpuDevice;
73-
Integer vcpuMaxLimit;
74-
List<String[]> vmData = null;
75-
76-
String configDriveLabel = null;
77-
String configDriveIsoRootFolder = null;
78-
String configDriveIsoFile = null;
79-
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
80-
81-
Double cpuQuotaPercentage = null;
82-
83-
Map<String, String> guestOsDetails = new HashMap<String, String>();
84-
Map<String, String> extraConfig = new HashMap<>();
85-
Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
86-
DeployAsIsInfoTO deployAsIsInfo;
87-
String metadataManufacturer;
88-
String metadataProductName;
62+
private String vncPassword;
63+
private String vncAddr;
64+
private Map<String, String> details;
65+
private Map<String, String> params;
66+
private String uuid;
67+
private String bootType;
68+
private String bootMode;
69+
private boolean enterHardwareSetup;
70+
71+
private DiskTO[] disks;
72+
private NicTO[] nics;
73+
private GPUDeviceTO gpuDevice;
74+
private Integer vcpuMaxLimit;
75+
private List<String[]> vmData = null;
76+
77+
private String configDriveLabel = null;
78+
private String configDriveIsoRootFolder = null;
79+
private String configDriveIsoFile = null;
80+
private NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
81+
82+
private Double cpuQuotaPercentage = null;
83+
84+
private Map<String, String> guestOsDetails = new HashMap<String, String>();
85+
private Map<String, String> extraConfig = new HashMap<>();
86+
private Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
87+
private DeployAsIsInfoTO deployAsIsInfo;
88+
private String metadataManufacturer;
89+
private String metadataProductName;
8990

9091
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
9192
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
@@ -260,6 +261,10 @@ public void setBootupScripts(String[] bootupScripts) {
260261
this.bootupScripts = bootupScripts;
261262
}
262263

264+
public void setEnableHA(boolean enableHA) {
265+
this.enableHA = enableHA;
266+
}
267+
263268
public DiskTO[] getDisks() {
264269
return disks;
265270
}
@@ -435,6 +440,42 @@ public void setDeployAsIsInfo(DeployAsIsInfoTO deployAsIsInfo) {
435440
this.deployAsIsInfo = deployAsIsInfo;
436441
}
437442

443+
public void setSpeed(Integer speed) {
444+
this.speed = speed;
445+
}
446+
447+
public void setMinSpeed(Integer minSpeed) {
448+
this.minSpeed = minSpeed;
449+
}
450+
451+
public void setMaxSpeed(Integer maxSpeed) {
452+
this.maxSpeed = maxSpeed;
453+
}
454+
455+
public void setMinRam(long minRam) {
456+
this.minRam = minRam;
457+
}
458+
459+
public void setMaxRam(long maxRam) {
460+
this.maxRam = maxRam;
461+
}
462+
463+
public void setLimitCpuUse(boolean limitCpuUse) {
464+
this.limitCpuUse = limitCpuUse;
465+
}
466+
467+
public Map<String, String> getParams() {
468+
return params;
469+
}
470+
471+
public void setParams(Map<String, String> params) {
472+
this.params = params;
473+
}
474+
475+
public void setExtraConfig(Map<String, String> extraConfig) {
476+
this.extraConfig = extraConfig;
477+
}
478+
438479
public String getMetadataManufacturer() {
439480
return metadataManufacturer;
440481
}

0 commit comments

Comments
 (0)