mirror of https://github.com/apache/cloudstack.git
Display acl name in listNetworks response (#4317)
* Display acl name in listNetworks response Display acl name along with its id so that we dont need to make extra api call to get acl name * Add since tag
This commit is contained in:
parent
1fb50de9e8
commit
43a25c78f6
|
|
@ -719,6 +719,7 @@ public class ApiConstants {
|
|||
public static final String AFFINITY_GROUP_ID = "affinitygroupid";
|
||||
public static final String DEPLOYMENT_PLANNER = "deploymentplanner";
|
||||
public static final String ACL_ID = "aclid";
|
||||
public static final String ACL_NAME = "aclname";
|
||||
public static final String NUMBER = "number";
|
||||
public static final String IS_DYNAMICALLY_SCALABLE = "isdynamicallyscalable";
|
||||
public static final String ROUTING = "isrouting";
|
||||
|
|
|
|||
|
|
@ -238,6 +238,10 @@ 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;
|
||||
}
|
||||
|
|
@ -458,4 +462,12 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2279,6 +2279,7 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||
NetworkACL acl = ApiDBUtils.findByNetworkACLId(network.getNetworkACLId());
|
||||
if (acl != null) {
|
||||
response.setAclId(acl.getUuid());
|
||||
response.setAclName(acl.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue