Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Issues 239 & 262 #263

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions plugins/action/common/prepare_plugins/prep_001_list_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,17 @@ def prepare(self):
# Check vxlan.topology list elements
parent_keys = ['vxlan', 'topology']
dm_check = data_model_key_check(self.model_data, parent_keys)
if 'topology' in dm_check['keys_not_found']:
self.model_data['vxlan']['topology'] = {}
self.model_data['vxlan']['topology']['edge_connections'] = []
self.model_data['vxlan']['topology']['fabric_links'] = []
self.model_data['vxlan']['topology']['switches'] = []
self.model_data['vxlan']['topology']['vpc_peers'] = []
if 'topology' in dm_check['keys_no_data']:
self.model_data['vxlan']['topology'] = {'edge_connections': []}
self.model_data['vxlan']['topology'] = {'fabric_links': []}
self.model_data['vxlan']['topology'] = {'switches': []}
self.model_data['vxlan']['topology'] = {'vpc_peers': []}
self.model_data['vxlan']['topology']['edge_connections'] = []
self.model_data['vxlan']['topology']['fabric_links'] = []
self.model_data['vxlan']['topology']['switches'] = []
self.model_data['vxlan']['topology']['vpc_peers'] = []

# Check vxlan.topology.fabric_links list element
target_key = 'fabric_links'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{# Auto-generated NDFC DC VXLAN EVPN Flow Monitor config data structure for fabric {{ vxlan.global.name }} #}
{% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
ENABLE_NETFLOW: {{ global.netflow.enable | default(defaults.vxlan.global.netflow.enable) }}
{% if global.netflow.enable is defined and global.netflow.enable | bool or defaults.vxlan.global.netflow.enable | bool %}
{% if global.netflow.enable is defined and global.netflow.enable | ansible.builtin.bool or defaults.vxlan.global.netflow.enable | ansible.builtin.bool %}
{% if global.netflow.exporter is defined %}
{% set exporter_dict = dict() %}
{% set _ = exporter_dict.update({ "NETFLOW_EXPORTER_LIST":[] }) %}
Expand All @@ -25,4 +26,5 @@
{% endfor %}
NETFLOW_MONITOR_LIST: "{{ monitor_dict | tojson | replace('"', '\\"') }}"
{% endif %}
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{# Auto-generated NDFC DC VXLAN EVPN General config data structure for fabric {{ vxlan.global.name }} #}
BGP_AS: {{ global.bgp_asn }}
UNDERLAY_IS_V6: {{ (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) }}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) == 'True' %}
USE_LINK_LOCAL: {{ vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address | title) }}
{% if (vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | title) == 'False' %}
UNDERLAY_IS_V6: {{ vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title }}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
USE_LINK_LOCAL: {{ vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | title }}
{% if not (vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | ansible.builtin.bool) %}
V6_SUBNET_TARGET_MASK: {{ vxlan.underlay.ipv6.underlay_subnet_mask | default(defaults.vxlan.underlay.ipv6.underlay_subnet_mask) }}
{% endif %}
{% endif %}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) == 'False' %}
FABRIC_INTERFACE_TYPE: {{ vxlan.underlay.general.fabric_interface_numbering | default(defaults.vxlan.underlay.general.fabric_interface_numbering) }}
SUBNET_TARGET_MASK: {{ vxlan.underlay.general.subnet_mask | default(defaults.vxlan.underlay.general.subnet_mask) }}
{% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
FABRIC_INTERFACE_TYPE: {{ vxlan.underlay.ipv4.fabric_interface_numbering | default(defaults.vxlan.underlay.ipv4.fabric_interface_numbering) }}
SUBNET_TARGET_MASK: {{ vxlan.underlay.ipv4.subnet_mask | default(defaults.vxlan.underlay.ipv4.subnet_mask) }}
{% endif %}
LINK_STATE_ROUTING: {{ vxlan.underlay.general.routing_protocol | default(defaults.vxlan.underlay.general.routing_protocol) }}
RR_COUNT: {{ global.route_reflectors | default(defaults.vxlan.global.route_reflectors) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% if (vxlan.underlay.general.routing_protocol | default(defaults.vxlan.underlay.general.routing_protocol)) == 'ospf' %}
OSPF_AREA_ID: {{ vxlan.underlay.ospf.area_id | default(defaults.vxlan.underlay.ospf.area_id) }}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) == 'False' %}
OSPF_AUTH_ENABLE: {{ (vxlan.underlay.ospf.authentication_enable | default(defaults.vxlan.underlay.ospf.authentication_enable) | title) }}
OSPF_AUTH_ENABLE: {{ vxlan.underlay.ospf.authentication_enable | default(defaults.vxlan.underlay.ospf.authentication_enable) | title }}
{% endif %}
{% if (vxlan.underlay.ospf.authentication_enable | default(defaults.vxlan.underlay.ospf.authentication_enable) | title) == 'True' %}
OSPF_AUTH_KEY_ID: {{ vxlan.underlay.ospf.authentication_key_id | default(defaults.vxlan.underlay.ospf.authentication_key_id) }}
Expand All @@ -19,7 +19,7 @@
{% endif %}
{% elif (vxlan.underlay.general.routing_protocol | default(defaults.vxlan.underlay.general.routing_protocol)) == 'is-is' %}
ISIS_LEVEL: {{ vxlan.underlay.isis.level | default(defaults.vxlan.underlay.isis.level) }}
ISIS_AUTH_ENABLE: {{ (vxlan.underlay.isis.authentication_enable | default(defaults.vxlan.underlay.isis.authentication_enable) | title) }}
ISIS_AUTH_ENABLE: {{ vxlan.underlay.isis.authentication_enable | default(defaults.vxlan.underlay.isis.authentication_enable) | title }}
{% if (vxlan.underlay.isis.authentication_enable | default(defaults.vxlan.underlay.isis.authentication_enable) | title) == 'True' %}
ISIS_AUTH_KEYCHAIN_NAME: {{ vxlan.underlay.isis.authentication_keychain_name | default(omit) }}
ISIS_AUTH_KEYCHAIN_KEY_ID: {{ vxlan.underlay.isis.authentication_key_id | default(defaults.vxlan.underlay.isis.authentication_key_id) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{# Auto-generated NDFC DC VXLAN EVPN Replication config data structure for fabric {{ vxlan.global.name }} #}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) == 'False' %}
REPLICATION_MODE: {{ vxlan.underlay.general.replication_mode | default(defaults.vxlan.underlay.general.replication_mode) | title }}
{% endif %}
{% if (vxlan.underlay.general.replication_mode | default(defaults.vxlan.underlay.general.replication_mode) | title) == 'Multicast' %}
MULTICAST_GROUP_SUBNET: {{ vxlan.underlay.multicast.group_subnet | default(defaults.vxlan.underlay.multicast.group_subnet) }}
RP_COUNT: {{ vxlan.underlay.multicast.rendezvous_points | default(defaults.vxlan.underlay.multicast.rendezvous_points) }}
RP_MODE: {{ vxlan.underlay.multicast.rp_mode | default(defaults.vxlan.underlay.multicast.rp_mode) }}
RP_LB_ID: {{ vxlan.underlay.multicast.underlay_rp_loopback_id | default(defaults.vxlan.underlay.multicast.underlay_rp_loopback_id) }}
ENABLE_TRM: {{ (vxlan.underlay.multicast.trm_enable | default(defaults.vxlan.underlay.multicast.trm_enable) | title) }}
{% if (vxlan.underlay.multicast.trm_enable | default(defaults.vxlan.underlay.multicast.trm_enable) | title) == 'True' %}
L3VNI_MCAST_GROUP: {{ vxlan.underlay.multicast.trm_default_group | default(defaults.vxlan.underlay.multicast.trm_default_group) }}
{% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
MULTICAST_GROUP_SUBNET: {{ vxlan.underlay.multicast.ipv4.group_subnet | default(defaults.vxlan.underlay.multicast.ipv4.group_subnet) }}
ENABLE_TRM: {{ vxlan.underlay.multicast.ipv4.trm_enable | default(defaults.vxlan.underlay.multicast.ipv4.trm_enable) | title }}
{% if (vxlan.underlay.multicast.ipv4.trm_enable | default(defaults.vxlan.underlay.multicast.ipv4.trm_enable) | ansible.builtin.bool) %}
L3VNI_MCAST_GROUP: {{ vxlan.underlay.multicast.ipv4.trm_default_group | default(defaults.vxlan.underlay.multicast.ipv4.trm_default_group) }}
{% endif %}
{% if vxlan.underlay.multicast.rp_mode | default(defaults.vxlan.underlay.multicast.rp_mode) == 'bidir' %}
PHANTOM_RP_LB_ID1: {{ vxlan.underlay.multicast.underlay_primary_rp_loopback_id | default(defaults.vxlan.underlay.multicast.underlay_primary_rp_loopback_id) }}
Expand All @@ -19,4 +18,11 @@
PHANTOM_RP_LB_ID4: {{ vxlan.underlay.multicast.underlay_third_backup_rp_loopback_id | default(defaults.vxlan.underlay.multicast.underlay_third_backup_rp_loopback_id) }}
{% endif %}
{% endif %}
{% elif (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
IPv6_MULTICAST_GROUP_SUBNET: {{ vxlan.underlay.multicast.ipv6.group_subnet | default(defaults.vxlan.underlay.multicast.ipv6.group_subnet) }}
ENABLE_TRMv6: {{ vxlan.underlay.multicast.ipv6.trm_enable | default(defaults.vxlan.underlay.multicast.ipv6.trm_enable) | title }}
{% if (vxlan.underlay.multicast.ipv6.trm_enable | default(defaults.vxlan.underlay.multicast.ipv6.trm_enable) | ansible.builtin.bool) %}
L3VNI_IPv6_MCAST_GROUP: "{{ vxlan.underlay.multicast.ipv6.trm_default_group | default(defaults.vxlan.underlay.multicast.ipv6.trm_default_group) }}"
{% endif %}
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{# Auto-generated NDFC DC VXLAN EVPN Resources config data structure for fabric {{ vxlan.global.name }} #}
STATIC_UNDERLAY_IP_ALLOC: {{ (vxlan.underlay.general.manual_underlay_allocation | default(defaults.vxlan.underlay.general.manual_underlay_allocation) | title)}}
{% if (vxlan.underlay.general.manual_underlay_allocation | default(defaults.vxlan.underlay.general.manual_underlay_allocation) | title) == 'False' %}
{% if (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | title) == 'False' %}
STATIC_UNDERLAY_IP_ALLOC: {{ vxlan.underlay.general.manual_underlay_allocation | default(defaults.vxlan.underlay.general.manual_underlay_allocation) | title }}
{% if not (vxlan.underlay.general.manual_underlay_allocation | default(defaults.vxlan.underlay.general.manual_underlay_allocation) | ansible.builtin.bool) %}
{% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool ) %}
LOOPBACK0_IP_RANGE: {{ vxlan.underlay.ipv4.underlay_routing_loopback_ip_range | default(defaults.vxlan.underlay.ipv4.underlay_routing_loopback_ip_range) }}
LOOPBACK1_IP_RANGE: {{ vxlan.underlay.ipv4.underlay_vtep_loopback_ip_range | default(defaults.vxlan.underlay.ipv4.underlay_vtep_loopback_ip_range) }}
SUBNET_RANGE: {{ vxlan.underlay.ipv4.underlay_subnet_ip_range | default(defaults.vxlan.underlay.ipv4.underlay_subnet_ip_range) }}
{% endif %}
ANYCAST_RP_IP_RANGE: {{ vxlan.underlay.ipv4.underlay_rp_loopback_ip_range | default(defaults.vxlan.underlay.ipv4.underlay_rp_loopback_ip_range) }}
{% elif (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool ) %}
LOOPBACK0_IPV6_RANGE: {{ vxlan.underlay.ipv6.underlay_routing_loopback_ip_range | default(defaults.vxlan.underlay.ipv6.underlay_routing_loopback_ip_range) }}
LOOPBACK1_IPV6_RANGE: {{ vxlan.underlay.ipv6.underlay_vtep_loopback_ip_range | default(defaults.vxlan.underlay.ipv6.underlay_vtep_loopback_ip_range) }}
IPv6_ANYCAST_RP_IP_RANGE: {{ vxlan.underlay.ipv6.underlay_rp_loopback_ip_range | default(defaults.vxlan.underlay.ipv6.underlay_rp_loopback_ip_range) }}
{% if not (vxlan.underlay.ipv6.enable_ipv6_link_local_address | default(defaults.vxlan.underlay.ipv6.enable_ipv6_link_local_address) | ansible.builtin.bool) %}
V6_SUBNET_RANGE: {{ vxlan.underlay.ipv6.underlay_subnet_ip_range | default(defaults.vxlan.underlay.ipv6.underlay_subnet_ip_range) }}
{% endif %}
{% endif %}
{% endif %}
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
{# Auto-generated NDFC DC VXLAN EVPN Security config data structure for fabric {{ vxlan.global.name }} #}
ENABLE_SGT: false
{% if not (vxlan.underlay.general.enable_ipv6_underlay | default(defaults.vxlan.underlay.general.enable_ipv6_underlay) | ansible.builtin.bool) %}
ENABLE_SGT: false
{% endif %}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
VPC_PEER_LINK_PO: {{ global.vpc.peer_link_port_channel_id | default(defaults.vxlan.global.vpc.peer_link_port_channel_id) }}
VPC_DOMAIN_ID_RANGE: {{ global.vpc.domain_id_range | default(defaults.vxlan.global.vpc.domain_id_range) }}
VPC_DELAY_RESTORE: {{ global.vpc.delay_restore_time | default(defaults.vxlan.global.vpc.delay_restore_time) }}
ADVERTISE_PIP_BGP: {{ (global.vpc.advertise_pip | default(defaults.vxlan.global.vpc.advertise_pip) | title) }}
ADVERTISE_PIP_BGP: {{ global.vpc.advertise_pip | default(defaults.vxlan.global.vpc.advertise_pip) | title }}
{% if (global.vpc.advertise_pip | default(defaults.vxlan.global.vpc.advertise_pip) | title) == 'False' %}
ADVERTISE_PIP_ON_BORDER: {{ global.vpc.advertise_pip_border_only | default(defaults.vxlan.global.vpc.advertise_pip_border_only) | title }}
{% endif %}
21 changes: 15 additions & 6 deletions roles/validate/files/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ factory_defaults:
routing_protocol: ospf
enable_ipv6_underlay: false
replication_mode: multicast
fabric_interface_numbering: p2p
subnet_mask: 30
manual_underlay_allocation: false
underlay_routing_loopback_id: 0
underlay_vtep_loopback_id: 1
Expand All @@ -124,13 +122,19 @@ factory_defaults:
layer2_host_interfacde_mtu: 9216
unshut_host_interfaces: true
ipv4:
fabric_interface_numbering: p2p
subnet_mask: 30
underlay_routing_loopback_ip_range: 10.2.0.0/22
underlay_vtep_loopback_ip_range: 10.3.0.0/22
underlay_rp_loopback_ip_range: 10.254.254.0/24
underlay_subnet_ip_range: 10.4.0.0/16
ipv6:
enable_ipv6_link_local_address: true
underlay_subnet_mask: 126
underlay_routing_loopback_ip_range: fd00::a02:0/119
underlay_vtep_loopback_ip_range: fd00::a03:0/118
underlay_rp_loopback_ip_range: fd00::254:254:0/118
underlay_subnet_ip_range: fd00::a04:0/112
ospf:
area_id: 0.0.0.0
authentication_enable: false
Expand All @@ -146,12 +150,17 @@ factory_defaults:
authentication_enable: false
authentication_key_type: 3
multicast:
group_subnet: 239.1.1.0/25
rendezvous_points: 2
rp_mode: asm
underlay_rp_loopback_id: 254
trm_enable: false
trm_default_group: 239.1.1.0
ipv4:
group_subnet: 239.1.1.0/25
trm_enable: false
trm_default_group: 239.1.1.0
ipv6:
group_subnet: ff1e::/121
trm_enable: false
trm_default_group: "ff1e::" # Quote due to ending in colon to avoid YAML error
underlay_primary_rp_loopback_id: 2
underlay_backup_rp_loopback_id: 3
underlay_second_backup_rp_loopback_id: 4
Expand Down Expand Up @@ -280,4 +289,4 @@ factory_defaults:
as_override: false
route_reflector_client: false
default_originate: false
next_hop_self: false
next_hop_self: false
Loading