def __init__(self, db=None, net=None, *args, **kwargs): super(TopologyDB, self).__init__(*args, **kwargs) self._network = {} if net: self.topo = net.topo self.parse_net(net) elif db: self.load(db) else: log.warning('Topology instantiated without any data')
def __init__(self, db=None, net=None, *args, **kwargs): super(TopologyDB, self).__init__(*args, **kwargs) """ dict keyed by node name -> dict keyed by - properties -> val - neighbor -> interface properties """ self._network = {} if net: self.parse_net(net) elif db: self.load(db) else: log.warning('Topology instantiated without any data')