original_docstring: Agent sync.
  
          This function will make sure that all networks with ports in our
          chassis are serving metadata. Also, it will tear down those namespaces
          which were serving metadata but are no longer needed.
          
docstring: Agent sync.
  This function will make sure that all networks with ports in our
  chassis are serving metadata. Also, it will tear down those namespaces
  which were serving metadata but are no longer needed.
docstring_tokens: Agent sync . This function will make sure that all networks with ports in our chassis are serving metadata . Also it will tear down those namespaces which were serving metadata but are no longer needed .
code: def sync(self):
          """Agent sync.
  
          This function will make sure that all networks with ports in our
          chassis are serving metadata. Also, it will tear down those namespaces
          which were serving metadata but are no longer needed.
          """
          metadata_namespaces = self.ensure_all_networks_provisioned()
          system_namespaces = ip_lib.list_network_namespaces()
          unused_namespaces = [ns for ns in system_namespaces if
                               ns.startswith(NS_PREFIX) and
                               ns not in metadata_namespaces]
          for ns in unused_namespaces:
              self.teardown_datapath(self._get_datapath_name(ns))
code_tokens: def sync ( self ) : metadata_namespaces = self . ensure_all_networks_provisioned ( ) system_namespaces = ip_lib . list_network_namespaces ( ) unused_namespaces = [ ns for ns in system_namespaces if ns . startswith ( NS_PREFIX ) and ns not in metadata_namespaces ] for ns in unused_namespaces : self . teardown_datapath ( self . _get_datapath_name ( ns ) )
short_docstring: Agent sync.
short_docstring_tokens: Agent sync .
comment: """Agent sync.
  
          This function will make sure that all networks with ports in our
          chassis are serving metadata. Also, it will tear down those namespaces
          which were serving metadata but are no longer needed.
          """