Beispiel #1
0
 def rename_network(self, tenant_id, net_id, new_name):
     """
     Updates the symbolic name belonging to a particular
     Virtual Network.
     """
     LOG.debug("FakePlugin.rename_network() called")
     db.network_rename(net_id, tenant_id, new_name)
     net = self._get_network(tenant_id, net_id)
     return net
Beispiel #2
0
 def rename_network(self, tenant_id, net_id, new_name):
     """Rename a network"""
     try:
         net = db.network_rename(net_id, tenant_id, new_name)
         LOG.debug("Renamed network: %s", net.uuid)
         net_dict = {}
         net_dict["id"] = str(net.uuid)
         net_dict["name"] = net.name
         return net_dict
     except Exception, exc:
         LOG.error("Failed to rename network: %s", str(exc))
 def rename_network(self, tenant_id, network_id, new_name):
     """
     Updates the symbolic name belonging to a particular
     Virtual Network.
     """
     LOG.debug("rename_network() called")
     # verify network_id
     self._get_network(tenant_id, network_id)
     network = db.network_rename(network_id, tenant_id, new_name)
     ofn_tenant_id = self._get_ofn_tenant_id(tenant_id)
     ofn_network_id = self._get_ofn_network_id(network_id)
     res = self.ofn.ofn_rename_network(ofn_tenant_id,
                                       ofn_network_id,
                                       new_name)
     LOG.debug("rename_network(): ofn_rename_network() return '%s'" % res)
     return {'net-id': network.uuid, 'net-name': network.name}
Beispiel #4
0
 def rename_network(self, tenant_id, net_id, new_name):
     net = db.network_rename(net_id, tenant_id, new_name)
     return self._make_net_dict(str(net.uuid), net.name, None)