@@ -3139,8 +3139,8 @@ public UserVm updateVirtualMachine(long id, String displayName, String group, Bo
31393139 boolean isVMware = (vm .getHypervisorType () == HypervisorType .VMware );
31403140
31413141 if (securityGroupIdList != null && isVMware ) {
3142- throw new InvalidParameterValueException ("Security group feature is not supported for vmWare hypervisor" );
3143- } else if (securityGroupIdList != null ){
3142+ throw new InvalidParameterValueException ("Security group feature is not supported for VMware hypervisor" );
3143+ } else if (securityGroupIdList != null ) {
31443144 DataCenterVO zone = _dcDao .findById (vm .getDataCenterId ());
31453145 List <Long > networkIds = new ArrayList <>();
31463146 try {
@@ -3187,7 +3187,7 @@ private void updateSecurityGroup(UserVmVO vm, List<Long> securityGroupIdList) {
31873187 // Add instance in provided groups
31883188 _securityGroupMgr .addInstanceToGroups (vm , securityGroupIdList );
31893189 } else {
3190- throw new InvalidParameterValueException ("Virtual machine must be stopped prior to update security groups " );
3190+ throw new InvalidParameterValueException (String . format ( "VM %s must be stopped prior to update security groups" , vm . getUuid ()) );
31913191 }
31923192 }
31933193
@@ -3698,7 +3698,7 @@ public UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOff
36983698 boolean isVmWare = (template .getHypervisorType () == HypervisorType .VMware || (hypervisor != null && hypervisor == HypervisorType .VMware ));
36993699
37003700 if (securityGroupIdList != null && isVmWare ) {
3701- throw new InvalidParameterValueException ("Security group feature is not supported for vmWare hypervisor" );
3701+ throw new InvalidParameterValueException ("Security group feature is not supported for VMware hypervisor" );
37023702 } else if (!isVmWare && _networkModel .isSecurityGroupSupportedInNetwork (defaultNetwork ) && _networkModel .canAddDefaultSecurityGroup ()) {
37033703 //add the default securityGroup only if no security group is specified
37043704 if (securityGroupIdList == null || securityGroupIdList .isEmpty ()) {
@@ -3758,7 +3758,7 @@ public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, Service
37583758
37593759 } else if (securityGroupIdList != null && !securityGroupIdList .isEmpty ()) {
37603760 if (isVmWare ) {
3761- throw new InvalidParameterValueException ("Security group feature is not supported for vmWare hypervisor" );
3761+ throw new InvalidParameterValueException ("Security group feature is not supported for VMware hypervisor" );
37623762 }
37633763 // Only one network can be specified, and it should be security group enabled
37643764 if (networkIdList .size () > 1 && template .getHypervisorType () != HypervisorType .KVM && hypervisor != HypervisorType .KVM ) {
0 commit comments