sureshanaparti commented on a change in pull request #5008:
URL: https://github.com/apache/cloudstack/pull/5008#discussion_r655374654
##########
File path:
api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java
##########
@@ -239,6 +239,10 @@
description = "true if virtual machine needs to be dynamically
scalable")
protected Boolean dynamicScalingEnabled;
+ @Parameter(name = ApiConstants.OVERRIDE_DISK_OFFERING_ID, type =
CommandType.UUID, entityType = DiskOfferingResponse.class, description = "the
ID of the disk offering for the virtual machine to be used for root volume
instead of the disk offering mapped in service offering." +
+ "In case of virtual machine deploying from ISO, then the
diskofferingid specified for root volume is ignored and uses this override disk
offering id")
Review comment:
@harikrishna-patnala Add `since` attribute to this parameter
##########
File path:
api/src/main/java/org/apache/cloudstack/api/response/DiskOfferingResponse.java
##########
@@ -155,6 +155,10 @@
@Param(description = "the vsphere storage policy tagged to the disk
offering in case of VMware", since = "4.15")
private String vsphereStoragePolicy;
+ @SerializedName("disksizestrictness")
Review comment:
```suggestion
@SerializedName("ApiConstants.DISK_SIZE_STRICTNESS")
```
Can use the defined constant.
##########
File path: engine/schema/src/main/java/com/cloud/service/ServiceOfferingVO.java
##########
@@ -103,11 +146,16 @@ public ServiceOfferingVO(String name, Integer cpu,
Integer ramSize, Integer spee
volatileVm = false;
this.defaultUse = defaultUse;
this.vmType = vmType == null ? null : vmType.toString().toLowerCase();
+ uuid = UUID.randomUUID().toString();
+ this.systemUse = systemUse;
+ this.name = name;
+ this.displayText = displayText;
}
- public ServiceOfferingVO(String name, Integer cpu, Integer ramSize,
Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA,
boolean limitCpuUse,
- boolean volatileVm, String displayText,
ProvisioningType provisioningType, boolean useLocalStorage, boolean
recreatable, String tags, boolean systemUse, VirtualMachine.Type vmType) {
- super(name, displayText, provisioningType, false, tags, recreatable,
useLocalStorage, systemUse, true);
+ public ServiceOfferingVO(String name, Integer cpu, Integer ramSize,
Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA,
+ boolean limitResourceUse, boolean volatileVm,
String displayText, ProvisioningType provisioningType, boolean useLocalStorage,
boolean recreatable, String tags, boolean systemUse,
+ VirtualMachine.Type vmType, String hostTag,
String deploymentPlanner) {
+ //super(name, displayText, provisioningType, false, tags, recreatable,
useLocalStorage, systemUse, true);
Review comment:
+1
##########
File path: server/src/main/java/com/cloud/server/ConfigurationServerImpl.java
##########
@@ -926,16 +926,21 @@ private DiskOfferingVO createDefaultDiskOffering(String
name, String description
newDiskOffering.setUniqueName("Cloud.Com-" + name);
// leaving the above reference to cloud.com in as it is an identifyer
and has no real world relevance
newDiskOffering.setSystemUse(isSystemUse);
- newDiskOffering =
_diskOfferingDao.persistDeafultDiskOffering(newDiskOffering);
+ newDiskOffering =
_diskOfferingDao.persistDefaultDiskOffering(newDiskOffering);
return newDiskOffering;
}
private ServiceOfferingVO createServiceOffering(long userId, String name,
int cpu, int ramSize, int speed, String displayText,
ProvisioningType provisioningType, boolean localStorageRequired,
boolean offerHA, String tags) {
tags = cleanupTags(tags);
+ DiskOfferingVO diskOfferingVO = new DiskOfferingVO(name, displayText,
provisioningType, false, tags, false, false, false, true);
+ diskOfferingVO.setUniqueName("Cloud.Com-" + name);
Review comment:
is this prefix "Cloud.Com-" required or offerings ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]