Exemplo n.º 1
0
 def create_port(self, context, port):
     # Set port status as PENDING_CREATE
     port['port']['status'] = constants.STATUS_PENDING_CREATE
     with db_api.autonested_transaction():
         new_port = super(HdnNeutronPlugin, self).create_port(
             context, port)
     # Notify HDN operators
     hdnlib.notify_port_create(new_port)
     LOG.debug("Queued request to create port: %s", new_port['id'])
     return new_port
Exemplo n.º 2
0
Arquivo: plugin.py Projeto: vj17/hdn
 def create_port(self, context, port):
     # Set port status as PENDING_CREATE
     port['port']['status'] = constants.STATUS_PENDING_CREATE
     with db_api.autonested_transaction(context.session):
         new_port = super(HdnNeutronPlugin, self).create_port(
             context, port)
     registry.notify(resources.PORT, events.AFTER_CREATE, self,
                     tenant_id=context.tenant_id,
                     resource_id=new_port['id'])
     # Notify HDN operators
     hdnlib.notify_port_create(new_port)
     LOG.debug("Queued request to create port: %s", new_port['id'])
     return new_port