cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [22/50] [abbrv] git commit: updated refs/heads/vmsync to 049dd72
Date Mon, 24 Jun 2013 23:51:58 GMT
CLOUDSTACK-1578 kvm:Egress default policy configurable using network offering on kvm


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0cd8f9e7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0cd8f9e7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0cd8f9e7

Branch: refs/heads/vmsync
Commit: 0cd8f9e7316759f7634a7057cb4b40c98c27b8ae
Parents: 9121191
Author: Jayapal <jayapal@apache.org>
Authored: Thu Jun 20 16:32:11 2013 +0530
Committer: Jayapal <jayapal@apache.org>
Committed: Mon Jun 24 13:37:01 2013 +0530

----------------------------------------------------------------------
 .../resource/virtualnetwork/VirtualRoutingResource.java      | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0cd8f9e7/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
index dae1c85..4f0ccec 100755
--- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
+++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java
@@ -224,6 +224,7 @@ public class VirtualRoutingResource implements Manager {
             results[i] = "Failed";
         }
         String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
+        String egressDefault = cmd.getAccessDetail(NetworkElementCommand.FIREWALL_EGRESS_DEFAULT);
 
         if (routerIp == null) {
             return new SetFirewallRulesAnswer(cmd, false, results);
@@ -239,6 +240,13 @@ public class VirtualRoutingResource implements Manager {
         
         if (trafficType == FirewallRule.TrafficType.Egress){
             command.add("-E");
+            if (egressDefault.equals("true")) {
+                command.add("-P ", "1");
+            } else if (egressDefault.equals("System")) {
+                command.add("-P ", "2");
+            } else {
+                command.add("-P ", "0");
+            }
         }
 
         StringBuilder sb = new StringBuilder();


Mime
View raw message