Esempio n. 1
0
 def addDatacenter(self, label, metadata={}, resource_log_path=None):
     """
     Create and add a logical cloud data center to the network.
     """
     if label in self.dcs:
         raise Exception("Data center label already exists: %s" % label)
     dc = Datacenter(label, metadata=metadata, resource_log_path=resource_log_path)
     dc.net = self  # set reference to network
     self.dcs[label] = dc
     dc.create()  # finally create the data center in our Mininet instance
     LOG.info("added data center: %s" % label)
     return dc
Esempio n. 2
0
 def addDatacenter(self, label, metadata={}, resource_log_path=None):
     """
     Create and add a logical cloud data center to the network.
     """
     if label in self.dcs:
         raise Exception("Data center label already exists: %s" % label)
     dc = Datacenter(label, metadata=metadata, resource_log_path=resource_log_path)
     dc.net = self  # set reference to network
     self.dcs[label] = dc
     dc.create()  # finally create the data center in our Mininet instance
     LOG.info("added data center: %s" % label)
     return dc