mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Added parameter to enable the firewall rule UI to the list capabilities API.
This commit is contained in:
parent
d1ec7e759b
commit
d47eb46faf
@ -50,6 +50,7 @@ public class ListCapabilitiesCmd extends BaseCmd {
|
||||
response.setCloudStackVersion((String)capabilities.get("cloudStackVersion"));
|
||||
response.setUserPublicTemplateEnabled((Boolean)capabilities.get("userPublicTemplateEnabled"));
|
||||
response.setSupportELB((String)capabilities.get("supportELB"));
|
||||
response.setFirewallRuleUiEnabled((Boolean) capabilities.get("firewallRuleUiEnabled"));
|
||||
response.setObjectName("capability");
|
||||
response.setResponseName(getCommandName());
|
||||
this.setResponseObject(response);
|
||||
|
||||
@ -34,6 +34,9 @@ public class CapabilitiesResponse extends BaseResponse {
|
||||
|
||||
@SerializedName("supportELB") @Param(description="true if region supports elastic load balancer on basic zones")
|
||||
private String supportELB;
|
||||
|
||||
@SerializedName("firewallRuleUiEnabled") @Param(description="true if the firewall rule UI is enabled")
|
||||
private boolean firewallRuleUiEnabled;
|
||||
|
||||
public boolean getSecurityGroupsEnabled() {
|
||||
return securityGroupsEnabled;
|
||||
@ -66,4 +69,12 @@ public class CapabilitiesResponse extends BaseResponse {
|
||||
public String getSupportELB() {
|
||||
return supportELB;
|
||||
}
|
||||
|
||||
public void setFirewallRuleUiEnabled(boolean firewallRuleUiEnabled) {
|
||||
this.firewallRuleUiEnabled = firewallRuleUiEnabled;
|
||||
}
|
||||
|
||||
public boolean getFirewallRuleUiEnabled() {
|
||||
return firewallRuleUiEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4219,13 +4219,15 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
supportELB = networkType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String firewallRuleUiEnabled = _configs.get(Config.FirewallRuleUiEnabled.key());
|
||||
String userPublicTemplateEnabled = _configs.get(Config.AllowPublicUserTemplates.key());
|
||||
|
||||
capabilities.put("securityGroupsEnabled", securityGroupsEnabled);
|
||||
capabilities.put("userPublicTemplateEnabled", (userPublicTemplateEnabled == null || userPublicTemplateEnabled.equals("false") ? false : true));
|
||||
capabilities.put("cloudStackVersion", getVersion());
|
||||
capabilities.put("supportELB", supportELB);
|
||||
capabilities.put("firewallRuleUiEnabled", (firewallRuleUiEnabled != null && firewallRuleUiEnabled.equals("true")) ? true : false);
|
||||
return capabilities;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user