-
Notifications
You must be signed in to change notification settings - Fork 1k
[multi-dut] Support for gen-mg to work with multi-dut where VM's connect to only a single host and supervisor card #2700
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
Changes from all commits
ef8c747
e33501c
b665199
933c5cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| <DeviceDataPlaneInfo> | ||
| <IPSecTunnels/> | ||
| <LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"> | ||
| {% if type is not defined or type != 'supervisor' %} | ||
| <a:LoopbackIPInterface> | ||
| <Name>HostIP</Name> | ||
| <AttachTo>Loopback0</AttachTo> | ||
|
|
@@ -39,6 +40,7 @@ | |
| </a:LoopbackIPInterface> | ||
| {%- endfor -%} | ||
| {%- endif -%} | ||
| {% endif %} | ||
| </LoopbackIPInterfaces> | ||
| <ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"> | ||
| <a:ManagementIPInterface> | ||
|
|
@@ -106,9 +108,10 @@ | |
| </VlanInterfaces> | ||
| <IPInterfaces> | ||
| {% for index in range(vms_number) %} | ||
| {% if vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int] is not none %} | ||
| <IPInterface> | ||
| <Name i:nil="true"/> | ||
| {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf']|lower %} | ||
| {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} | ||
| <AttachTo>PortChannel{{ ((index+1) |string).zfill(4) }}</AttachTo> | ||
| {% else %} | ||
| <AttachTo>{{ port_alias[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }}</AttachTo> | ||
|
|
@@ -117,13 +120,14 @@ | |
| </IPInterface> | ||
| <IPInterface> | ||
| <Name i:Name="true"/> | ||
| {% if 'port-channel' in (vm_topo_config['vm'][vms[index]]['ip_intf']|lower) %} | ||
| {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} | ||
sanmalho-git marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <AttachTo>PortChannel{{ ((index+1) |string).zfill(4) }}</AttachTo> | ||
| {% else %} | ||
| <AttachTo>{{ port_alias[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }}</AttachTo> | ||
| {% endif %} | ||
| <Prefix>{{ vm_topo_config['vm'][vms[index]]['bgp_ipv6'][dut_index|int] }}/{{ vm_topo_config['vm'][vms[index]]['ipv6mask'][dut_index|int] }}</Prefix> | ||
| </IPInterface> | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% if 'tor' in vm_topo_config['dut_type'] | lower %} | ||
| {% for vlan, vlan_param in vlan_configs.items() %} | ||
|
|
@@ -146,6 +150,7 @@ | |
| </IPInterfaces> | ||
| <DataAcls/> | ||
| <AclInterfaces> | ||
| {% if type is not defined or type != 'supervisor' %} | ||
| <AclInterface> | ||
| <InAcl>SNMP_ACL</InAcl> | ||
| <AttachTo>SNMP</AttachTo> | ||
|
|
@@ -169,20 +174,27 @@ | |
| {% if enable_data_plane_acl|default('true')|bool %} | ||
| <AclInterface> | ||
| <AttachTo> | ||
| {%- set acl_intfs = [] -%} | ||
| {%- for index in range(vms_number) %} | ||
| {% if 'port-channel' in vm_topo_config['vm'][vms[index]]['ip_intf'][dut_index|int]|lower %} | ||
| PortChannel{{ ((index+1) |string).zfill(4) }}{% if not loop.last %};{% endif %} | ||
| {% set a_intf = 'PortChannel' + ((index+1) |string).zfill(4) %} | ||
|
||
| {{- acl_intfs.append(a_intf) -}} | ||
| {% endif %} | ||
| {% endfor %} | ||
| {% for index in range(vms_number) %} | ||
| {% if 'port-channel' not in vm_topo_config['vm'][vms[index]]['ip_intf']|lower %} | ||
| {{ port_alias[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] }}{% if not loop.last %};{% endif %} | ||
| {% if vm_topo_config['vm'][vms[index]]['intfs'][dut_index|int]|length %} | ||
| {% set a_intf = port_alias[vm_topo_config['vm'][vms[index]]['interface_indexes'][dut_index|int][0]] %} | ||
| {{- acl_intfs.append(a_intf) -}} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endfor -%} | ||
| {{- acl_intfs|join(';') -}} | ||
| </AttachTo> | ||
| <InAcl>DataAcl</InAcl> | ||
| <Type>DataPlane</Type> | ||
| </AclInterface> | ||
| {% endif %} | ||
| {% endif %} | ||
| </AclInterfaces> | ||
| <DownstreamSummaries/> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.