original_docstring: Bind an interface as instructed by ML2 on this host.
  
          The interface as a network and binding type.  Assuming the
          network as been dropped onto the physnet specified, bind
          that uplink to the interface in question by creating an
          interface of the appropriate form and propagating the network
          to it.
  
          This call also identifies if we should consider the interface
          fully up.  This may happen now, or, asynchronously, later,
          depending on whether all the prerequisites are in place.  That
          includes the behaviour of whatever's on the other end of the
          interface.
          
docstring: Bind an interface as instructed by ML2 on this host.
  The interface as a network and binding type.  Assuming the
  network as been dropped onto the physnet specified, bind
  that uplink to the interface in question by creating an
  interface of the appropriate form and propagating the network
  to it.
  
  This call also identifies if we should consider the interface
  fully up.  This may happen now, or, asynchronously, later,
  depending on whether all the prerequisites are in place.  That
  includes the behaviour of whatever's on the other end of the
  interface.
docstring_tokens: Bind an interface as instructed by ML2 on this host . The interface as a network and binding type . Assuming the network as been dropped onto the physnet specified bind that uplink to the interface in question by creating an interface of the appropriate form and propagating the network to it . This call also identifies if we should consider the interface fully up . This may happen now or asynchronously later depending on whether all the prerequisites are in place . That includes the behaviour of whatever ' s on the other end of the interface .
code: def bind(self, bound_callback, id, binding_type, mac_address, physnet,
               network_type, segmentation_id, security_data):
          """Bind an interface as instructed by ML2 on this host.
  
          The interface as a network and binding type.  Assuming the
          network as been dropped onto the physnet specified, bind
          that uplink to the interface in question by creating an
          interface of the appropriate form and propagating the network
          to it.
  
          This call also identifies if we should consider the interface
          fully up.  This may happen now, or, asynchronously, later,
          depending on whether all the prerequisites are in place.  That
          includes the behaviour of whatever's on the other end of the
          interface.
          """
          # args['binding_type'] in ('vhostuser', 'tap'):
          # For GPE, fetch remote mappings from etcd for any "new" network
          # segments we will be binding to so we are aware of all the remote
          # overlay (mac) to underlay (IP) values
          if network_type == TYPE_GPE and self.gpe_listener is not None:
              # For GPE, a physnet value is not messaged by ML2 as it
              # is not specified for creating a gpe tenant network. Hence for
              # these net types we replace the physnet with the value of
              # gpe_locators, which stand for the physnet name.
              physnet = self.gpe_listener.physnet()
              self.gpe_listener.ensure_gpe_remote_mappings(segmentation_id)
          props = self.vppf.bind_interface_on_host(binding_type,
                                                   id,
                                                   mac_address,
                                                   physnet,
                                                   network_type,
                                                   segmentation_id)
          if props is None:
              # Problems with the binding
              # We will never notify anyone this port is ready.
              return None
          # Store the binding information.  We put this into
          # etcd when the interface comes up to show that things
          # are ready and expose it to curious operators, who may
          # be able to debug with it.  This may not happen
          # immediately because the far end may not have connected.
          iface_idx = props['iface_idx']
  
          port_security_enabled = security_data.get('port_security_enabled',
                                                    True)
  
          if port_security_enabled:
              self.iface_awaiting_secgroups[iface_idx] = \
                  security_data.get('security_groups', [])
          else:
              # 'None' is a special value indicating no port security
              self.iface_awaiting_secgroups[iface_idx] = None
  
          self.iface_state[iface_idx] = (id, bound_callback, props)
          self.iface_state_ifidx[id] = iface_idx
  
          self.apply_spoof_macip(iface_idx, security_data, props)
  
          self.maybe_apply_secgroups(iface_idx)
code_tokens: def bind ( self , bound_callback , id , binding_type , mac_address , physnet , network_type , segmentation_id , security_data ) : if network_type == TYPE_GPE and self . gpe_listener is not None : physnet = self . gpe_listener . physnet ( ) self . gpe_listener . ensure_gpe_remote_mappings ( segmentation_id ) props = self . vppf . bind_interface_on_host ( binding_type , id , mac_address , physnet , network_type , segmentation_id ) if props is None : return None iface_idx = props [ 'iface_idx' ] port_security_enabled = security_data . get ( 'port_security_enabled' , True ) if port_security_enabled : self . iface_awaiting_secgroups [ iface_idx ] = security_data . get ( 'security_groups' , [ ] ) else : self . iface_awaiting_secgroups [ iface_idx ] = None self . iface_state [ iface_idx ] = ( id , bound_callback , props ) self . iface_state_ifidx [ id ] = iface_idx self . apply_spoof_macip ( iface_idx , security_data , props ) self . maybe_apply_secgroups ( iface_idx )
short_docstring: Bind an interface as instructed by ML2 on this host.
short_docstring_tokens: Bind an interface as instructed by ML2 on this host .
comment: """Bind an interface as instructed by ML2 on this host.
  
          The interface as a network and binding type.  Assuming the
          network as been dropped onto the physnet specified, bind
          that uplink to the interface in question by creating an
          interface of the appropriate form and propagating the network
          to it.
  
          This call also identifies if we should consider the interface
          fully up.  This may happen now, or, asynchronously, later,
          depending on whether all the prerequisites are in place.  That
          includes the behaviour of whatever's on the other end of the
          interface.
          """$SEP$# args['binding_type'] in ('vhostuser', 'tap'):$SEP$# For GPE, fetch remote mappings from etcd for any "new" network$SEP$# segments we will be binding to so we are aware of all the remote$SEP$# overlay (mac) to underlay (IP) values$SEP$# For GPE, a physnet value is not messaged by ML2 as it$SEP$# is not specified for creating a gpe tenant network. Hence for$SEP$# these net types we replace the physnet with the value of$SEP$# gpe_locators, which stand for the physnet name.$SEP$# Problems with the binding$SEP$# We will never notify anyone this port is ready.$SEP$# Store the binding information.  We put this into$SEP$# etcd when the interface comes up to show that things$SEP$# are ready and expose it to curious operators, who may$SEP$# be able to debug with it.  This may not happen$SEP$# immediately because the far end may not have connected.$SEP$# 'None' is a special value indicating no port security