original_docstring: Handle registration of a core segment.
docstring: Handle registration of a core segment.
docstring_tokens: Handle registration of a core segment .
code: def _handle_core_segment_record(self, pcb, from_master=False,
                                      from_zk=False):
          """Handle registration of a core segment."""
          first_ia = pcb.first_ia()
          reverse = False
          if pcb.is_sibra() and first_ia == self.addr.isd_as:
              reverse = True
          added = self._add_segment(pcb, self.core_segments, "Core",
                                    reverse=reverse)
          if not from_zk and not from_master:
              if first_ia[0] == self.addr.isd_as[0]:
                  # Local core segment, share via ZK
                  self._segs_to_zk.append((PST.CORE, pcb))
              else:
                  # Remote core segment, send to master
                  self._segs_to_master.append((PST.CORE, pcb))
          if not added:
              return set()
          # Send pending requests that couldn't be processed due to the lack of
          # a core segment to the destination PS. Don't use SIBRA PCBs for that.
          if not pcb.is_sibra():
              self._handle_waiting_targets(pcb)
          ret = set([(first_ia, pcb.is_sibra())])
          if first_ia[0] != self.addr.isd_as[0]:
              # Remote core segment, signal the entire ISD
              ret.add((first_ia.any_as(), pcb.is_sibra()))
          return ret
code_tokens: def _handle_core_segment_record ( self , pcb , from_master = False , from_zk = False ) : first_ia = pcb . first_ia ( ) reverse = False if pcb . is_sibra ( ) and first_ia == self . addr . isd_as : reverse = True added = self . _add_segment ( pcb , self . core_segments , "Core" , reverse = reverse ) if not from_zk and not from_master : if first_ia [ 0 ] == self . addr . isd_as [ 0 ] : self . _segs_to_zk . append ( ( PST . CORE , pcb ) ) else : self . _segs_to_master . append ( ( PST . CORE , pcb ) ) if not added : return set ( ) if not pcb . is_sibra ( ) : self . _handle_waiting_targets ( pcb ) ret = set ( [ ( first_ia , pcb . is_sibra ( ) ) ] ) if first_ia [ 0 ] != self . addr . isd_as [ 0 ] : ret . add ( ( first_ia . any_as ( ) , pcb . is_sibra ( ) ) ) return ret
short_docstring: Handle registration of a core segment.
short_docstring_tokens: Handle registration of a core segment .
comment: """Handle registration of a core segment."""$SEP$# Local core segment, share via ZK$SEP$# Remote core segment, send to master$SEP$# Send pending requests that couldn't be processed due to the lack of$SEP$# a core segment to the destination PS. Don't use SIBRA PCBs for that.$SEP$# Remote core segment, signal the entire ISD