Changeset 8297 in genesis for nodes


Ignore:
Timestamp:
Aug 10, 2010, 1:56:57 PM (14 years ago)
Author:
rick
Message:

Rewrote into more readable format and assigned to right key

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nodes/gformat.py

    r8296 r8297  
    196196  addrs_list = { 'lo0' : ["127.0.0.1/8", "172.31.255.1/32"] }
    197197  iface_map = {'lo0' : 'lo0'}
    198   if not any([datadump[iface_key]['ip'].startswith(datadump['masterip']) \
    199     for iface_key in datadump['iface_keys']]):
    200     lo0_addrs.append(datadump['masterip'] + "/32")
     198
     199  masterip_used = False
     200  for iface_key in datadump['iface_keys']:
     201    if datadump[iface_key]['ip'].startswith(datadump['masterip']):
     202      masterip_used = True
     203      break
     204  if not masterip_used:
     205    addrs_list['lo0'].append(datadump['masterip'] + "/32")
    201206
    202207  wlan_count = 0
Note: See TracChangeset for help on using the changeset viewer.