DaanHoogland commented on code in PR #8222:
URL: https://github.com/apache/cloudstack/pull/8222#discussion_r1390777579
##########
api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java:
##########
@@ -59,7 +62,14 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
/////////////////////////////////////////////////////
public Long getIpAddressId() {
- return id;
+ if (id != null) {
Review Comment:
agree and this is usual to not allow two complementary parameters in ACS,
but I would not -1 for this in this case If we make it explicit which one takes
precedence.
##########
api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java:
##########
@@ -100,9 +111,9 @@ public String getEventDescription() {
@Override
public long getEntityOwnerId() {
if (ownerId == null) {
- IpAddress ip = getIpAddress(id);
+ IpAddress ip = getIpAddress();
if (ip == null) {
- throw new InvalidParameterValueException("Unable to find IP
address by ID=" + id);
+ throw new InvalidParameterValueException("Unable to find IP
address by ID=" + ip.getId());
Review Comment:
if we know, maybe add the actuall address as well?
--
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]