def __init__(self, server, credentials): self.server = server self.credentials = credentials self.headers = {'Content-type': 'application/json'} self.topology = ODLTopology(self.server, self.credentials, self) self.update_xml()
def do_get_topo(self, args): '''Get ODL topology''' try: t = ODLTopology(None, None, self.odl) topo = t.get_topology() self.config = topo self._set_cwc() except Exception as e: print "Error: %s" % e