Exemple #1
0
    def __init__(self, options):
        """
        ConductorPlugins initialization

        @type options: C{Object}
        @param options: TestRunData object
        """
        root_dir = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
        plugin_dir = os.path.join(root_dir, "plug-ins")
        self._plugins = []
        LOG.debug("plugin_dir: %s" % plugin_dir)
        LOG.debug(plugins_iter(plugin_dir, "ots.plugin.conductor"))
        for plugin_klass in plugins_iter(plugin_dir, "ots.plugin.conductor"):
            LOG.debug("Conductor plug-in found: '%s'" % plugin_klass)
            with plugin_exception_policy(self.SWALLOW_EXCEPTIONS):
                plugin = plugin_klass(options)
                LOG.debug("Adding a conductor plug-in: '%s'" % plugin)
                self._plugins.append(plugin)
    def __init__(self, options):
        """
        ConductorPlugins initialization

        @type options: C{Object}
        @param options: TestRunData object
        """
        root_dir = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
        plugin_dir = os.path.join(root_dir, "plug-ins")
        self._plugins = []
        LOG.debug("plugin_dir: %s" % plugin_dir)
        LOG.debug(plugins_iter(plugin_dir, "ots.plugin.conductor"))
        for plugin_klass in plugins_iter(plugin_dir, "ots.plugin.conductor"):
            LOG.debug("Conductor plug-in found: '%s'" % plugin_klass)
            with plugin_exception_policy(self.SWALLOW_EXCEPTIONS):
                plugin = plugin_klass(options)
                LOG.debug("Adding a conductor plug-in: '%s'" % plugin)
                self._plugins.append(plugin)
Exemple #3
0
    def __init__(self,
                 request_id,
                 testrun_uuid,
                 sw_product = None,
                 image = None,
                 **kwargs):

        """
        @type request_id: C{str}
        @param request_id: An identifier for the request from the client

        @type testrun_uuid: C{str}
        @param testrun_uuid: The unique identifier for the testrun

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

        @type image: C{str}
        @param image: The URL of the image
        """
        root_dir = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
        plugin_dir = os.path.join(root_dir, "plugins")
        self._publishers = []
        LOG.debug(root_dir)
        LOG.debug(plugin_dir)
        LOG.debug(plugins_iter(plugin_dir, "ots.publisher_plugin"))
        for publisher_klass in plugins_iter(plugin_dir, "ots.publisher_plugin"):
            LOG.debug("Publisher found: '%s'"%(publisher_klass))
            with plugin_exception_policy(self.SWALLOW_EXCEPTIONS):
                publisher = publisher_klass(request_id,
                                        testrun_uuid, 
                                        sw_product, 
                                        image,
                                        **kwargs)
                LOG.debug("Adding publisher: '%s'"%(publisher))
                self._publishers.append(publisher)
        self._share_uris(testrun_uuid)
        
        DTO_SIGNAL.connect(self._callback)
Exemple #4
0
    def __init__(self,
                 request_id,
                 testrun_uuid,
                 sw_product=None,
                 image=None,
                 **kwargs):
        """
        @type request_id: C{str}
        @param request_id: An identifier for the request from the client

        @type testrun_uuid: C{str}
        @param testrun_uuid: The unique identifier for the testrun

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

        @type image: C{str}
        @param image: The URL of the image
        """
        root_dir = os.path.split(os.path.dirname(os.path.abspath(__file__)))[0]
        plugin_dir = os.path.join(root_dir, "plugins")
        self._publishers = []
        LOG.debug(root_dir)
        LOG.debug(plugin_dir)
        LOG.debug(plugins_iter(plugin_dir, "ots.publisher_plugin"))
        for publisher_klass in plugins_iter(plugin_dir,
                                            "ots.publisher_plugin"):
            LOG.debug("Publisher found: '%s'" % (publisher_klass))
            with plugin_exception_policy(self.SWALLOW_EXCEPTIONS):
                publisher = publisher_klass(request_id, testrun_uuid,
                                            sw_product, image, **kwargs)
                LOG.debug("Adding publisher: '%s'" % (publisher))
                self._publishers.append(publisher)
        self._share_uris(testrun_uuid)

        DTO_SIGNAL.connect(self._callback)