original_docstring: Detach an interface, clean up structures
  
          This removes and destroys the interface and the network
          if it is no longer used.
  
          This is *not* used in rebinding, as this requires the data
          we stored about an interface when it was bound.
          
docstring: Detach an interface, clean up structures
  This removes and destroys the interface and the network
  if it is no longer used.
  
  This is *not* used in rebinding, as this requires the data
  we stored about an interface when it was bound.
docstring_tokens: Detach an interface clean up structures This removes and destroys the interface and the network if it is no longer used . This is * not * used in rebinding as this requires the data we stored about an interface when it was bound .
code: def unbind_interface_on_host(self, uuid):
          """Detach an interface, clean up structures
  
          This removes and destroys the interface and the network
          if it is no longer used.
  
          This is *not* used in rebinding, as this requires the data
          we stored about an interface when it was bound.
          """
          if uuid not in self.interfaces:
              LOG.debug('unknown port %s unbinding request - ignored',
                        uuid)
          else:
              props = self.interfaces[uuid]
              net = props.get('net_data')
              self.clean_interface_from_vpp(uuid, props)
              # Delete the port ip address from remote_group_id list
              self.port_ips.pop(uuid, None)
  
              if net is not None:
                  # Check if this is the last interface on host, safe if this
                  # interface is incompletely bound
                  for interface in self.interfaces.values():
                      if net == interface.get('net_data'):
                          # safe if the other interface is not bound
                          break
                  else:
                      # Network is not used on this host, delete it
                      self.net_driver.delete_network(net['physnet'],
                                                     net['network_type'],
                                                     net['segmentation_id'])
code_tokens: def unbind_interface_on_host ( self , uuid ) : if uuid not in self . interfaces : LOG . debug ( 'unknown port %s unbinding request - ignored' , uuid ) else : props = self . interfaces [ uuid ] net = props . get ( 'net_data' ) self . clean_interface_from_vpp ( uuid , props ) self . port_ips . pop ( uuid , None ) if net is not None : for interface in self . interfaces . values ( ) : if net == interface . get ( 'net_data' ) : break else : self . net_driver . delete_network ( net [ 'physnet' ] , net [ 'network_type' ] , net [ 'segmentation_id' ] )
short_docstring: Detach an interface, clean up structures
  This removes and destroys the interface and the network
  if it is no longer used.
short_docstring_tokens: Detach an interface clean up structures This removes and destroys the interface and the network if it is no longer used .
comment: """Detach an interface, clean up structures
  
          This removes and destroys the interface and the network
          if it is no longer used.
  
          This is *not* used in rebinding, as this requires the data
          we stored about an interface when it was bound.
          """$SEP$# Delete the port ip address from remote_group_id list$SEP$# Check if this is the last interface on host, safe if this$SEP$# interface is incompletely bound$SEP$# safe if the other interface is not bound$SEP$# Network is not used on this host, delete it