mirror of https://github.com/apache/cloudstack.git
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
This commit is contained in:
parent
124a48819d
commit
f2da0d50ca
|
|
@ -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"
|
||||
--!>
|
||||
|
|
@ -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"
|
||||
--!>
|
||||
|
|
@ -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"
|
||||
--!>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
<configConfMos
|
||||
cookie="%cookie%"
|
||||
inHierarchical="false">
|
||||
<inConfigs>
|
||||
|
||||
<pair key="%natpolicydn%">
|
||||
<natpolicyNatRuleBasedPolicy
|
||||
descr=""
|
||||
dn="%natpolicydn%"
|
||||
name="%natpolicyname%"
|
||||
status="created"/>
|
||||
</pair>
|
||||
|
||||
</inConfigs>
|
||||
</configConfMos>
|
||||
|
|
@ -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"
|
||||
--!>
|
||||
|
|
@ -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%"
|
||||
|
||||
--!>
|
||||
|
|
@ -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
|
||||
--!>
|
||||
|
|
@ -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"
|
||||
--!>
|
||||
Loading…
Reference in New Issue