def setUp(self):
        oms_uri = os.getenv('OMS', "launchsimulator")
        oms_uri = self._dispatch_simulator(oms_uri)
        log.debug("oms_uri = %s", oms_uri)
        self.oms = CIOMSClientFactory.create_instance(oms_uri)
        OmsTestMixin.start_http_server()

        def done():
            CIOMSClientFactory.destroy_instance(self.oms)
            event_notifications = OmsTestMixin.stop_http_server()
            log.info("event_notifications = %s" % str(event_notifications))

        self.addCleanup(done)
Example #2
0
    def setUp(self):
        self._start_container()

        self._pp = pprint.PrettyPrinter()

        log.debug("oms_uri = %s", OMS_URI)
        self.oms = CIOMSClientFactory.create_instance(OMS_URI)

        self._get_platform_attributes()

        url = OmsTestMixin.start_http_server()
        log.info("TestPlatformInstrument:setup http url %s", url)

        result = self.oms.event.register_event_listener(url)
        log.info(
            "TestPlatformInstrument:setup register_event_listener result %s",
            result)

        #        response = self.oms.port.get_platform_ports('LPJBox_CI_Ben_Hall')
        #        log.info("TestPlatformInstrument:setup get_platform_ports %s", response)

        self.container.start_rel_from_url('res/deploy/r2deploy.yml')

        # Now create client to DataProductManagementService
        self.rrclient = ResourceRegistryServiceClient(node=self.container.node)
        self.pubsubclient = PubsubManagementServiceClient(
            node=self.container.node)
        self.imsclient = InstrumentManagementServiceClient(
            node=self.container.node)
        self.datasetclient = DatasetManagementServiceClient(
            node=self.container.node)
        self.processdispatchclient = ProcessDispatcherServiceClient(
            node=self.container.node)
        self.dpclient = DataProductManagementServiceClient(
            node=self.container.node)
        self.damsclient = DataAcquisitionManagementServiceClient(
            node=self.container.node)
        self.dataset_management = DatasetManagementServiceClient()
        self.RR2 = EnhancedResourceRegistryClient(self.rrclient)

        self.org_id = self.RR2.create(any_old(RT.Org))
        log.debug("Org created: %s", self.org_id)

        # see _set_receive_timeout
        self._receive_timeout = 177

        self.instrument_device = ''
        self.platform_device = ''
        self.platform_agent_instance_id = ''
        self._pa_client = ''

        def done():
            CIOMSClientFactory.destroy_instance(self.oms)
            event_notifications = OmsTestMixin.stop_http_server()
            log.info("event_notifications = %s" % str(event_notifications))

        self.addCleanup(done)
    def setUp(self):
        self._start_container()

        self._pp = pprint.PrettyPrinter()

        log.debug("oms_uri = %s", OMS_URI)
        self.oms = CIOMSClientFactory.create_instance(OMS_URI)

        self._get_platform_attributes()

        url = OmsTestMixin.start_http_server()
        log.info("TestPlatformInstrument:setup http url %s", url)

        result = self.oms.event.register_event_listener(url)
        log.info("TestPlatformInstrument:setup register_event_listener result %s", result)

#        response = self.oms.port.get_platform_ports('LPJBox_CI_Ben_Hall')
#        log.info("TestPlatformInstrument:setup get_platform_ports %s", response)

        self.container.start_rel_from_url('res/deploy/r2deploy.yml')

        # Now create client to DataProductManagementService
        self.rrclient = ResourceRegistryServiceClient(node=self.container.node)
        self.pubsubclient =  PubsubManagementServiceClient(node=self.container.node)
        self.imsclient = InstrumentManagementServiceClient(node=self.container.node)
        self.datasetclient =  DatasetManagementServiceClient(node=self.container.node)
        self.processdispatchclient = ProcessDispatcherServiceClient(node=self.container.node)
        self.dpclient = DataProductManagementServiceClient(node=self.container.node)
        self.damsclient = DataAcquisitionManagementServiceClient(node=self.container.node)
        self.dataset_management = DatasetManagementServiceClient()
        self.RR2  = EnhancedResourceRegistryClient(self.rrclient)

        self.org_id = self.RR2.create(any_old(RT.Org))
        log.debug("Org created: %s", self.org_id)

        # see _set_receive_timeout
        self._receive_timeout = 177

        self.instrument_device = ''
        self.platform_device = ''
        self.platform_agent_instance_id = ''
        self._pa_client = ''

        def done():
            CIOMSClientFactory.destroy_instance(self.oms)
            event_notifications = OmsTestMixin.stop_http_server()
            log.info("event_notifications = %s" % str(event_notifications))

        self.addCleanup(done)
 def tearDownClass(cls):
     CIOMSClientFactory.destroy_instance(cls.oms)
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     cls.oms = CIOMSClientFactory.create_instance()
     OmsTestMixin.start_http_server()
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     cls.oms = CIOMSClientFactory.create_instance()
 def done():
     CIOMSClientFactory.destroy_instance(self.oms)
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))
Example #8
0
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     if os.getenv('OMS') == "rsn":
         # use FQDM for local host if testing against actual RSN OMS:
         cls._use_fqdn_for_event_listener = True
Example #9
0
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     if cls.using_actual_rsn_oms_endpoint():
         # use FQDM for local host if testing against actual RSN OMS:
         cls._use_fqdn_for_event_listener = True
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     if os.getenv('OMS') == "rsn":
         # use FQDM for local host if testing against actual RSN OMS:
         cls._use_fqdn_for_event_listener = True
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
Example #12
0
 def tearDownClass(cls):
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))
Example #13
0
 def done():
     CIOMSClientFactory.destroy_instance(self.oms)
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))
 def tearDownClass(cls):
     if isinstance(cls.oms, CIOMSSimulator):
         cls.oms._deactivate_simulator()
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))
Example #15
0
 def setUpClass(cls):
     OmsTestMixin.setUpClass()
     if cls.using_actual_rsn_oms_endpoint():
         # use FQDM for local host if testing against actual RSN OMS:
         cls._use_fqdn_for_event_listener = True
 def tearDownClass(cls):
     if isinstance(cls.oms, CIOMSSimulator):
         cls.oms._deactivate_simulator()
     event_notifications = OmsTestMixin.stop_http_server()
     log.info("event_notifications = %s" % str(event_notifications))