mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2789: UpdateVPC shouldn't require name parameter
This commit is contained in:
parent
8065ee445f
commit
e5335cd6e4
|
|
@ -20,7 +20,7 @@ package org.apache.cloudstack.api;
|
|||
public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd {
|
||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||
type = CommandType.STRING,
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4")
|
||||
private String customId;
|
||||
|
||||
public String getCustomId() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public abstract class BaseCustomIdCmd extends BaseCmd {
|
|||
|
||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||
type = CommandType.STRING,
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4")
|
||||
private String customId;
|
||||
|
||||
public String getCustomId() {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class UpdateVPCCmd extends BaseAsyncCustomIdCmd {
|
|||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "the id of the VPC")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the VPC", required = true)
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the VPC")
|
||||
private String vpcName;
|
||||
|
||||
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the VPC")
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ public class VpcManagerImpl extends ManagerBase implements VpcManager, VpcProvis
|
|||
// Verify input parameters
|
||||
VpcVO vpcToUpdate = _vpcDao.findById(vpcId);
|
||||
if (vpcToUpdate == null) {
|
||||
throw new InvalidParameterValueException("Unable to find vpc offering " + vpcId);
|
||||
throw new InvalidParameterValueException("Unable to find vpc by id " + vpcId);
|
||||
}
|
||||
|
||||
_accountMgr.checkAccess(caller, null, false, vpcToUpdate);
|
||||
|
|
|
|||
Loading…
Reference in New Issue