Changeset 12480 in genesis


Ignore:
Timestamp:
Oct 18, 2013, 8:46:19 PM (11 years ago)
Author:
rick
Message:

Vieze 'truc' op static IP voor een MAC uit te delen.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nodes/HybridMeerburg/wleiden.yaml

    r12478 r12480  
    2020service_proxy_ileiden: True
    2121service_proxy_normal: True
     22no_portal : ['58:12:43:AA:6E:D6']
    2223status    : "up"
    2324
  • tools/gformat.py

    r12478 r12480  
    523523    datadump[iface_key]['autogen_dhcp_start'] = dhcp_part + "." + dhcp_start
    524524    datadump[iface_key]['autogen_dhcp_stop'] =  dhcp_part + "." + dhcp_stop
     525
     526    # Assume the first 10 IPs could be used for static entries
     527    if 'no_portal' in datadump:
     528      fixed = 5
     529      for mac in datadump['no_portal']:
     530        dhcp_out[ifname].append("""\
     531   host fixed-%(ifname)s-%(fixed)s {
     532     hardware ethernet %(mac)s;
     533     fixed-address %(prefix)s.%(fixed)s;
     534   }
     535""" % { 'ifname' : ifname, 'mac' : mac, 'prefix': dhcp_part, 'fixed' : fixed })
     536      fixed += 1
     537
    525538    dhcp_out[ifname].append("""\
    526539   subnet %(autogen_subnet)s netmask %(autogen_netmask)s {
Note: See TracChangeset for help on using the changeset viewer.