original_docstring: Update the metadata service for this datapath.
  
          This function will:
          * Provision the namespace if it wasn't already in place.
          * Update the namespace if it was already serving metadata (for example,
            after binding/unbinding the first/last port of a subnet in our
            chassis).
          * Tear down the namespace if there are no more ports in our chassis
            for this datapath.
          
docstring: Update the metadata service for this datapath.
  This function will:
  Provision the namespace if it wasn't already in place.
  Update the namespace if it was already serving metadata (for example,
  after binding/unbinding the first/last port of a subnet in our
  chassis).
  Tear down the namespace if there are no more ports in our chassis
  for this datapath.
docstring_tokens: Update the metadata service for this datapath . This function will : Provision the namespace if it wasn ' t already in place . Update the namespace if it was already serving metadata ( for example after binding / unbinding the first / last port of a subnet in our chassis ) . Tear down the namespace if there are no more ports in our chassis for this datapath .
code: def update_datapath(self, datapath):
          """Update the metadata service for this datapath.
  
          This function will:
          * Provision the namespace if it wasn't already in place.
          * Update the namespace if it was already serving metadata (for example,
            after binding/unbinding the first/last port of a subnet in our
            chassis).
          * Tear down the namespace if there are no more ports in our chassis
            for this datapath.
          """
          ports = self.sb_idl.get_ports_on_chassis(self.chassis)
          datapath_ports = [p for p in ports if p.type == '' and
                            str(p.datapath.uuid) == datapath]
          if datapath_ports:
              self.provision_datapath(datapath)
          else:
              self.teardown_datapath(datapath)
code_tokens: def update_datapath ( self , datapath ) : ports = self . sb_idl . get_ports_on_chassis ( self . chassis ) datapath_ports = [ p for p in ports if p . type == '' and str ( p . datapath . uuid ) == datapath ] if datapath_ports : self . provision_datapath ( datapath ) else : self . teardown_datapath ( datapath )
short_docstring: Update the metadata service for this datapath.
short_docstring_tokens: Update the metadata service for this datapath .
comment: """Update the metadata service for this datapath.
  
          This function will:
          * Provision the namespace if it wasn't already in place.
          * Update the namespace if it was already serving metadata (for example,
            after binding/unbinding the first/last port of a subnet in our
            chassis).
          * Tear down the namespace if there are no more ports in our chassis
            for this datapath.
          """