Skip to content

Commit

Permalink
Set device type to BackEnd if enable_compute_ai_deployment is true (#…
Browse files Browse the repository at this point in the history
…14131)

* Init commit

* Also modify neighbor device type
  • Loading branch information
wsycqyz committed Aug 16, 2024
1 parent 9f5b268 commit d05c354
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ansible/templates/minigraph_png.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,17 @@
{% endif %}
</DeviceInterfaceLinks>
<Devices>
{% if enable_compute_ai_deployment|default('false')|bool %}
{% if vm_topo_config['dut_type'] | lower == 'torrouter' %}
<Device i:type="BackEndToRRouter">
{% elif vm_topo_config['dut_type'] | lower == 'leafrouter' %}
<Device i:type="BackEndLeafRouter">
{% else %}
<Device i:type="{{ vm_topo_config['dut_type'] }}">
{% endif %}
{% else %}
<Device i:type="{{ vm_topo_config['dut_type'] }}">
{% endif %}
<Hostname>{{ inventory_hostname }}</Hostname>
<HwSku>{{ hwsku }}</HwSku>
{% if 'loopback' in dual_tor_facts %}
Expand Down Expand Up @@ -189,6 +199,8 @@
{% if vm_topo_config['vm'][dev]['intfs'][dut_index|int]|length %}
{% if 'properties' in vm_topo_config['vm'][dev] and 'device_type' in vm_topo_config['vm'][dev]['properties'] %}
{% set dev_type = vm_topo_config['vm'][dev]['properties']['device_type'] %}
{% elif ('T1' in dev) and (enable_compute_ai_deployment|default('false')|bool) %}
{% set dev_type = 'BackEndLeafRouter' %}
{% elif 'T1' in dev %}
{% set dev_type = 'LeafRouter' %}
{% elif 'T2' in dev %}
Expand All @@ -199,6 +211,8 @@
{% else %}
{% set dev_type = 'AZNGHub' %}
{% endif %}
{% elif ('T0' in dev) and (enable_compute_ai_deployment|default('false')|bool) %}
{% set dev_type = 'BackEndToRRouter' %}
{% elif 'T0' in dev %}
{% set dev_type = 'ToRRouter' %}
{% elif 'M1' in dev %}
Expand Down

0 comments on commit d05c354

Please sign in to comment.