diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java index 09f78243fac..f63cbbf4cb5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java @@ -73,6 +73,10 @@ public class NetworkACLItemResponse extends BaseResponse { @Param(description = "the ID of the ACL this item belongs to") private String aclId; + @SerializedName(ApiConstants.ACL_NAME) + @Param(description = "the name of the ACL this item belongs to") + private String aclName; + @SerializedName(ApiConstants.NUMBER) @Param(description = "Number of the ACL Item") private Integer number; @@ -133,6 +137,10 @@ public class NetworkACLItemResponse extends BaseResponse { this.aclId = aclId; } + public void setAclName(String aclName) { + this.aclName = aclName; + } + public void setNumber(Integer number) { this.number = number; } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java index 4079ab31e66..1b6821248a3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java @@ -222,6 +222,10 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes @Param(description = "ACL Id associated with the VPC network") private String aclId; + @SerializedName(ApiConstants.ACL_NAME) + @Param(description = "ACL name associated with the VPC network") + private String aclName; + @SerializedName(ApiConstants.STRECHED_L2_SUBNET) @Param(description = "true if network can span multiple zones", since = "4.4") private Boolean strechedL2Subnet; @@ -238,10 +242,6 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes @Param(description = "If the network has redundant routers enabled", since = "4.11.1") private Boolean redundantRouter; - @SerializedName(ApiConstants.ACL_NAME) - @Param(description = "ACL name associated with the VPC network", since = "4.15.0") - private String aclName; - public Boolean getDisplayNetwork() { return displayNetwork; } @@ -443,6 +443,14 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes this.aclId = aclId; } + public String getAclName() { + return aclName; + } + + public void setAclName(String aclName) { + this.aclName = aclName; + } + public void setStrechedL2Subnet(Boolean strechedL2Subnet) { this.strechedL2Subnet = strechedL2Subnet; } @@ -462,12 +470,4 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes public void setRedundantRouter(Boolean redundantRouter) { this.redundantRouter = redundantRouter; } - - public String getAclName() { - return aclName; - } - - public void setAclName(String aclName) { - this.aclName = aclName; - } } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java index be2faa796d6..381c7d16399 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java @@ -101,6 +101,10 @@ public class PrivateGatewayResponse extends BaseResponse implements ControlledEn @Param(description = "ACL Id set for private gateway") private String aclId; + @SerializedName(ApiConstants.ACL_NAME) + @Param(description = "ACL name set for private gateway") + private String aclName; + @Override public String getObjectId() { return this.id; @@ -183,4 +187,8 @@ public class PrivateGatewayResponse extends BaseResponse implements ControlledEn this.aclId = aclId; } + public void setAclName(String aclName) { + this.aclName = aclName; + } + } diff --git a/server/src/main/java/com/cloud/api/ApiResponseHelper.java b/server/src/main/java/com/cloud/api/ApiResponseHelper.java index 201ea1c4eff..2957a59b07e 100644 --- a/server/src/main/java/com/cloud/api/ApiResponseHelper.java +++ b/server/src/main/java/com/cloud/api/ApiResponseHelper.java @@ -2409,6 +2409,7 @@ public class ApiResponseHelper implements ResponseGenerator { NetworkACL acl = ApiDBUtils.findByNetworkACLId(aclItem.getAclId()); if (acl != null) { response.setAclId(acl.getUuid()); + response.setAclName(acl.getName()); } //set tag information @@ -3003,6 +3004,7 @@ public class ApiResponseHelper implements ResponseGenerator { NetworkACL acl = ApiDBUtils.findByNetworkACLId(result.getNetworkACLId()); if (acl != null) { response.setAclId(acl.getUuid()); + response.setAclName(acl.getName()); } response.setObjectName("privategateway");