Add access modifiers to VirtualMachineTO (#9277)

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
This commit is contained in:
Felipe 2025-06-17 03:35:04 -03:00 committed by GitHub
parent 6aaaa838b2
commit f8c4121ea3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,8 +31,8 @@ public class VirtualMachineTO {
private String name; private String name;
private BootloaderType bootloader; private BootloaderType bootloader;
private VirtualMachine.State state; private VirtualMachine.State state;
Type type; private Type type;
int cpus; private int cpus;
/** /**
'speed' is still here since 4.0.X/4.1.X management servers do not support 'speed' is still here since 4.0.X/4.1.X management servers do not support
@ -43,49 +43,50 @@ public class VirtualMachineTO {
So this is here for backwards compatibility with 4.0.X/4.1.X management servers So this is here for backwards compatibility with 4.0.X/4.1.X management servers
and newer agents. and newer agents.
*/ */
Integer speed; private Integer speed;
Integer minSpeed; private Integer minSpeed;
Integer maxSpeed; private Integer maxSpeed;
long minRam; private long minRam;
long maxRam; private long maxRam;
String hostName; private String hostName;
String arch; private String arch;
String os; private String os;
String platformEmulator; private String platformEmulator;
String bootArgs; private String bootArgs;
String[] bootupScripts; private String[] bootupScripts;
boolean enableHA; private boolean enableHA;
boolean limitCpuUse; private boolean limitCpuUse;
boolean enableDynamicallyScaleVm; private boolean enableDynamicallyScaleVm;
@LogLevel(LogLevel.Log4jLevel.Off) @LogLevel(LogLevel.Log4jLevel.Off)
String vncPassword; private String vncPassword;
String vncAddr; private String vncAddr;
Map<String, String> details; private Map<String, String> details;
String uuid; private Map<String, String> params;
String bootType; private String uuid;
String bootMode; private String bootType;
boolean enterHardwareSetup; private String bootMode;
private boolean enterHardwareSetup;
DiskTO[] disks; private DiskTO[] disks;
NicTO[] nics; private NicTO[] nics;
GPUDeviceTO gpuDevice; private GPUDeviceTO gpuDevice;
Integer vcpuMaxLimit; private Integer vcpuMaxLimit;
List<String[]> vmData = null; private List<String[]> vmData = null;
String configDriveLabel = null; private String configDriveLabel = null;
String configDriveIsoRootFolder = null; private String configDriveIsoRootFolder = null;
String configDriveIsoFile = null; private String configDriveIsoFile = null;
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY; private NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
Double cpuQuotaPercentage = null; private Double cpuQuotaPercentage = null;
Map<String, String> guestOsDetails = new HashMap<String, String>(); private Map<String, String> guestOsDetails = new HashMap<String, String>();
Map<String, String> extraConfig = new HashMap<>(); private Map<String, String> extraConfig = new HashMap<>();
Map<Long, String> networkIdToNetworkNameMap = new HashMap<>(); private Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
DeployAsIsInfoTO deployAsIsInfo; private DeployAsIsInfoTO deployAsIsInfo;
String metadataManufacturer; private String metadataManufacturer;
String metadataProductName; private String metadataProductName;
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) { String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
@ -260,6 +261,10 @@ public class VirtualMachineTO {
this.bootupScripts = bootupScripts; this.bootupScripts = bootupScripts;
} }
public void setEnableHA(boolean enableHA) {
this.enableHA = enableHA;
}
public DiskTO[] getDisks() { public DiskTO[] getDisks() {
return disks; return disks;
} }
@ -435,6 +440,42 @@ public class VirtualMachineTO {
this.deployAsIsInfo = deployAsIsInfo; this.deployAsIsInfo = deployAsIsInfo;
} }
public void setSpeed(Integer speed) {
this.speed = speed;
}
public void setMinSpeed(Integer minSpeed) {
this.minSpeed = minSpeed;
}
public void setMaxSpeed(Integer maxSpeed) {
this.maxSpeed = maxSpeed;
}
public void setMinRam(long minRam) {
this.minRam = minRam;
}
public void setMaxRam(long maxRam) {
this.maxRam = maxRam;
}
public void setLimitCpuUse(boolean limitCpuUse) {
this.limitCpuUse = limitCpuUse;
}
public Map<String, String> getParams() {
return params;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
public void setExtraConfig(Map<String, String> extraConfig) {
this.extraConfig = extraConfig;
}
public String getMetadataManufacturer() { public String getMetadataManufacturer() {
return metadataManufacturer; return metadataManufacturer;
} }