예제 #1
0
파일: net.py 프로젝트: manojkeshava/son-emu
 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
예제 #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