hpimdm/tree/KernelEntry.py
def first_check_tree_state(self):
        """
        Verify for the first time in which state the tree is at
        """
        if self.inbound_interface_index is not None and \
                self._upstream_interface_state.get(self.inbound_interface_index, None) is not None and \
                (not self._rpc.is_better_than(self._upstream_interface_state.get(self.inbound_interface_index))
                 and self._rpc != self._upstream_interface_state.get(self.inbound_interface_index)):
            # tree is Active
            print("PARA ACTIVE")
            self.set_tree_state(TreeState.Active)
        elif not all(value is None for value in self._upstream_interface_state.values()):
            print("PARA UNSURE")
            # tree is Unsure
            self.set_tree_state(TreeState.Unsure)
        else:
            print("PARA INACTIVE")
            # tree is Inactive
            self.set_tree_state(TreeState.Inactive)

        Verify for the first time in which state the tree is at
        
Verify for the first time in which state the tree is at
Verify for the first time in which state the tree is at
def first_check_tree_state(self):
        if self.inbound_interface_index is not None and \
                self._upstream_interface_state.get(self.inbound_interface_index, None) is not None and \
                (not self._rpc.is_better_than(self._upstream_interface_state.get(self.inbound_interface_index))
                 and self._rpc != self._upstream_interface_state.get(self.inbound_interface_index)):
            print("PARA ACTIVE")
            self.set_tree_state(TreeState.Active)
        elif not all(value is None for value in self._upstream_interface_state.values()):
            print("PARA UNSURE")
            self.set_tree_state(TreeState.Unsure)
        else:
            print("PARA INACTIVE")
            self.set_tree_state(TreeState.Inactive)
def first_check_tree_state ( self ) : if self . inbound_interface_index is not None and self . _upstream_interface_state . get ( self . inbound_interface_index , None ) is not None and ( not self . _rpc . is_better_than ( self . _upstream_interface_state . get ( self . inbound_interface_index ) ) and self . _rpc != self . _upstream_interface_state . get ( self . inbound_interface_index ) ) : print ( "PARA ACTIVE" ) self . set_tree_state ( TreeState . Active ) elif not all ( value is None for value in self . _upstream_interface_state . values ( ) ) : print ( "PARA UNSURE" ) self . set_tree_state ( TreeState . Unsure ) else : print ( "PARA INACTIVE" ) self . set_tree_state ( TreeState . Inactive )
Verify for the first time in which state the tree is at
Verify for the first time in which state the tree is at
"""
        Verify for the first time in which state the tree is at
        """ # tree is Active # tree is Unsure # tree is Inactive
self