'Attempt to bind a port using registered mechanism drivers.
:param context: PortContext instance describing the port
Called outside any transaction to attempt to establish a port
binding.'

def bind_port(self, context):

    binding = context._binding
    LOG.debug('Attempting    to    bind    port    %(port)s    on    host    %(host)s    for    vnic_type    %(vnic_type)s    with    profile    %(profile)s', {'port': context.current['id'], 'host': context.host, 'vnic_type': binding.vnic_type, 'profile': binding.profile})
    context._clear_binding_levels()
    if (not self._bind_port_level(context, 0, context.network.network_segments)):
        binding.vif_type = portbindings.VIF_TYPE_BINDING_FAILED
        LOG.error(_LE('Failed    to    bind    port    %(port)s    on    host    %(host)s    for    vnic_type    %(vnic_type)s    using    segments    %(segments)s'), {'port': context.current['id'], 'host': context.host, 'vnic_type': binding.vnic_type, 'segments': context.network.network_segments})
