Beispiel #1
0
    def __init__(self, sw_product, request_id, **kwargs):
        """
        The kwargs are the dictionary of arguments provided by the 
        request.
        Note. That these must contain an 'image'

        @type sw_product: C{str}
        @param sw_product: Name of the sw product this testrun belongs to

        @type request_id: C{str}
        @param request_id: An identifier for the request from the client
        """
        sandbox.is_on = True
        self._sw_product = sw_product
        self._request_id = request_id
        self._testrun_uuid = None

        self._options_factory = OptionsFactory(self.sw_product, kwargs)
        self._taskrunner = None

        self._options = None
        
        self._filehandler = None
        self._initialize_logger()

        LOG.debug(Options.format_dict(self._options_factory.all_options_dict))
        self._publishers = Publishers(self.request_id, 
                                      self.testrun_uuid, 
                                      self.sw_product,
                                      **self._options_factory.all_options_dict)
        
        LOG.debug("Publishers initilialised... sandbox switched off...")
        LOG.info("OTS Server. version '%s'" % (__VERSION__))

        # Log incoming options to help testrun debugging.
        # These need to match the xmlrpc interface options!
        try:
            incoming_options = deepcopy(kwargs)
            notify_list = ""
            if "notify_list" in incoming_options.keys():
                notify_list = incoming_options["notify_list"]
                del incoming_options["notify_list"]
            incoming_options = Options.format_dict(incoming_options)
            LOG.info(("Incoming request: program: %s, request: %s, " \
                          "notify_list: %s, options: %s")\
                         % (sw_product,
                            request_id,
                            notify_list,
                            incoming_options))
            # Send first monitor event
            send_monitor_event(MonitorType.TESTRUN_REQUESTED, __name__)
        except ValueError:
            pass
Beispiel #2
0
    def __init__(self, sw_product, request_id, **kwargs):
        """
        The kwargs are the dictionary of arguments provided by the 
        request.
        Note. That these must contain an 'image'

        @type sw_product: C{str}
        @param sw_product: Name of the sw product this testrun belongs to

        @type request_id: C{str}
        @param request_id: An identifier for the request from the client
        """
        sandbox.is_on = True
        self._sw_product = sw_product
        self._request_id = request_id
        self._testrun_uuid = None

        self._options_factory = OptionsFactory(self.sw_product, kwargs)
        self._taskrunner = None

        self._options = None

        self._filehandler = None
        self._initialize_logger()

        LOG.debug(Options.format_dict(self._options_factory.all_options_dict))
        self._publishers = Publishers(self.request_id, self.testrun_uuid,
                                      self.sw_product,
                                      **self._options_factory.all_options_dict)

        LOG.debug("Publishers initilialised... sandbox switched off...")
        LOG.info("OTS Server. version '%s'" % (__VERSION__))

        # Log incoming options to help testrun debugging.
        # These need to match the xmlrpc interface options!
        try:
            incoming_options = deepcopy(kwargs)
            notify_list = ""
            if "notify_list" in incoming_options.keys():
                notify_list = incoming_options["notify_list"]
                del incoming_options["notify_list"]
            incoming_options = Options.format_dict(incoming_options)
            LOG.info(("Incoming request: program: %s, request: %s, " \
                          "notify_list: %s, options: %s")\
                         % (sw_product,
                            request_id,
                            notify_list,
                            incoming_options))
            # Send first monitor event
            send_monitor_event(MonitorType.TESTRUN_REQUESTED, __name__)
        except ValueError:
            pass
Beispiel #3
0
 def __call__(self):
     """
     @rtype: C{ots.server.hub.options.Options}
     @return: The Options
     """
     if not self.core_options_dict.has_key("image"):
         raise ValueError("Missing `image` parameter")
     LOG.debug("Calling options with kwarg: %s" % 
               (Options.format_dict(self.core_options_dict)))
     return Options(**self.processed_core_options_dict)