stephankruggg commented on code in PR #7063:
URL: https://github.com/apache/cloudstack/pull/7063#discussion_r1064595901
##########
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java:
##########
@@ -3741,6 +3741,10 @@ public void checkIfCanUpgrade(final VirtualMachine
vmInstance, final ServiceOffe
throw new InvalidParameterValueException("Invalid parameter,
newServiceOffering can't be null");
}
+ if
(ServiceOffering.State.Inactive.equals(newServiceOffering.getState())) {
+ throw new InvalidParameterValueException("New service offering is
Inactive: " + newServiceOffering.getUuid());
Review Comment:
```suggestion
throw new InvalidParameterValueException(String.format("New
service offering is inactive: [%s].", newServiceOffering.getUuid()));
```
##########
server/src/main/java/com/cloud/vm/UserVmManagerImpl.java:
##########
@@ -5663,6 +5663,10 @@ public UserVm createVirtualMachine(DeployVMCmd cmd)
throws InsufficientCapacityE
throw new InvalidParameterValueException("Unable to find service
offering: " + serviceOfferingId);
}
+ if (ServiceOffering.State.Inactive.equals(serviceOffering.getState()))
{
+ throw new InvalidParameterValueException("service offering is
Inactive: " + serviceOffering.getUuid());
Review Comment:
```suggestion
throw new InvalidParameterValueException(String.format("Service
offering is inactive: [%s].", serviceOffering.getUuid()));
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]