def _process_options(self): """ Process the options given in the command line. """ cfg = None vt_type_setting = 'option --vt-type' vt_config_setting = 'option --vt-config' vt_type = get_opt(self.options, 'vt_type') vt_config = get_opt(self.options, 'vt_config') if (not vt_type) and (not vt_config): raise ValueError("No %s or %s specified" % (vt_type_setting, vt_config_setting)) if vt_type: if vt_type not in SUPPORTED_TEST_TYPES: raise ValueError( "Invalid %s %s. Valid values: %s. " % (vt_type_setting, vt_type, " ".join(SUPPORTED_TEST_TYPES))) self.cartesian_parser = cartesian_config.Parser(debug=False) if vt_config: cfg = os.path.abspath(vt_config) self.cartesian_parser.parse_file(cfg) elif get_opt(self.options, 'vt_filter_default_filters'): cfg = data_dir.get_backend_cfg_path(vt_type, 'tests-shared.cfg') self.cartesian_parser.parse_file(cfg) for arg in ('no_9p_export', 'no_virtio_rng', 'no_pci_assignable', 'smallpages', 'default_bios', 'bridge'): if arg not in get_opt(self.options, 'vt_filter_default_filters'): self.cartesian_parser.only_filter(arg) if 'image_backend' not in get_opt(self.options, 'vt_filter_default_filters'): self.cartesian_parser.only_filter('(image_backend=' 'filesystem)') if 'multihost' not in get_opt(self.options, 'vt_filter_default_filters'): self.cartesian_parser.no_filter('multihost') else: cfg = data_dir.get_backend_cfg_path(vt_type, 'tests.cfg') self.cartesian_parser.parse_file(cfg) if vt_type != 'lvsb': self._process_general_options() if vt_type == 'qemu': self._process_qemu_specific_options() elif vt_type == 'lvsb': self._process_lvsb_specific_options() elif vt_type == 'openvswitch': self._process_qemu_specific_options() elif vt_type == 'libvirt': self._process_libvirt_specific_options() elif vt_type == 'spice': self._process_spice_specific_options() self._process_extra_params()
def _process_options(self): """ Process the options given in the command line. """ cfg = None vt_type_setting = 'option --vt-type' vt_config_setting = 'option --vt-config' if (not self.options.vt_type) and (not self.options.vt_config): raise ValueError("No %s or %s specified" % (vt_type_setting, vt_config_setting)) if self.options.vt_type: if self.options.vt_type not in SUPPORTED_TEST_TYPES: raise ValueError("Invalid %s %s. Valid values: %s. " % (vt_type_setting, self.options.vt_type, " ".join(SUPPORTED_TEST_TYPES))) self.cartesian_parser = cartesian_config.Parser(debug=False) if self.options.vt_config: cfg = os.path.abspath(self.options.vt_config) if not self.options.vt_config: cfg = data_dir.get_backend_cfg_path(self.options.vt_type, 'tests.cfg') self.cartesian_parser.parse_file(cfg) if self.options.vt_type != 'lvsb': self._process_general_options() if self.options.vt_type == 'qemu': self._process_qemu_specific_options() elif self.options.vt_type == 'lvsb': self._process_lvsb_specific_options() elif self.options.vt_type == 'openvswitch': self._process_qemu_specific_options() elif self.options.vt_type == 'libvirt': self._process_libvirt_specific_options() elif self.options.vt_type == 'spice': self._process_spice_specific_options() self._process_extra_params()
def _process_options(self): """ Process the options given in the command line. """ cfg = None vt_type_setting = 'option --vt-type' vt_config_setting = 'option --vt-config' if (not self.options.vt_type) and (not self.options.vt_config): raise ValueError("No %s or %s specified" % (vt_type_setting, vt_config_setting)) if self.options.vt_type: if self.options.vt_type not in SUPPORTED_TEST_TYPES: raise ValueError("Invalid %s %s. Valid values: %s. " % (vt_type_setting, self.options.vt_type, " ".join(SUPPORTED_TEST_TYPES))) self.cartesian_parser = cartesian_config.Parser(debug=False) if self.options.vt_config: cfg = os.path.abspath(self.options.vt_config) if not self.options.vt_config: cfg = data_dir.get_backend_cfg_path(self.options.vt_type, 'tests.cfg') self.cartesian_parser.parse_file(cfg) if self.options.vt_type != 'lvsb': self._process_general_options() if self.options.vt_type == 'qemu': self._process_qemu_specific_options() elif self.options.vt_type == 'lvsb': self._process_lvsb_specific_options() elif self.options.vt_type == 'openvswitch': self._process_qemu_specific_options() elif self.options.vt_type == 'libvirt': self._process_libvirt_specific_options() elif self.options.vt_type == 'spice': self._process_spice_specific_options() self._process_extra_params()