def generate_kickstart_network_data(self, network_data_class): rv = [] for cfg in self._device_configurations.get_all(): network_data = None if cfg.device_type != NM.DeviceType.WIFI and cfg.connection_uuid: ifcfg = get_ifcfg_file([("UUID", cfg.connection_uuid)]) if not ifcfg: log.debug("Ifcfg file for %s not found.") continue network_data = get_kickstart_network_data(ifcfg, self.nm_client, network_data_class) if not network_data: log.debug("Device configuration %s does not generate any kickstart data", cfg) continue if cfg.device_name: if self._is_device_activated(cfg.device_name): network_data.activate = True else: # First network command defaults to --activate so we must # use --no-activate explicitly to prevent the default # (Default value is None) if not rv: network_data.activate = False rv.append(network_data) return rv
def generate_kickstart_network_data(self, network_data_class): rv = [] for cfg in self._device_configurations.get_all(): network_data = None if cfg.device_type != NM.DeviceType.WIFI and cfg.connection_uuid: ifcfg = get_ifcfg_file([("UUID", cfg.connection_uuid)]) if not ifcfg: log.debug("Ifcfg file for %s not found.") continue network_data = get_kickstart_network_data(ifcfg, self.nm_client, network_data_class) if not network_data: log.debug("Device configuration %s does not generate any kickstart data", cfg) continue if cfg.device_name: if self._is_device_activated(cfg.device_name): network_data.activate = True else: # First network command defaults to --activate so we must # use --no-activate explicitly to prevent the default # (Default value is None) if not rv: network_data.activate = False rv.append(network_data) return rv