hpimdm/tree/KernelEntry.py
def check_tree_state(self):
        """
        Verify if tree changes state (Active/Unsure/Inactive)
        """
        with self.CHANGE_STATE_LOCK:
            if self.inbound_interface_index is not None and \
                    len(self.interface_state) > 0 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._tree_state.transition_to_active(self)
            elif len(self.interface_state) > 0 and \
                    not all(value is None for value in self._upstream_interface_state.values()):
                print("PARA UNSURE")
                self._tree_state.transition_to_unsure(self)
            else:
                print("PARA INACTIVE")
                self._tree_state.transition_to_inactive(self)

        Verify if tree changes state (Active/Unsure/Inactive)
        
Verify if tree changes state (Active/Unsure/Inactive)
Verify if tree changes state ( Active / Unsure / Inactive )
def check_tree_state(self):
        with self.CHANGE_STATE_LOCK:
            if self.inbound_interface_index is not None and \
                    len(self.interface_state) > 0 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._tree_state.transition_to_active(self)
            elif len(self.interface_state) > 0 and \
                    not all(value is None for value in self._upstream_interface_state.values()):
                print("PARA UNSURE")
                self._tree_state.transition_to_unsure(self)
            else:
                print("PARA INACTIVE")
                self._tree_state.transition_to_inactive(self)
def check_tree_state ( self ) : with self . CHANGE_STATE_LOCK : if self . inbound_interface_index is not None and len ( self . interface_state ) > 0 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 . _tree_state . transition_to_active ( self ) elif len ( self . interface_state ) > 0 and not all ( value is None for value in self . _upstream_interface_state . values ( ) ) : print ( "PARA UNSURE" ) self . _tree_state . transition_to_unsure ( self ) else : print ( "PARA INACTIVE" ) self . _tree_state . transition_to_inactive ( self )
Verify if tree changes state (Active/Unsure/Inactive)
Verify if tree changes state ( Active / Unsure / Inactive )
"""
        Verify if tree changes state (Active/Unsure/Inactive)
        """ # tree is Active
self