From 3b1db5fa202c0bb1412ef4dee46e04bc7c2e99c5 Mon Sep 17 00:00:00 2001 From: Alena Prokharchyk Date: Wed, 25 Jan 2012 16:27:02 -0800 Subject: [PATCH] bug 13203: removed firewall.rule.ui.enabled global config status 13203: resolved fixed --- .../api/commands/ListCapabilitiesCmd.java | 1 - .../api/response/CapabilitiesResponse.java | 6 --- .../src/com/cloud/configuration/Config.java | 2 - .../cloud/server/ManagementServerImpl.java | 3 -- setup/db/db/schema-2214to30.sql | 42 ++++++++++--------- 5 files changed, 22 insertions(+), 32 deletions(-) diff --git a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java index 166a72c57ae..421757a217d 100644 --- a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java +++ b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java @@ -50,7 +50,6 @@ 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.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired")); response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects")); response.setObjectName("capability"); diff --git a/api/src/com/cloud/api/response/CapabilitiesResponse.java b/api/src/com/cloud/api/response/CapabilitiesResponse.java index 2aad4254b68..3fbda935a50 100644 --- a/api/src/com/cloud/api/response/CapabilitiesResponse.java +++ b/api/src/com/cloud/api/response/CapabilitiesResponse.java @@ -33,8 +33,6 @@ public class CapabilitiesResponse extends BaseResponse { @SerializedName("userpublictemplateenabled") @Param(description="true if user and domain admins can set templates to be shared, false otherwise") private boolean userPublicTemplateEnabled; - @SerializedName("firewallRuleUiEnabled") @Param(description="true if the firewall rule UI is enabled") - private boolean firewallRuleUiEnabled; @SerializedName("supportELB") @Param(description="true if region supports elastic load balancer on basic zones") private String supportELB; @@ -62,10 +60,6 @@ public class CapabilitiesResponse extends BaseResponse { this.supportELB = supportELB; } - public void setFirewallRuleUiEnabled(boolean firewallRuleUiEnabled) { - this.firewallRuleUiEnabled = firewallRuleUiEnabled; - } - public void setProjectInviteRequired(Boolean projectInviteRequired) { this.projectInviteRequired = projectInviteRequired; } diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index 3c6396b3697..ae890e6b574 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -105,8 +105,6 @@ public enum Config { SecurityGroupWorkPerAgentMaxQueueSize("Network", ManagementServer.class, Integer.class, "network.securitygroups.work.per.agent.queue.size", "100", "The number of outstanding security group work items that can be queued to a host. If exceeded, work items will get dropped to conserve memory. Security Group Sync will take care of ensuring that the host gets updated eventually", null), SecurityGroupDefaultAdding("Network", ManagementServer.class, Boolean.class, "network.securitygroups.defaultadding", "true", "If true, the user VM would be added to the default security group by default", null), - - FirewallRuleUiEnabled("Network", ManagementServer.class, Boolean.class, "firewall.rule.ui.enabled", "true", "enable/disable UI that separates firewall rules from NAT/LB rules", null), //VPN RemoteAccessVpnPskLength("Network", AgentManager.class, Integer.class, "remote.access.vpn.psk.length", "24", "The length of the ipsec preshared key (minimum 8, maximum 256)", null), diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 27fc6fd70d1..1565be1ed9a 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -2561,15 +2561,12 @@ public class ManagementServerImpl implements ManagementServer { } } - 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); - capabilities.put("firewallRuleUiEnabled", (firewallRuleUiEnabled != null && firewallRuleUiEnabled.equals("true")) ? true : false); capabilities.put("projectInviteRequired", _projectMgr.projectInviteRequired()); capabilities.put("allowusercreateprojects", _projectMgr.allowUserToCreateProject()); return capabilities; diff --git a/setup/db/db/schema-2214to30.sql b/setup/db/db/schema-2214to30.sql index 4115f289e95..01b4905cc99 100755 --- a/setup/db/db/schema-2214to30.sql +++ b/setup/db/db/schema-2214to30.sql @@ -1,18 +1,18 @@ -# Copyright (C) 2011 Citrix Systems, Inc. All rights reserved -# -# This software is licensed under the GNU General Public License v3 or later. -# -# It is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or any later version. -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# +# Copyright (C) 2011 Citrix Systems, Inc. All rights reserved +# +# This software is licensed under the GNU General Public License v3 or later. +# +# It is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or any later version. +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# --; -- Schema upgrade from 2.2.14 to 3.0; --; @@ -604,8 +604,10 @@ CREATE TABLE `cloud`.`op_dc_storage_network_ip_address` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; update networks set guru_name='StorageNetworkGuru' where traffic_type='Storage'; - -ALTER TABLE `cloud`.`event` ADD COLUMN `domain_id` bigint unsigned NOT NULL; -UPDATE `cloud`.`event` e set e.domain_id = (select acc.domain_id from account acc where acc.id = e.account_id) where e.domain_id = 0; - -update vm_template set removed=now() where id=2; + +ALTER TABLE `cloud`.`event` ADD COLUMN `domain_id` bigint unsigned NOT NULL; +UPDATE `cloud`.`event` e set e.domain_id = (select acc.domain_id from account acc where acc.id = e.account_id) where e.domain_id = 0; + +update vm_template set removed=now() where id=2; + +DELETE from `cloud`.`configuration` where name='firewall.rule.ui.enabled';