TODO: This will be changed in the future to support multiple networks
per data center
"""
- self.switch = self.net.mnet.addSwitch(
+ self.switch = self.net.addSwitch(
"%s.s1" % self.name, dpid=hex(self._get_next_dc_dpid())[2:])
logging.debug("created data center switch: %s" % str(self.switch))
# do bookkeeping
self.containers[name] = d
d.datacenter = self
- return name # we might use UUIDs for naming later on
+ return d # we might use UUIDs for naming later on
def stopCompute(self, name):
"""
Return a list of all running containers assigned to this
data center.
"""
- return self.containers.itervalues()
+ return list(self.containers.itervalues())