def setUp(self):
        yield self._start_container()

        # use some sort of agent...doesnt really matter what kind, does it
        processes = [{
            'name': 'testAgent',
            'module': 'ion.agents.instrumentagents.SBE49_IA',
            'class': 'SBE49InstrumentAgent'
        }, {
            'name': 'agent_registry',
            'module': 'ion.services.coi.agent_registry',
            'class': 'AgentRegistryService'
        }]
        self.sup = yield self._spawn_processes(processes)
        self.svc_id = self.sup.get_child_id('testAgent')
        self.rr_id = self.sup.get_child_id('agent_registry')

        # Start a client (for the RPC)
        self.RAClient = ResourceAgentClient(proc=self.sup, target=self.svc_id)

        # RR Client is ,,,,,desired only for testing
        self.reg_client = AgentRegistryClient(proc=self.sup)
        yield self.reg_client.clear_registry()

        # need any non-generic resource...use an instrument agent one for now
        self.res_desc = \
            InstrumentAgentResourceDescription.create_new_resource()
        #self.res_desc.version = '1.23'
        self.res_desc.name = 'I am a test IA resource description'

        self.res_inst = InstrumentAgentResourceInstance.create_new_resource()
        self.res_inst.driver_process_id = 'something_for_now.1'
        self.res_inst.name = 'I am an instantiation of a test IA resource'
Exemple #2
0
    def setUp(self):
        yield self._start_container()

        # Start an instrument agent
        processes = [
            {'name':'pubsub_registry','module':'ion.services.dm.distribution.pubsub_registry','class':'DataPubSubRegistryService'},
            {'name':'pubsub_service','module':'ion.services.dm.distribution.pubsub_service','class':'DataPubsubService'},
            {'name':'agent_registry',
             'module':'ion.services.coi.agent_registry',
             'class':'ResourceRegistryService'},
            {'name':'testSBE49IA',
             'module':'ion.agents.instrumentagents.SBE49_IA',
             'class':'SBE49InstrumentAgent'},
        ]
        self.sup = yield self._spawn_processes(processes)
        self.svc_id = yield self.sup.get_child_id('testSBE49IA')
        self.reg_id = yield self.sup.get_child_id('agent_registry')

        # Start a client (for the RPC)
        self.IAClient = IA.InstrumentAgentClient(proc=self.sup,
                                                 target=self.svc_id)

        # Start an Agent Registry to test against
        self.reg_client = AgentRegistryClient(proc=self.sup)
        yield self.reg_client.clear_registry()
Exemple #3
0
 def plc_init(self):
     """
     The Agent Registry client class to hang onto for all registry manipulations
     """
     self.reg_client = AgentRegistryClient(proc=self)
     """
     Our reference object in the Agent Registry
     """
     self.resource_ref = None
     """
     This is what makes us unique for now. When we register, this is our
     handle
     """
     self.name = None
Exemple #4
0
 def slc_init(self):
     self.irc = InstrumentRegistryClient(proc=self)
     self.dprc = DataProductRegistryClient(proc=self)
     self.arc = AgentRegistryClient(proc=self)
     self.dpsc = DataPubsubClient(proc=self)