• Leigh Stoller's avatar
    Another protogeni checkbox; scriptify and simplify adding "special" · cf517af6
    Leigh Stoller authored
    devices with network interfaces. Emulab's spp and bbg nodes are
    examples, but I did all that by hand inserting sql. An spp node is a
    shared node with some interfaces. Users can allocate one or more of
    those interfaces and establish vlans to the interfaces. The node is a
    "fakenode" in "shared" mode, and everything else falls out. The mapper
    assigns virtual nodes until all of the interfaces are allocated,
    snmpit does its work on the interfaces, and the user then does the
    rest.
    
    Anyway, to added a special device:
    
      boss> wap addspecialdevice -s -t goober goober1
    
    The -t argument is the name of the node type, created if it does not
    exists. The last argument is the name of the fakenode to create in the
    DB. The -s option says the special device is shared. Without -s, the
    device is allocated exclusively.
    
    Then to add interfaces to the device:
    
      boss> wap addspecialiface -b 1Gb -s cisco4,100,100 goober1 eth0
    
    The -b option is the speed (either 100Mb or 1Gb). The -s option is the
    switch side of the interface (switchname,card,port). The last two
    arguments are the nodename and iface name for the interfaces table.
    
    After the interface and wires table entry are added to the DB, snmpit
    is called to put the switch port into tagged mode (if the node is
    shared). To skip the snmpit step, add the -t option.
    cf517af6
Interface.pm.in 34.5 KB