

def _write_dotfile(self, fileobj):
    fileobj.write(HEAD)
    sess = self._sess
    nets = sess.query(models.Network).all()
    for netw in nets:
        fileobj.write(NODEDEF.format(nodename='net_{0:d}'.format(netw.id), label=netw.name, shape='circle', style='filled', color='blue'))
        for iface in netw.interfaces:
            fileobj.write(NODEDEF.format(nodename='iface_{0:d}'.format(iface.id), label='{0} ({1!s})'.format(iface.name, iface.ipaddr), shape='box', style='filled', color='grey'))
    for netw in nets:
        endnode = 'net_{0:d}'.format(netw.id)
        for iface in netw.interfaces:
            netw.write(CONNECTDEF.format(startnode='iface_{0:d}'.format(iface.id), endnode=endnode, color='green', arrowhead='none'))
    fileobj.write(TAIL)

dataset/ETHPy150Open kdart/pycopia/storage/pycopia/db/equipment.py MapBuilder._write_dotfile/VarMisuse@172/232 `fileobj`->`netw`