EntityType and HostSelector in OneAgent Extension migration

I need to migrate OneAgent Extension using EntityType and HostSelector. Can you please help answer the queries mentioned in table below:from ruxit.api.base_plugin import BasePluginfrom ruxit.api.selectors import EntityTypefrom ruxit.api.selectors import HostSelectorentities = self.get_monitored_entities()
host_entity = Nonefor entity in entities:     self.logger.info(“Monitored entity: id=%s, type=%s”, entity.id, entity.type)     if entity.type == EntityType.HOST:                host_entity = entityself.results_builder.report_custom_info_event(description=“One or more processes are unavailable”, title=“Host Unhealthy”, entity_selector=HostSelector())

IssueQuestion/Comments
  
entities = self.get_monitored_entities()Is this function usable in new Extension framework ?
from ruxit.api.selectors import EntityTypeentity.type == EntityType.HOST:We have this code in Extension.Is EntityType valid in new Framework ?If no, how to import EntityType in new framework
from ruxit.api.selectors import HostSelectorself.results_builder.report_custom_info_event(description="One or more processes are unavailable", title="Host Unhealthy", entity_selector=HostSelector())We have this code in Extension.Is HostSelector valid in new Framework ?If no, how to import HostSelector in new framework

HostSelector and EntitySelector objects along with ResultsBuilder and TopologyBuilder no longer exist in the new framework. For OneAgent extensions, the data ingested is automatically linked to the OneAgent host.

For reporting an info event (based on the API documented here) you can use the `self.report_dt_event` function.

To find out the entity ID of the host running the extension you can use the OneAgent virtual file as documented here. When the OneAgent detects this file being read it will populate it with entity IDs for the host and monitored processes.