def __init__(self, target, dispatcher_config, oob_file, job_data, output_dir): self.config = dispatcher_config self.job_data = job_data self.output = Outputter(output_dir) self.logfile_read = self.output.logfile_read self.device_config = get_device_config(target) self._client = LavaClient(self, self.device_config) self.test_data = LavaTestData() self.oob_file = oob_file self.selinux = None self._host_result_dir = None self.any_device_bundles = False self.repo_keys = ['git-repo', 'bzr-repo', 'tar-repo']
def __init__(self, context, config): super(DynamicVmTarget, self).__init__(context, config) device_type = config.dynamic_vm_backend_device_type if device_type not in self.supported_backends.keys(): raise CriticalError("%s is not supported as a backend" % device_type) backend_config = get_device_config(config.hostname, backend_device_type=device_type) self.backend = get_target(context, backend_config) adapter_class = self.supported_backends[device_type]() self.backend_adapter = adapter_class(self.backend)
def device_config(self): try: return get_device_config(self.args.device) except Exception: raise CommandError("no such device: %s" % self.args.device)
def create_device_config(name, data): create_config("devices/%s.conf" % name, data) lava_dispatcher.config.custom_config_path = tmp_config_dir config = get_device_config(name) return config
def __init__(self, hostname): self.config = get_device_config(hostname)