original_docstring: Unprovision this datapath to stop serving metadata.
  
          This function will shutdown metadata proxy if it's running and delete
          the VETH pair, the OVS port and the namespace.
          
docstring: Unprovision this datapath to stop serving metadata.
  This function will shutdown metadata proxy if it's running and delete
  the VETH pair, the OVS port and the namespace.
docstring_tokens: Unprovision this datapath to stop serving metadata . This function will shutdown metadata proxy if it ' s running and delete the VETH pair the OVS port and the namespace .
code: def teardown_datapath(self, datapath):
          """Unprovision this datapath to stop serving metadata.
  
          This function will shutdown metadata proxy if it's running and delete
          the VETH pair, the OVS port and the namespace.
          """
          self.update_chassis_metadata_networks(datapath, remove=True)
          namespace = self._get_namespace_name(datapath)
          ip = ip_lib.IPWrapper(namespace)
          # If the namespace doesn't exist, return
          if not ip.netns.exists(namespace):
              return
  
          LOG.info("Cleaning up %s namespace which is not needed anymore",
                   namespace)
  
          metadata_driver.MetadataDriver.destroy_monitored_metadata_proxy(
              self._process_monitor, datapath, self.conf, namespace)
  
          veth_name = self._get_veth_name(datapath)
          self.ovs_idl.del_port(
              veth_name[0], bridge=self.conf.ovs_integration_bridge).execute()
          if ip_lib.device_exists(veth_name[0]):
              ip_lib.IPWrapper().del_veth(veth_name[0])
  
          ip.garbage_collect_namespace()
code_tokens: def teardown_datapath ( self , datapath ) : self . update_chassis_metadata_networks ( datapath , remove = True ) namespace = self . _get_namespace_name ( datapath ) ip = ip_lib . IPWrapper ( namespace ) if not ip . netns . exists ( namespace ) : return LOG . info ( "Cleaning up %s namespace which is not needed anymore" , namespace ) metadata_driver . MetadataDriver . destroy_monitored_metadata_proxy ( self . _process_monitor , datapath , self . conf , namespace ) veth_name = self . _get_veth_name ( datapath ) self . ovs_idl . del_port ( veth_name [ 0 ] , bridge = self . conf . ovs_integration_bridge ) . execute ( ) if ip_lib . device_exists ( veth_name [ 0 ] ) : ip_lib . IPWrapper ( ) . del_veth ( veth_name [ 0 ] ) ip . garbage_collect_namespace ( )
short_docstring: Unprovision this datapath to stop serving metadata.
short_docstring_tokens: Unprovision this datapath to stop serving metadata .
comment: """Unprovision this datapath to stop serving metadata.
  
          This function will shutdown metadata proxy if it's running and delete
          the VETH pair, the OVS port and the namespace.
          """$SEP$# If the namespace doesn't exist, return