From 97328b14650afc55d6eb8001c588eccb5148aa6b Mon Sep 17 00:00:00 2001 From: Knut Anderssen Date: Thu, 7 Nov 2024 09:42:46 +0000 Subject: [PATCH] Fix yardoc --- src/lib/y2network/config_writer.rb | 7 +++++++ src/lib/y2network/network_manager/config_writer.rb | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/lib/y2network/config_writer.rb b/src/lib/y2network/config_writer.rb index 63f84bad4..6b9c47e33 100644 --- a/src/lib/y2network/config_writer.rb +++ b/src/lib/y2network/config_writer.rb @@ -95,18 +95,21 @@ def write(config, old_config = nil, only: nil) # # @param _config [Y2Network::Config] configuration to write # @param _old_config [Y2Network::Config, nil] original configuration used for detecting changes + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_routing(_config, _old_config, _issues_list); end # Writes the connection configurations # # @param _config [Y2Network::Config] configuration to write # @param _old_config [Y2Network::Config, nil] original configuration used for detecting changes + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_connections(_config, _old_config, _issues_list); end # Updates the DNS configuration # # @param config [Y2Network::Config] Current config object # @param old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_dns(config, old_config, _issues_list) old_dns = old_config.dns if old_config writer = Y2Network::ConfigWriters::DNSWriter.new @@ -117,6 +120,7 @@ def write_dns(config, old_config, _issues_list) # # @param config [Y2Network::Config] Current config object # @param old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_hostname(config, old_config, _issues_list) old_hostname = old_config.hostname if old_config writer = Y2Network::ConfigWriters::HostnameWriter.new @@ -128,6 +132,7 @@ def write_hostname(config, old_config, _issues_list) # # @param config [Y2Network::Config] Current config object # @param _old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_interfaces(config, _old_config, _issues_list) writer = Y2Network::ConfigWriters::InterfacesWriter.new(reload: !Yast::Lan.write_only) writer.write(config.interfaces) @@ -137,6 +142,7 @@ def write_interfaces(config, _old_config, _issues_list) # # @param config [Y2Network::Config] Current config object # @param _old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_drivers(config, _old_config, _issues_list) Y2Network::Driver.write_options(config.drivers) end @@ -146,6 +152,7 @@ def write_drivers(config, _old_config, _issues_list) # TODO: extract this behaviour to a separate class. # # @param routing [Y2Network::Routing] routing configuration + # @param issues_list [Y2Issues::List] list of issues detected until the method is call def write_ip_forwarding(routing, issues_list) sysctl_config = CFA::SysctlConfig.new sysctl_config.load diff --git a/src/lib/y2network/network_manager/config_writer.rb b/src/lib/y2network/network_manager/config_writer.rb index 16c8b7715..d4a252fcf 100644 --- a/src/lib/y2network/network_manager/config_writer.rb +++ b/src/lib/y2network/network_manager/config_writer.rb @@ -19,6 +19,7 @@ require "y2network/config_writer" require "y2network/network_manager/connection_config_writer" +require "y2issues" module Y2Network module NetworkManager @@ -29,7 +30,8 @@ class ConfigWriter < Y2Network::ConfigWriter # Updates the ip forwarding as the routes are written when writing the connections # # @param config [Y2Network::Config] Current config object - # @param old_config [Y2Network::Config,nil] Config object with original configuration + # @param _old_config [Y2Network::Config,nil] Config object with original configuration + # @param issues_list [Y2Issues::List] list of issues detected until the method is call def write_routing(config, _old_config, issues_list) write_ip_forwarding(config.routing, issues_list) @@ -45,6 +47,7 @@ def write_routing(config, _old_config, issues_list) # # @param config [Y2Network::Config] Current config object # @param _old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call def write_connections(config, _old_config, _issues_list) writer = Y2Network::NetworkManager::ConnectionConfigWriter.new config.connections.each do |conn| @@ -64,8 +67,9 @@ def write_connections(config, _old_config, _issues_list) # to the configuration file (see bsc#1181701). # # @param config [Y2Network::Config] Current config object - # @param old_config [Y2Network::Config,nil] Config object with original configuration - def write_dns(config, old_config, _issues_list) + # @param _old_config [Y2Network::Config,nil] Config object with original configuration + # @param _issues_list [Y2Issues::List] list of issues detected until the method is call + def write_dns(config, _old_config, _issues_list) static = config.connections.by_bootproto(Y2Network::BootProtocol::STATIC) return super if static.empty? || config.dns.nameservers.empty?