Skip to content

Commit 8097fed

Browse files
authored
Fix msd without child (#469)
* Update ndfc_bgw_anycast_vip.j2 * Update sub_main_msd.yml * Update networks.yml * Update vrfs.yml * Update networks.yml * Update vrfs.yml * Update sub_main_msd.yml
1 parent 765334d commit 8097fed

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

roles/dtc/common/templates/ndfc_bgw_anycast_vip.j2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
{% set anycast_lo_id = vxlan.multisite.vtep_loopback_id | default(defaults.vxlan.multisite.vtep_loopback_id) %}
66

7+
{% if vxlan.multisite.child_fabrics is defined and vxlan.multisite.child_fabrics is iterable %}
78
{% for fabric in vxlan.multisite.child_fabrics %}
89
{% if fabric.bgw_anycast_vip_ipv4 is defined %}
910
- entity_name: "{{ fabric.name }}"
@@ -12,4 +13,5 @@
1213
scope_type: fabric
1314
resource: "{{ fabric.bgw_anycast_vip_ipv4 }}"
1415
{% endif %}
15-
{% endfor %}
16+
{% endfor %}
17+
{% endif %}

roles/dtc/deploy/tasks/sub_main_msd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
ansible_command_timeout: 3000
5656
ansible_connect_timeout: 3000
5757
when: >
58-
(MD_Extended.vxlan.fabric.type == 'ISN' and (MD_Extended.vxlan.topology.switches is defined and MD_Extended.vxlan.topology.switches | length > 0)) or
59-
MD_Extended.vxlan.fabric.type == 'MSD'
58+
(MD_Extended.vxlan.fabric.type == 'MSD' and
59+
MD_Extended.vxlan.topology.child_fabrics is defined and
60+
MD_Extended.vxlan.topology.child_fabrics | length > 0)
6061
# TODO: Need to add logic to only deploy if changes are made
6162

6263
- name: Config-Save For Child Fabrics

roles/dtc/remove/tasks/msd/networks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
- multisite_network_delete_mode is defined
7171
- multisite_network_delete_mode is true | bool
7272
- vars_common_msd.changes_detected_networks
73+
- MD_Extended.vxlan.multisite.child_fabrics is defined and MD_Extended.vxlan.multisite.child_fabrics | length > 0
7374

7475
- ansible.builtin.debug:
7576
msg:

roles/dtc/remove/tasks/msd/vrfs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
- multisite_vrf_delete_mode is defined
7171
- multisite_vrf_delete_mode is true | bool
7272
- vars_common_msd.changes_detected_vrfs
73+
- MD_Extended.vxlan.multisite.child_fabrics is defined and MD_Extended.vxlan.multisite.child_fabrics | length > 0
7374

7475
- ansible.builtin.debug:
7576
msg:

0 commit comments

Comments
 (0)