Changeset 13673 in genesis


Ignore:
Timestamp:
Dec 24, 2016, 3:06:09 PM (6 years ago)
Author:
rick
Message:

No duplicated vlan entries and stable output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13648 r13673  
    903903
    904904  (addrs_list, vlan_list, bridge_list, dhclient_if, flags_if, extra_ouput) = make_interface_list(datadump)
    905   for iface, vlans in vlan_list.items():
    906     output += 'vlans_%s="%s"\n' % (iface, ' '.join(vlans))
     905  for iface, vlans in sorted(vlan_list.items()):
     906    output += 'vlans_%s="%s"\n' % (iface, ' '.join(sorted(set(vlans))))
    907907
    908908  # VLAN Parent interfaces not containing a configuration should be marked active explcitly.
    909   for iface in vlan_list.keys():
     909  for iface in sorted(vlan_list.keys()):
    910910    if not iface in addrs_list.keys():
    911911      output += "ifconfig_%s='up'\n" % iface
Note: See TracChangeset for help on using the changeset viewer.