Added configuration parameter to enable/disable the firewall rule UI.

This commit is contained in:
keshav 2011-08-10 16:03:30 -07:00
parent 874e89f79c
commit 57f1ee7ca1
2 changed files with 12 additions and 0 deletions

View File

@ -70,6 +70,7 @@ public enum Config {
OvsNetwork("Network", ManagementServer.class, Boolean.class, "open.vswitch.vlan.network", "false", "enable/disable vlan remapping of open vswitch network", null),
OvsTunnelNetwork("Network", ManagementServer.class, Boolean.class, "open.vswitch.tunnel.network", "false", "enable/disable open vswitch tunnel network(no vlan)", null),
VmNetworkThrottlingRate("Network", ManagementServer.class, Integer.class, "vm.network.throttling.rate", "200", "Default data transfer rate in megabits per second allowed in User vm's default network.", 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),

View File

@ -19,6 +19,8 @@ package com.cloud.upgrade.dao;
import java.io.File;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import org.apache.log4j.Logger;
@ -55,6 +57,15 @@ public class Upgrade229to2210 implements DbUpgrade {
@Override
public void performDataMigration(Connection conn) {
PreparedStatement pstmt;
try {
pstmt = conn.prepareStatement("INSERT IGNORE INTO `cloud`.`configuration` (category, instance, name, value, description) VALUES ('Network', 'DEFAULT', 'firewall.rule.ui.enabled', 'true', 'enable/disable UI that separates firewall rules from NAT/LB rules')");
pstmt.execute();
pstmt.close();
} catch (SQLException e) {
throw new CloudRuntimeException("Unable to perform data migration", e);
}
}
@Override