cloudstack-commits mailing list archives

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


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

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

----------------------------------------------------------------------
 .../com/cloud/hypervisor/vmware/resource/VmwareResource.java | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9121191f/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index c35024c..5040443 100755
--- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -764,12 +764,20 @@ public class VmwareResource implements StoragePoolResource, ServerResource,
Vmwa
         String[] results = new String[cmd.getRules().length];
         FirewallRuleTO[] allrules = cmd.getRules();
         FirewallRule.TrafficType trafficType = allrules[0].getTrafficType();
+        String egressDefault = cmd.getAccessDetail(NetworkElementCommand.FIREWALL_EGRESS_DEFAULT);
 
         String[][] rules = cmd.generateFwRules();
         String args = "";
         args += " -F ";
         if (trafficType == FirewallRule.TrafficType.Egress){
             args+= " -E ";
+            if (egressDefault.equals("true")) {
+                args+= " -P 1 ";
+            } else if (egressDefault.equals("System")) {
+                args+= " -P 2 ";
+            } else {
+                args+= " -P 0 ";
+            }
         }
 
         StringBuilder sb = new StringBuilder();


Mime
View raw message