cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject git commit: updated refs/heads/master to 9f18f1c
Date Wed, 05 Jun 2013 10:12:19 GMT
Updated Branches:
  refs/heads/master 9fe7846d7 -> 9f18f1cb1


CLOUDSTACK-2812: Static NAT rules are created with same name and Destination IP Pool for each
Public IP with which only one instance is reachable with both Static NATed IP's
For static NAT rule an IP pool gets created in VNMC. In order to make the pool name unique
the rule id is appended. Since static NAT rules are not stored in CS db. like PF/FW rules,
the id was always set to 0.
As a result the pool was always getting overridden everytime a static NAT rule is created.
Fixed it by appending the public IP address id along with a character indicating that the
pool is used for static NAT rule to the pool name.


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

Branch: refs/heads/master
Commit: 9f18f1cb1cb4c11b61b687e745ef126775526b60
Parents: 9fe7846
Author: Koushik Das <koushik.das@citrix.com>
Authored: Wed Jun 5 15:23:34 2013 +0530
Committer: Koushik Das <koushik.das@citrix.com>
Committed: Wed Jun 5 15:41:36 2013 +0530

----------------------------------------------------------------------
 .../network/cisco/CiscoVnmcConnectionImpl.java     |    2 +-
 .../cloud/network/element/CiscoVnmcElement.java    |    2 +-
 .../cloud/network/resource/CiscoVnmcResource.java  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f18f1cb/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java
b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java
index 72ecc67..823be86 100644
--- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java
@@ -1070,7 +1070,7 @@ public class CiscoVnmcConnectionImpl implements CiscoVnmcConnection
{
     }
 
     private String getNameForDNatIpPool(String tenantName, String identifier) {
-        return "IpPool-" + tenantName + "-" + identifier;
+        return "IpPool-" + tenantName + "-" + identifier + "n";
     }
 
     private String getDnForDNatIpPool(String tenantName, String identifier) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f18f1cb/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
index 9118bad..553325c 100644
--- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElement.java
@@ -807,7 +807,7 @@ public class CiscoVnmcElement extends AdapterBase implements SourceNatServicePro
         List<StaticNatRuleTO> rulesTO = new ArrayList<StaticNatRuleTO>();
         for (StaticNat rule : rules) {
             IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
-            StaticNatRuleTO ruleTO = new StaticNatRuleTO(0, sourceIp.getAddress().addr(),
null, 
+            StaticNatRuleTO ruleTO = new StaticNatRuleTO(rule.getSourceIpAddressId(), sourceIp.getAddress().addr(),
null,
                     null, rule.getDestIpAddress(), null, null, null, rule.isForRevoke(),
false);
             rulesTO.add(ruleTO);
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9f18f1cb/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java
b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java
index fc0c334..9524bf9 100644
--- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java
+++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java
@@ -501,7 +501,7 @@ public class CiscoVnmcResource implements ServerResource {
     }
 
     /*
-     * Destination NAT
+     * PF
      */
     private synchronized Answer execute(SetPortForwardingRulesCommand cmd) {
         refreshVnmcConnection();


Mime
View raw message