incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kous...@apache.org
Subject [2/5] git commit: refs/heads/cisco-vnmc-api-integration - Added VNMC XMLs for supporting PF/DNAT rules. Also moved out some XMLs related to source NAT to common files so that these can be used for both source NAT and DNAT
Date Fri, 22 Feb 2013 13:50:35 GMT
Added VNMC XMLs for supporting PF/DNAT rules.
Also moved out some XMLs related to source NAT to common files so that these can be used for
both source NAT and DNAT


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

Branch: refs/heads/cisco-vnmc-api-integration
Commit: f2da0d50caf49efeb903b9abde9a4f996cf6cc1b
Parents: 124a488
Author: Koushik Das <koushik.das@citrix.com>
Authored: Fri Feb 22 18:17:53 2013 +0530
Committer: Koushik Das <koushik.das@citrix.com>
Committed: Fri Feb 22 18:17:53 2013 +0530

----------------------------------------------------------------------
 .../scripts/network/cisco/create-dnat-rule.xml     |  149 +++++++++++++++
 .../scripts/network/cisco/create-ip-pool.xml       |   41 ++++
 .../network/cisco/create-nat-policy-ref.xml        |   20 ++
 .../scripts/network/cisco/create-nat-policy.xml    |   15 ++
 .../scripts/network/cisco/create-port-pool.xml     |   55 ++++++
 .../network/cisco/create-source-nat-policy.xml     |  109 -----------
 .../network/cisco/create-source-nat-rule.xml       |   85 ++++++++
 .../scripts/network/cisco/list-nat-policies.xml    |   14 ++
 8 files changed, 379 insertions(+), 109 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-dnat-rule.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-dnat-rule.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-dnat-rule.xml
