Skip to content

Commit

Permalink
Enable additional fabric params (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewiebe authored Apr 15, 2024
1 parent e8c3a65 commit 070ca2b
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 71 deletions.
146 changes: 76 additions & 70 deletions roles/dtc/common/templates/ndfc_create_fabric.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,75 +13,81 @@
{% set bgp = underlay.bgp %}
{% set isis = underlay.isis %}
{% set ospf = underlay.ospf %}
- FABRIC_NAME: "{{ global.name }}"
BGP_AS: "{{ global.bgp_asn }}"
FABRIC_TYPE: "VXLAN_EVPN"
OVERLAY_MODE: "cli"
REPLICATION_MODE: "{{ underlay.general.replication_mode | default(defaults.fabric.underlay.general.replication_mode) | title }}"
DEPLOY: "False"
- FABRIC_NAME: {{ global.name }}
BGP_AS: {{ global.bgp_asn }}
FABRIC_TYPE: VXLAN_EVPN
OVERLAY_MODE: cli
DEPLOY: True
GRFIELD_DEBUG_FLAG: Enable
AAA_REMOTE_IP_ENABLED: False
RR_COUNT: {{ global.route_reflectors | default(defaults.fabric.global.route_reflectors) }}
ANYCAST_GW_MAC: {{ global.anycast_gateway_mac | default(omit) }}
VPC_PEER_LINK_VLAN: {{ vpc.peer_link_vlan | default(omit) }}
VPC_PEER_LINK_VLAN: {{ vpc.peer_link_vlan | default(omit) }}
VPC_PEER_KEEP_ALIVE_OPTION: {{ vpc.peer_keep_alive | default(defaults.fabric.global.vpc.peer_keep_alive) }}
VPC_AUTO_RECOVERY_TIME: {{ vpc.auto_recovery_time | default(defaults.fabric.global.vpc.auto_recovery_time) }}
VPC_DELAY_RESTORE_TIME: {{ vpc.delay_restore_time | default(defaults.fabric.global.vpc.delay_restore_time) }}
VPC_PEER_LINK_PO: {{ vpc.peer_link_port_channel_id | default(defaults.fabric.global.vpc.peer_link_port_channel_id) }}
ENABLE_FABRIC_VPC_DOMAIN_ID: False
VPC_DOMAIN_ID_RANGE: {{ vpc.domain_id_range | default(defaults.fabric.global.vpc.domain_id_range) }}
LINK_STATE_ROUTING: {{ underlay.general.routing_protocol | default(defaults.fabric.underlay.general.routing_protocol) }}
UNDERLAY_IS_V6: False
FABRIC_INTERFACE_TYPE: {{ underlay.general.fabric_interface_numbering | default(defaults.fabric.underlay.general.fabric_interface_numbering) }}
SUBNET_TARGET_MASK: {{ underlay.general.subnet_mask | default(defaults.fabric.underlay.general.subnet_mask) }}
REPLICATION_MODE: {{ underlay.general.replication_mode | default(defaults.fabric.underlay.general.replication_mode) | title }}
{% if (underlay.general.replication_mode | title) == 'Multicast' %}
MULTICAST_GROUP_SUBNET: {{ multicast.group_subnet | default(defaults.fabric.underlay.multicast.group_subnet) }}
RP_COUNT: {{ multicast.rendezvous_points | default(defaults.fabric.underlay.multicast.rendezvous_points) }}
{% endif %}
{#
GRFIELD_DEBUG_FLAG: "Enable"
RR_COUNT: "{{ global.route_reflectors | default(defaults.fabric.global.route_reflectors) }}"
ANYCAST_GW_MAC: "{{ global.anycast_gateway_mac | default(omit) }}"
VPC_PEER_LINK_VLAN: "{{ vpc.peer_link_vlan | default(omit) }}"
VPC_PEER_KEEP_ALIVE_OPTION: "{{ vpc.peer_keep_alive | default(defaults.fabric.global.vpc.peer_keep_alive) }}"
VPC_AUTO_RECOVERY_TIME: "{{ vpc.auto_recovery_time | default(defaults.fabric.global.vpc.auto_recovery_time) }}"
VPC_DELAY_RESTORE_TIME: "{{ vpc.delay_restore_time | default(defaults.fabric.global.vpc.delay_restore_time) }}"
VPC_PEER_LINK_PO: "{{ vpc.peer_link_port_channel_id | default(defaults.fabric.global.vpc.peer_link_port_channel_id) }}"
VPC_DOMAIN_ID_RANGE: "{{ vpc.domain_id_range | default(defaults.fabric.global.vpc.domain_id_range) }}"
LINK_STATE_ROUTING: "{{ underlay.general.routing_protocol | default(defaults.fabric.underlay.general.routing_protocol) }}"
FABRIC_INTERFACE_TYPE: "{{ underlay.general.fabric_interface_numbering | default(defaults.fabric.underlay.general.fabric_interface_numbering) }}"
SUBNET_TARGET_MASK: "{{ underlay.general.subnet_mask | default(defaults.fabric.underlay.general.subnet_mask) }}"
MULTICAST_GROUP_SUBNET: "{{ multicast.group_subnet | default(defaults.fabric.underlay.multicast.group_subnet) }}"
RP_COUNT: "{{ multicast.rendezvous_points | default(defaults.fabric.underlay.multicast.rendezvous_points) }}"
RP_MODE: "{{ multicast.rp_mode | default(defaults.fabric.underlay.multicast.rp_mode) }}"
RP_LB_ID: "{{ multicast.underlay_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_rp_loopback_id) }}"
VPC_DELAY_RESTORE: "{{ vpc.delay_restore_time | default(defaults.fabric.global.vpc.delay_restore_time) }}"
BGP_LB_ID: "{{ underlay.general.underlay_routing_loopback_id | default(defaults.fabric.underlay.general.underlay_routing_loopback_id) }}"
NVE_LB_ID: "{{ underlay.general.underlay_vtep_loopback_id | default(defaults.fabric.underlay.general.underlay_vtep_loopback_id) }}"
LINK_STATE_ROUTING_TAG: "{{ underlay.general.underlay_routing_protocol_tag | default(defaults.fabric.underlay.general.underlay_routing_protocol_tag) }}"
OSPF_AREA_ID: "{{ ospf.area_id | default(defaults.fabric.underlay.ospf.area_id) }}"
OSPF_AUTH_KEY: "{{ ospf.authentication_key | default(omit) }}"
ISIS_LEVEL: "{{ isis.level | default(defaults.fabric.underlay.isis.level) }}"
ISIS_AUTH_KEYCHAIN_NAME: "{{ isis.authentication_key | default(omit) }}"
BGP_AUTH_KEY_TYPE: "{{ bgp.authentication_key_type | default(omit) }}"
BGP_AUTH_KEY: "{{ bgp.authentication_key | default(omit) }}"
BFD_AUTH_KEY: "{{ bfd.authentication_key | default(omit) }}"
FABRIC_MTU: "{{ underlay.general.intra_fabric_interface_mtu | default(defaults.fabric.underlay.general.intra_fabric_interface_mtu) }}"
L2_HOST_INTF_MTU: "{{ underlay.general.layer2_host_interfacde_mtu | default(defaults.fabric.underlay.general.layer2_host_interfacde_mtu) }}"
LOOPBACK0_IP_RANGE: "{{ ipv4.underlay_routing_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_routing_loopback_ip_range) }}"
LOOPBACK1_IP_RANGE: "{{ ipv4.underlay_vtep_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_vtep_loopback_ip_range) }}"
ANYCAST_RP_IP_RANGE: "{{ ipv4.underlay_rp_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_rp_loopback_ip_range) }}"
SUBNET_RANGE: "{{ ipv4.underlay_subnet_ip_range | default(defaults.fabric.underlay.ipv4.underlay_subnet_ip_range) }}"
DNS_SERVER_IP_LIST: "{{ global.dns_servers.ip_address | default(omit) }}"
DNS_SERVER_VRF: "{{ global.dns_servers.vrf | default(omit) }}"
NTP_SERVER_IP_LIST: "{{ global.ntp_servers.ip_address | default(omit) }}"
NTP_SERVER_VRF: "{{ global.ntp_servers.vrf | default(omit) }}"
ENABLE_NETFLOW: "{{ MD.fabric.overlay_services.vrfs.neflow_enable | default(omit) }}"
NETFLOW_MONITOR_LIST: "{{ MD.fabric.overlay_services.vrfs.netflow_monitor | default(omit) }}"
BGP_AUTH_ENABLE: "{{ underlay.bgp.authentication_enable | default(defaults.fabric.underlay.bgp.authentication_enable) }}"
ISIS_OVERLOAD_ENABLE: "{{ underlay.isis.overload_bit | default(defaults.fabric.underlay.isis.overload_bit) }}"
ENABLE_TRM: "{{ underlay.multicast.trm_enable | default(defaults.fabric.underlay.multicast.trm_enable) }}"
BFD_IBGP_ENABLE: "{{ underlay.bfd.ibgp | default(defaults.fabric.underlay.bfd.ibgp) }}"
BFD_OSPF_ENABLE: "{{ underlay.bfd.ospf | default(defaults.fabric.underlay.bfd.ospf) }}"
ISIS_P2P_ENABLE: "{{ underlay.isis.network_point_to_point | default(defaults.fabric.underlay.isis.network_point_to_point) }}"
BFD_ENABLE: "{{ underlay.bfd.enable | default(defaults.fabric.underlay.bfd.enable) }}"
USE_LINK_LOCAL: "{{ ipv6.enable_ipv6_link_local_address | default(defaults.fabric.underlay.ipv6.enable_ipv6_link_local_address) }}"
BFD_PIM_ENABLE: "{{ underlay.bfd.pim | default(defaults.fabric.underlay.bfd.pim) }}"
ADVERTISE_PIP_ON_BORDER: "{{ global.vpc.advertise_pip_border_only | default(defaults.fabric.global.vpc.advertise_pip_border_only) }}"
UNDERLAY_IS_V6: "{{ underlay.general.enable_ipv6_underlay | default(defaults.fabric.underlay.general.enable_ipv6_underlay) }}"
ISIS_AUTH_ENABLE: "{{ underlay.isis.authentication_enable | default(defaults.fabric.underlay.isis.authentication_enable) }}"
V6_SUBNET_TARGET_MASK: "{{ underlay.ipv6.underlay_subnet_mask | default(defaults.fabric.underlay.ipv6.underlay_subnet_mask) }}"
BFD_ISIS_ENABLE: "{{ underlay.bfd.isis | default(defaults.fabric.underlay.bfd.isis) }}"
BFD_AUTH_KEY_ID: "{{ underlay.bfd.authentication_key_id | default(omit) }}"
OSPF_AUTH_ENABLE: "{{ underlay.ospf.authentication_enable | default(omit) }}"
BFD_AUTH_ENABLE: "{{ underlay.bfd.authentication_enable | default(defaults.fabric.underlay.bfd.authentication_enable) }}"
HOST_INTF_ADMIN_STATE: "{{ underlay.general.unshut_host_interfaces | default(defaults.fabric.underlay.general.unshut_host_interfaces) }}"
ISIS_AUTH_KEYCHAIN_KEY_ID: "{{ underlay.isis.authentication_key_id | default(omit) }}"
PHANTOM_RP_LB_ID1: "{{ underlay.multicast.underlay_primary_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_primary_rp_loopback_id) }}"
PHANTOM_RP_LB_ID2: "{{ underlay.multicast.underlay_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_backup_rp_loopback_id) }}"
PHANTOM_RP_LB_ID3: "{{ underlay.multicast.underlay_second_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_second_backup_rp_loopback_id) }}"
PHANTOM_RP_LB_ID4: "{{ underlay.multicast.underlay_third_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_third_backup_rp_loopback_id) }}"
OSPF_AUTH_KEY_ID: "{{ underlay.ospf.authentication_key_id | default(omit) }}"
ISIS_OVERLOAD_ELAPSE_TIME: "{{ underlay.isis.overload_bit_elapsed_time | default(defaults.fabric.underlay.isis.overload_bit_elapsed_time) }}"
RP_MODE: {{ multicast.rp_mode | default(defaults.fabric.underlay.multicast.rp_mode) }}
RP_LB_ID: {{ multicast.underlay_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_rp_loopback_id) }}
VPC_DELAY_RESTORE: {{ vpc.delay_restore_time | default(defaults.fabric.global.vpc.delay_restore_time) }}
BGP_LB_ID: {{ underlay.general.underlay_routing_loopback_id | default(defaults.fabric.underlay.general.underlay_routing_loopback_id) }}
NVE_LB_ID: {{ underlay.general.underlay_vtep_loopback_id | default(defaults.fabric.underlay.general.underlay_vtep_loopback_id) }}
LINK_STATE_ROUTING_TAG: {{ underlay.general.underlay_routing_protocol_tag | default(defaults.fabric.underlay.general.underlay_routing_protocol_tag) }}
OSPF_AREA_ID: {{ ospf.area_id | default(defaults.fabric.underlay.ospf.area_id) }}
OSPF_AUTH_KEY: {{ ospf.authentication_key | default(omit) }}
ISIS_LEVEL: {{ isis.level | default(defaults.fabric.underlay.isis.level) }}
ISIS_AUTH_KEYCHAIN_NAME: {{ isis.authentication_key | default(omit) }}
BGP_AUTH_KEY_TYPE: {{ bgp.authentication_key_type | default(omit) }}
BGP_AUTH_KEY: {{ bgp.authentication_key | default(omit) }}
BFD_AUTH_KEY: {{ bfd.authentication_key | default(omit) }}
FABRIC_MTU: {{ underlay.general.intra_fabric_interface_mtu | default(defaults.fabric.underlay.general.intra_fabric_interface_mtu) }}
L2_HOST_INTF_MTU: {{ underlay.general.layer2_host_interfacde_mtu | default(defaults.fabric.underlay.general.layer2_host_interfacde_mtu) }}
LOOPBACK0_IP_RANGE: {{ ipv4.underlay_routing_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_routing_loopback_ip_range) }}
LOOPBACK1_IP_RANGE: {{ ipv4.underlay_vtep_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_vtep_loopback_ip_range) }}
ANYCAST_RP_IP_RANGE: {{ ipv4.underlay_rp_loopback_ip_range | default(defaults.fabric.underlay.ipv4.underlay_rp_loopback_ip_range) }}
SUBNET_RANGE: {{ ipv4.underlay_subnet_ip_range | default(defaults.fabric.underlay.ipv4.underlay_subnet_ip_range) }}
DNS_SERVER_IP_LIST: {{ global.dns_servers.ip_address | default(omit) }}
DNS_SERVER_VRF: {{ global.dns_servers.vrf | default(omit) }}
NTP_SERVER_IP_LIST: {{ global.ntp_servers.ip_address | default(omit) }}
NTP_SERVER_VRF: {{ global.ntp_servers.vrf | default(omit) }}
ENABLE_NETFLOW: {{ MD.fabric.overlay_services.vrfs.neflow_enable | default(omit) }}
NETFLOW_MONITOR_LIST: {{ MD.fabric.overlay_services.vrfs.netflow_monitor | default(omit) }}
BGP_AUTH_ENABLE: {{ underlay.bgp.authentication_enable | default(defaults.fabric.underlay.bgp.authentication_enable) }}
ISIS_OVERLOAD_ENABLE: {{ underlay.isis.overload_bit | default(defaults.fabric.underlay.isis.overload_bit) }}
ENABLE_TRM: {{ underlay.multicast.trm_enable | default(defaults.fabric.underlay.multicast.trm_enable) }}
BFD_IBGP_ENABLE: {{ underlay.bfd.ibgp | default(defaults.fabric.underlay.bfd.ibgp) }}
BFD_OSPF_ENABLE: {{ underlay.bfd.ospf | default(defaults.fabric.underlay.bfd.ospf) }}
ISIS_P2P_ENABLE: {{ underlay.isis.network_point_to_point | default(defaults.fabric.underlay.isis.network_point_to_point) }}
BFD_ENABLE: {{ underlay.bfd.enable | default(defaults.fabric.underlay.bfd.enable) }}
USE_LINK_LOCAL: {{ ipv6.enable_ipv6_link_local_address | default(defaults.fabric.underlay.ipv6.enable_ipv6_link_local_address) }}
BFD_PIM_ENABLE: {{ underlay.bfd.pim | default(defaults.fabric.underlay.bfd.pim) }}
ADVERTISE_PIP_ON_BORDER: {{ global.vpc.advertise_pip_border_only | default(defaults.fabric.global.vpc.advertise_pip_border_only) }}
UNDERLAY_IS_V6: {{ underlay.general.enable_ipv6_underlay | default(defaults.fabric.underlay.general.enable_ipv6_underlay) }}
ISIS_AUTH_ENABLE: {{ underlay.isis.authentication_enable | default(defaults.fabric.underlay.isis.authentication_enable) }}
V6_SUBNET_TARGET_MASK: {{ underlay.ipv6.underlay_subnet_mask | default(defaults.fabric.underlay.ipv6.underlay_subnet_mask) }}
BFD_ISIS_ENABLE: {{ underlay.bfd.isis | default(defaults.fabric.underlay.bfd.isis) }}
BFD_AUTH_KEY_ID: {{ underlay.bfd.authentication_key_id | default(omit) }}
OSPF_AUTH_ENABLE: {{ underlay.ospf.authentication_enable | default(omit) }}
BFD_AUTH_ENABLE: {{ underlay.bfd.authentication_enable | default(defaults.fabric.underlay.bfd.authentication_enable) }}
HOST_INTF_ADMIN_STATE: {{ underlay.general.unshut_host_interfaces | default(defaults.fabric.underlay.general.unshut_host_interfaces) }}
ISIS_AUTH_KEYCHAIN_KEY_ID: {{ underlay.isis.authentication_key_id | default(omit) }}
PHANTOM_RP_LB_ID1: {{ underlay.multicast.underlay_primary_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_primary_rp_loopback_id) }}
PHANTOM_RP_LB_ID2: {{ underlay.multicast.underlay_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_backup_rp_loopback_id) }}
PHANTOM_RP_LB_ID3: {{ underlay.multicast.underlay_second_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_second_backup_rp_loopback_id) }}
PHANTOM_RP_LB_ID4: {{ underlay.multicast.underlay_third_backup_rp_loopback_id | default(defaults.fabric.underlay.multicast.underlay_third_backup_rp_loopback_id) }}
OSPF_AUTH_KEY_ID: {{ underlay.ospf.authentication_key_id | default(omit) }}
ISIS_OVERLOAD_ELAPSE_TIME: {{ underlay.isis.overload_bit_elapsed_time | default(defaults.fabric.underlay.isis.overload_bit_elapsed_time) }}
#}
4 changes: 3 additions & 1 deletion roles/dtc/create/tasks/fabric.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
- "+ Manage Fabric {{ MD.fabric.global.name }}"
- "----------------------------------------------------------------"

- name: Create fabric {{ MD.fabric.global.name }} in NDFC
- debug: msg="{{ fabric_config }}"

- name: Manage fabric {{ MD.fabric.global.name }} in NDFC
cisco.dcnm.dcnm_fabric:
state: merged
config: "{{ fabric_config }}"

0 comments on commit 070ca2b

Please sign in to comment.