use dicts for BGP control plane protection
This commit is contained in:
parent
b9c5154ec3
commit
7690ec0b12
@ -28,7 +28,7 @@ destroy tmp-bcp38-else-oface-v6
|
|||||||
|
|
||||||
{% if salt["pillar.get"]("control-plane-protection:bgp:IPv4",None) != None %}
|
{% if salt["pillar.get"]("control-plane-protection:bgp:IPv4",None) != None %}
|
||||||
create tmp-control-plane-bgp-v4 hash:net family inet hashsize 1024 maxelem 65536
|
create tmp-control-plane-bgp-v4 hash:net family inet hashsize 1024 maxelem 65536
|
||||||
{% for subnet in salt["pillar.get"]("control-plane-protection:bgp:IPv4",[]) %}
|
{% for subnet in salt["pillar.get"]("control-plane-protection:bgp:IPv4",{}).keys() %}
|
||||||
add tmp-control-plane-bgp-v4 {{ subnet }}
|
add tmp-control-plane-bgp-v4 {{ subnet }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
swap tmp-control-plane-bgp-v4 control-plane-bgp-v4
|
swap tmp-control-plane-bgp-v4 control-plane-bgp-v4
|
||||||
@ -37,7 +37,7 @@ destroy tmp-control-plane-bgp-v4
|
|||||||
|
|
||||||
{% if salt["pillar.get"]("control-plane-protection:bgp:IPv6",None) != None %}
|
{% if salt["pillar.get"]("control-plane-protection:bgp:IPv6",None) != None %}
|
||||||
create tmp-control-plane-bgp-v6 hash:net family inet6 hashsize 1024 maxelem 65536
|
create tmp-control-plane-bgp-v6 hash:net family inet6 hashsize 1024 maxelem 65536
|
||||||
{% for subnet in salt["pillar.get"]("control-plane-protection:bgp:IPv6",[]) %}
|
{% for subnet in salt["pillar.get"]("control-plane-protection:bgp:IPv6",{}).keys() %}
|
||||||
add tmp-control-plane-bgp-v6 {{ subnet }}
|
add tmp-control-plane-bgp-v6 {{ subnet }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
swap tmp-control-plane-bgp-v6 control-plane-bgp-v6
|
swap tmp-control-plane-bgp-v6 control-plane-bgp-v6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user