mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 10:32:34 +01:00
Fixed authorizeSecurityGroupIngressRule to work with "name" parameter
This commit is contained in:
parent
cd6d933e48
commit
8a68e8148e
@ -120,6 +120,11 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd {
|
||||
if (securityGroupId == null) {
|
||||
throw new InvalidParameterValueException("Unable to find security group " + securityGroupName + " for account id=" + getEntityOwnerId());
|
||||
}
|
||||
securityGroupName = null;
|
||||
}
|
||||
|
||||
if (securityGroupId == null) {
|
||||
throw new InvalidParameterValueException("Either securityGroupId or securityGroupName is required by authorizeSecurityGroupIngress command");
|
||||
}
|
||||
|
||||
return securityGroupId;
|
||||
|
||||
@ -59,6 +59,10 @@ public class DeleteSecurityGroupCmd extends BaseCmd {
|
||||
}
|
||||
}
|
||||
|
||||
if (id == null) {
|
||||
throw new InvalidParameterValueException("Either id or name parameter is requred by deleteSecurityGroup command");
|
||||
}
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
@ -105,4 +109,4 @@ public class DeleteSecurityGroupCmd extends BaseCmd {
|
||||
throw new ServerApiException(BaseCmd.RESOURCE_IN_USE_ERROR, ex.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user