original_docstring: Update metadata networks hosted in this chassis.
  
          Add or remove a datapath from the list of current datapaths that
          we're currently serving metadata.
          
docstring: Update metadata networks hosted in this chassis.
  Add or remove a datapath from the list of current datapaths that
  we're currently serving metadata.
docstring_tokens: Update metadata networks hosted in this chassis . Add or remove a datapath from the list of current datapaths that we ' re currently serving metadata .
code: def update_chassis_metadata_networks(self, datapath, remove=False):
          """Update metadata networks hosted in this chassis.
  
          Add or remove a datapath from the list of current datapaths that
          we're currently serving metadata.
          """
          current_dps = self.sb_idl.get_chassis_metadata_networks(self.chassis)
          updated = False
          if remove:
              if datapath in current_dps:
                  current_dps.remove(datapath)
                  updated = True
          else:
              if datapath not in current_dps:
                  current_dps.append(datapath)
                  updated = True
  
          if updated:
              with self.sb_idl.create_transaction(check_error=True) as txn:
                  txn.add(self.sb_idl.set_chassis_metadata_networks(
                      self.chassis, current_dps))
code_tokens: def update_chassis_metadata_networks ( self , datapath , remove = False ) : current_dps = self . sb_idl . get_chassis_metadata_networks ( self . chassis ) updated = False if remove : if datapath in current_dps : current_dps . remove ( datapath ) updated = True else : if datapath not in current_dps : current_dps . append ( datapath ) updated = True if updated : with self . sb_idl . create_transaction ( check_error = True ) as txn : txn . add ( self . sb_idl . set_chassis_metadata_networks ( self . chassis , current_dps ) )
short_docstring: Update metadata networks hosted in this chassis.
short_docstring_tokens: Update metadata networks hosted in this chassis .
comment: """Update metadata networks hosted in this chassis.
  
          Add or remove a datapath from the list of current datapaths that
          we're currently serving metadata.
          """