Skip to content
Merged
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
2 changes: 1 addition & 1 deletion ansible/roles/vm_set/library/vm_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def init(self, vm_set_name, vm_base, duts_fp_ports, duts_name, ptf_exists=True,
self.pid = None

self.VMs = {}
if 'VMs' in self.topo:
if 'VMs' in self.topo and len(self.topo['VMs']) > 0:
self.vm_base = vm_base
if vm_base in self.vm_names:
self.vm_base_index = self.vm_names.index(vm_base)
Expand Down
6 changes: 4 additions & 2 deletions ansible/templates/minigraph_dpg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@
<Type>EverflowV6</Type>
</AclInterface>
{% if enable_data_plane_acl|default('true')|bool and vm_topo_config['topo_type'] != 'wan' %}
<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 %}
Expand All @@ -287,13 +285,17 @@
{% endif %}
{% endif %}
{% endfor -%}
{%- if acl_intfs | length > 0 -%}
<AclInterface>
<AttachTo>
{{- acl_intfs|join(';') -}}
</AttachTo>
<InAcl>DataAcl</InAcl>
<Type>DataPlane</Type>
</AclInterface>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</AclInterfaces>
<DownstreamSummaries/>
Expand Down