def send_association_setup_message(self): teid_range_indicate, teid_range_value =\ self._get_teid_pool_range() #Create Node association setup message assoc_message= \ UPFAssociationState( state_version=self._smf_assoc_version, assoc_state=UPFAssociationState.ESTABLISHED, feature_set=UPFFeatureSet(f_teid=True), recovery_time_stamp=self._recovery_timestamp.GetCurrentTime(), ip_resource_schema=\ [UserPlaneIPResourceSchema(ipv4_address=self.config.downlink_ip, teid_range_indication=teid_range_indicate, teid_range=teid_range_value)] ) self._assoc_mon_thread = hub.spawn(self._monitor_association, assoc_message)
def get_node_assoc_message(self): node_message = UPFNodeState(upf_id=self._node_id) teid_range_indicate, teid_range_value =\ self._get_teid_pool_range() #Create Node association setup message assoc_message = \ UPFAssociationState( state_version=self._smf_assoc_version, assoc_state=UPFAssociationState.ESTABLISHED, feature_set=UPFFeatureSet(f_teid=True), recovery_time_stamp=self._recovery_timestamp.GetCurrentTime(), ip_resource_schema=\ [UserPlaneIPResourceSchema(ipv4_address=self.config.downlink_ip, teid_range_indication=teid_range_indicate, teid_range=teid_range_value)] ) node_message.associaton_state.CopyFrom(assoc_message) return node_message