new file mode 100755
index 0000000..8f53003
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-dnat-rule.xml
@@ -0,0 +1,149 @@
+
+<configConfMos
+  cookie="%cookie%"
+  inHierarchical="false">
+  <inConfigs>
+
+    <pair key="%natruledn%">
+      <policyRule
+        descr="%descr%"
+        dn="%natruledn%"
+        name="%natrulename%"
+        order="100"
+        status="created"/>
+    </pair>
+
+    <pair key="%natruledn%/nat-action">
+      <natpolicyNatAction
+        actionType="static"
+        destTranslatedIpPool=""
+        destTranslatedPortPool=""
+        dn="%natruledn%/nat-action"
+        id="0"
+        isBidirectionalEnabled="yes"
+        isDnsEnabled="no"
+        isNoProxyArpEnabled="no"
+        isRoundRobinIpEnabled="no"
+        srcTranslatedIpPatPool=""
+        srcTranslatedIpPool="%ippoolname%"
+        srcTranslatedPortPool="%portpoolname%"
+        status="created"/>
+    </pair>
+
+    <pair key="%natruledn%/rule-cond-2">
+      <policyRuleCondition
+        dn="%natruledn%/rule-cond-2"
+        id="2"
+        order="unspecified"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-2/nw-expr2/nw-attr-qual">
+      <policyNwAttrQualifier
+        attrEp="source"
+        dn="%natruledn%/rule-cond-2/nw-expr2/nw-attr-qual"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-2/nw-expr2">
+      <policyNetworkExpression
+        dn="%natruledn%/rule-cond-2/nw-expr2"
+        id="2"
+        opr="eq"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-2/nw-expr2/nw-ip-2">
+      <policyIPAddress
+        dataType="string"
+        descr=""
+        dn="%natruledn%/rule-cond-2/nw-expr2/nw-ip-2"
+        id="2"
+        name=""
+        placement="none"
+        status="created"
+        value="%srcip%"/>
+    </pair>
+
+    <pair key="%natruledn%/rule-cond-3">
+      <policyRuleCondition
+        dn="%natruledn%/rule-cond-3"
+        id="3"
+        order="unspecified"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-3/nw-expr2/nw-attr-qual">
+      <policyNwAttrQualifier
+        attrEp="source"
+        dn="%natruledn%/rule-cond-3/nw-expr2/nw-attr-qual"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-3/nw-expr2">
+      <policyNetworkExpression
+        dn="%natruledn%/rule-cond-3/nw-expr2"
+        id="2"
+        opr="range"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-3/nw-expr2/nw-port-2">
+      <policyNetworkPort
+        appType="Other"
+        dataType="string"
+        descr=""
+        dn="%natruledn%/rule-cond-3/nw-expr2/nw-port-2"
+        id="2"
+        name=""
+        placement="begin"
+        status="created"
+        value="%srcportstart%"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-3/nw-expr2/nw-port-3">
+      <policyNetworkPort
+        appType="Other"
+        dataType="string"
+        descr=""
+        dn="%natruledn%/rule-cond-3/nw-expr2/nw-port-3"
+        id="3"
+        name=""
+        placement="end"
+        status="created"
+        value="%srcportend%"/>
+    </pair>
+
+    <pair key="%natruledn%/rule-cond-4">
+      <policyRuleCondition
+        dn="%natruledn%/rule-cond-4"
+        id="4"
+        order="unspecified"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-4/nw-expr2">
+      <policyNetworkExpression
+        dn="%natruledn%/rule-cond-4/nw-expr2"
+        id="2"
+        opr="eq"
+        status="created"/>
+    </pair>
+    <pair key="%natruledn%/rule-cond-4/nw-expr2/nw-protocol-2">
+      <policyProtocol
+        dataType="string"
+        descr=""
+        dn="%natruledn%/rule-cond-4/nw-expr2/nw-protocol-2"
+        id="2"
+        name=""
+        placement="none"
+        status="created"
+        value="%protocolvalue%"/>
+    </pair>
+
+  </inConfigs>
+</configConfMos>
+
+<!--
+    natruledn="org-root/org-vlan-123/org-VDC-vlan-123/natpol-aaa/rule-bbb"
+    natrulename="bbb"
+    descr=value
+    ippoolname="ccc"
+    portpoolname="ddd"
+    srcip="10.147.30.230"
+    srcportstart="22"
+    srcportend="22"
+    protocolvalue="TCP"
+--!>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-ip-pool.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-ip-pool.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-ip-pool.xml
new file mode 100755
index 0000000..264b149
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-ip-pool.xml
@@ -0,0 +1,41 @@
+
+<configConfMos
+  cookie="%cookie%"
+  inHierarchical="false">
+  <inConfigs>
+
+    <pair key="%ippooldn%">
+      <policyObjectGroup
+        descr="%descr%"
+        dn="%ippooldn%"
+        name="%ippoolname%"
+        status="created"/>
+    </pair>
+    <pair key="%ippooldn%/objgrp-expr-2">
+      <policyObjectGroupExpression
+        dn="%ippooldn%/objgrp-expr-2"
+        id="2"
+        opr="eq"
+        order="unspecified"
+        status="created"/>
+    </pair>
+    <pair key="%ippooldn%/objgrp-expr-2/nw-ip-2">
+      <policyIPAddress
+        dataType="string"
+        descr=""
+        dn="%ippooldn%/objgrp-expr-2/nw-ip-2"
+        id="2"
+        name=""
+        placement="none"
+        status="created"
+        value="%ipvalue%"/>
+    </pair>
+
+  </inConfigs>
+</configConfMos>
+
+<!--
+    ippooldn="org-root/org-vlan-123/org-VDC-vlan-123/objgrp-ccc"
+    ippoolname="ccc"
+    ipvalue="10.1.1.20"
+--!>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy-ref.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy-ref.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy-ref.xml
new file mode 100755
index 0000000..07964a2
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy-ref.xml
@@ -0,0 +1,20 @@
+<configConfMos 
+  cookie="%cookie%"
+  inHierarchical="false">
+  <inConfigs>
+
+    <pair key="%natpolicyrefdn%" >
+      <policyPolicyNameRef
+        dn="%natpolicyrefdn%"
+        order="%order%"
+        policyName="%natpolicyname%"
+        status="created"/>
+    </pair>
+
+  </inConfigs>
+</configConfMos>
+
+<!--
+    natpolicyrefdn="org-root/org-TenantD/org-VDC-TenantD/natpset-TenantD-NAT-Policy-Set/polref-Source-NAT-Policy-TenantD"
+    natpolicyname="Source-NAT-Policy-TenantD"
+--!>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy.xml
new file mode 100755
index 0000000..b7539fe
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-nat-policy.xml
@@ -0,0 +1,15 @@
+<configConfMos
+  cookie="%cookie%"
+  inHierarchical="false">
+  <inConfigs>
+
+    <pair key="%natpolicydn%">
+      <natpolicyNatRuleBasedPolicy
+        descr=""
+        dn="%natpolicydn%"
+        name="%natpolicyname%"
+        status="created"/>
+    </pair>
+
+  </inConfigs>
+</configConfMos>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-port-pool.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-port-pool.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-port-pool.xml
new file mode 100755
index 0000000..9f6a168
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-port-pool.xml
@@ -0,0 +1,55 @@
+
+<configConfMos
+  cookie="%cookie%"
+  inHierarchical="false">
+  <inConfigs>
+
+    <pair key="%portpooldn%">
+      <policyObjectGroup
+        descr="%descr%"
+        dn="%portpooldn%"
+        name="%portpoolname%"
+        status="created"/>
+    </pair>
+    <pair key="%portpooldn%/objgrp-expr-2">
+      <policyObjectGroupExpression
+        dn="%portpooldn%/objgrp-expr-2"
+        id="2"
+        opr="range"
+        order="unspecified"
+        status="created"/>
+    </pair>
+    <pair key="%portpooldn%/objgrp-expr-2/nw-port-2">
+      <policyNetworkPort
+        appType="Other"
+        dataType="string"
+        descr=""
+        dn="%portpooldn%/objgrp-expr-2/nw-port-2"
+        id="2"
+        name=""
+        placement="begin"
+        status="created"
+        value="%startport%"/>
+    </pair>
+    <pair key="%portpooldn%/objgrp-expr-2/nw-port-3">
+      <policyNetworkPort
+        appType="Other"
+        dataType="string"
+        descr=""
+        dn="%portpooldn%/objgrp-expr-2/nw-port-3"
+        id="3"
+        name=""
+        placement="end"
+        status="created"
+        value="%endport%"/>
+    </pair>
+
+  </inConfigs>
+</configConfMos>
+
+<!--
+    portpooldn="org-root/org-vlan-123/org-VDC-vlan-123/objgrp-ddd"
+    portpoolname="ddd"
+    startport="22"
+    endport="22"
+--!>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-policy.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-policy.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-policy.xml
deleted file mode 100644
index 995e766..0000000
--- a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-policy.xml
+++ /dev/null
@@ -1,109 +0,0 @@
-<configConfMos 
-  cookie="%cookie%" 
-  inHierarchical="false">
-    <inConfigs>
-      
-      <pair key="%natruleruledn%" >
-          <policyRuleCondition
-          dn="%natruleruledn%"
-          id="2"
-          order="unspecified"
-          status="created"/>
-      </pair>
-      
-      <pair key="%natsnatruleconddn%" >
-          <policyNwAttrQualifier
-          attrEp="source"
-          dn="%natsnatruleconddn%"
-          status="created"/>
-      </pair>
-      
-      <pair key="%natpoldn%" >
-          <natpolicyNatRuleBasedPolicy
-          adminState="enabled"
-          descr="%natpoldescr%"
-          dn="%natpoldn%"
-          name="%natpolname%"
-          status="created"/>
-      </pair>
-
-      <pair key="%natipdn2%" >
-          <policyIPAddress
-          dataType="string"
-          descr=""
-          dn="%natipdn2%"
-          id="2"
-          name=""
-          placement="begin"
-          status="created"
-          value="%sourcestartip%"/>
-      </pair>
-      
-      <pair key="%natipdn3%" >
-          <policyIPAddress
-          dataType="string"
-          descr=""
-          dn="%natipdn3%"
-          id="3"
-          name=""
-          placement="end"
-          status="created"
-          value="%sourceendip%"/>
-      </pair>
-      
-      <pair key="%natrangedn%" >
-          <policyNetworkExpression
-          dn="%natrangedn%" 
-          id="2"
-          opr="range"
-          status="created"/>
-      </pair>
-      
-      <pair key="%natruledn%" >
-          <policyRule
-          descr="%natruledescr%"
-          dn="%natrulen%"
-          name="%natrulename%"
-          order="100"
-          status="created"/>
-      </pair>
-      
-      <pair key="%natactiondn%" >
-          <natpolicyNatAction
-          actionType="static"
-          destTranslatedIpPool=""
-          destTranslatedPortPool=""
-          dn="%natactiondn%"
-          id="0"
-          isBidirectionalEnabled="yes"
-          isDnsEnabled="yes"
-          isNoProxyArpEnabled="no"
-          isRoundRobinIpEnabled="no"
-          
-          srcTranslatedIpPatPool=""
-          srcTranslatedIpPool="%sourcenatpoolname%"
-          srcTranslatedPortPool=""
-          status="created"/>
-      </pair>
-      
-    </inConfigs>
-</configConfMos>
-
-<!--
-     natactiondn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/nat-action"
-     srcTranslatedIpPool="Source-NAT-Pool-For-Tenant3"
-     natruledn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule"
-     natrulename="Source-NAT-Policy-Rule"
-     natruledescr="Source NAT Policy Rule for Tenant3"
-     natrangedn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/rule-cond-2/nw-expr2"
-     natipdn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/rule-cond-2/nw-expr2/nw-ip-3"
-     natpoldn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3"
-     natpolname="Source-NAT-For-Tenant3"
-     natpoldescr="%natpoldescr%"
-     natsnatruleconddn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/rule-cond-2/nw-expr2/nw-attr-qual"
-     natruleruledn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/rule-cond-2"
-     natipdn2="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule/rule-cond-2/nw-expr2/nw-ip-2"
-      value="%sourcestartip%"
-      value="%sourceendip%"
-
---!>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-rule.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-rule.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-rule.xml
new file mode 100644
index 0000000..aec191f
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/create-source-nat-rule.xml
@@ -0,0 +1,85 @@
+<configConfMos 
+  cookie="%cookie%" 
+  inHierarchical="false">
+    <inConfigs>
+
+      <pair key="%natruledn%">
+        <policyRule
+          descr="%descr%"
+          dn="%natruledn%"
+          name="%natrulename%"
+          order="100"
+          status="created"/>
+      </pair>
+
+      <pair key="%natruledn%/nat-action">
+        <natpolicyNatAction
+          actionType="static"
+          destTranslatedIpPool=""
+          destTranslatedPortPool=""
+          dn="%natruledn%/nat-action"
+          id="0"
+          isBidirectionalEnabled="yes"
+          isDnsEnabled="yes"
+          isNoProxyArpEnabled="no"
+          isRoundRobinIpEnabled="no"
+          srcTranslatedIpPatPool=""
+          srcTranslatedIpPool="%ippoolname%"
+          srcTranslatedPortPool=""
+          status="created"/>
+      </pair>
+
+      <pair key="%natruledn%/rule-cond-2">
+        <policyRuleCondition
+          dn="%natruledn%/rule-cond-2"
+          id="2"
+          order="unspecified"
+          status="created"/>
+      </pair>
+      <pair key="%natruledn%/rule-cond-2/nw-expr2">
+        <policyNetworkExpression
+          dn="%natruledn%/rule-cond-2/nw-expr2" 
+          id="2"
+          opr="range"
+          status="created"/>
+      </pair>
+      <pair key="%natruledn%/rule-cond-2/nw-expr2/nw-attr-qual">
+        <policyNwAttrQualifier
+          attrEp="source"
+          dn="%natruledn%/rule-cond-2/nw-expr2/nw-attr-qual"
+          status="created"/>
+      </pair>
+      <pair key="%natruledn%/rule-cond-2/nw-expr2/nw-ip-2">
+        <policyIPAddress
+          dataType="string"
+          descr=""
+          dn="%natruledn%/rule-cond-2/nw-expr2/nw-ip-2"
+          id="2"
+          name=""
+          placement="begin"
+          status="created"
+          value="%srcstartip%"/>
+      </pair>
+      <pair key="%natruledn%/rule-cond-2/nw-expr2/nw-ip-3">
+        <policyIPAddress
+          dataType="string"
+          descr=""
+          dn="%natruledn%/rule-cond-2/nw-expr2/nw-ip-3"
+          id="3"
+          name=""
+          placement="end"
+          status="created"
+          value="%srcendip%"/>
+      </pair>
+
+    </inConfigs>
+</configConfMos>
+
+<!--
+    natruledn="org-root/org-TestTenant3/org-Tenant3-VDC/natpol-Source-NAT-For-Tenant3/rule-Source-NAT-Policy-Rule"
+    natrulename="Source-NAT-Policy-Rule"
+    descr="Source NAT Policy Rule for Tenant3"
+    ippoolname=value
+    srcstartip=value
+    srcendip=value
+--!>

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/f2da0d50/plugins/network-elements/cisco-vnmc/scripts/network/cisco/list-nat-policies.xml
----------------------------------------------------------------------
diff --git a/plugins/network-elements/cisco-vnmc/scripts/network/cisco/list-nat-policies.xml
b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/list-nat-policies.xml
new file mode 100755
index 0000000..ec1765c
--- /dev/null
+++ b/plugins/network-elements/cisco-vnmc/scripts/network/cisco/list-nat-policies.xml
@@ -0,0 +1,14 @@
+
+<orgResolveInScope
+  dn="%vdcdn%"
+  cookie="%cookie%"
+  inClass="natpolicyNatRuleBasedPolicy"
+  inSingleLevel="false"
+  inHierarchical="false">
+    <inFilter>
+    </inFilter>
+</orgResolveInScope>
+
+<!--
+    vdcdn="org-root/org-vlan-123/org-VDC-vlan-123"
+--!>
\ No newline at end of file


Mime
View raw message