From bcdc47057490d2349ca9e110c1f05bd4dc67aeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Thu, 29 Aug 2019 11:02:31 +0100 Subject: [PATCH] Changes based on code review. --- src/lib/y2network/dialogs/s390_device_activation.rb | 2 ++ src/lib/y2network/s390_device_activator.rb | 9 ++++++++- src/lib/y2network/s390_device_activators/ctc.rb | 3 ++- src/lib/y2network/s390_device_activators/lcs.rb | 7 ++++++- src/lib/y2network/s390_device_activators/qeth.rb | 2 ++ src/lib/y2network/widgets/s390_common.rb | 5 +++-- 6 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/lib/y2network/dialogs/s390_device_activation.rb b/src/lib/y2network/dialogs/s390_device_activation.rb index 126f406a0..fb4d04354 100644 --- a/src/lib/y2network/dialogs/s390_device_activation.rb +++ b/src/lib/y2network/dialogs/s390_device_activation.rb @@ -31,6 +31,8 @@ class S390DeviceActivation < CWM::Dialog def self.for(builder) return nil unless builder.type case builder.type.short_name + # Both interfaces uses the qeth driver and uses the same configuration + # for activating the group device. when "qeth", "hsi" require "y2network/dialogs/s390_qeth_activation" require "y2network/s390_device_activators/qeth" diff --git a/src/lib/y2network/s390_device_activator.rb b/src/lib/y2network/s390_device_activator.rb index 424336be7..e8e3e8503 100644 --- a/src/lib/y2network/s390_device_activator.rb +++ b/src/lib/y2network/s390_device_activator.rb @@ -21,6 +21,7 @@ require "yast2/execute" module Y2Network + # This class is responsable of activating the supported S390 devices. class S390DeviceActivator extend Forwardable include Yast::Logger @@ -37,6 +38,9 @@ def self.for(builder) nil end + # Constructor + # + # @param [Y2Network::InterfaceConfigBuilder] def initialize(builder) @builder = builder end @@ -46,6 +50,9 @@ def configure_attributes [] end + # Convenience method for obtaining the short name of the builder's type.. + # + # @return string def type builder.type.short_name end @@ -89,7 +96,7 @@ def configured_interface Yast::Execute.stdout.on_target!(cmd).chomp end - # Makes a new proposal + # Makes a new configuration proposal def proposal end end diff --git a/src/lib/y2network/s390_device_activators/ctc.rb b/src/lib/y2network/s390_device_activators/ctc.rb index 59d2c6a83..0737454a1 100644 --- a/src/lib/y2network/s390_device_activators/ctc.rb +++ b/src/lib/y2network/s390_device_activators/ctc.rb @@ -21,6 +21,7 @@ module Y2Network module S390DeviceActivators + # This class is responsible of activating CTC group devices. class Ctc < S390DeviceActivator def_delegators :@builder, :read_channel, :read_channel=, @@ -39,7 +40,7 @@ def configure_attributes ["protocol=#{builder.protocol}"] end - # Modifies the read, write and data channel from the the device id + # Modifies the read and write channel from the the device id def propose_channels id = device_id_from(hwinfo.busid) return unless id diff --git a/src/lib/y2network/s390_device_activators/lcs.rb b/src/lib/y2network/s390_device_activators/lcs.rb index 6af8c2f88..5a8f61655 100644 --- a/src/lib/y2network/s390_device_activators/lcs.rb +++ b/src/lib/y2network/s390_device_activators/lcs.rb @@ -21,7 +21,12 @@ module Y2Network module S390DeviceActivators - # The Lcs device activator is based in Ctc + # The Lcs device activator is based in Ctc as both have two group device + # channels (read and write). + # + # In the past they shared also the configure command 'ctc_configure)' and + # the 'protocol' attribute was needed, but as the configuration has + # been moved to 'chzdev' command it is not the case anymore. class Lcs < Ctc def configure_attributes return [] unless builder.timeout diff --git a/src/lib/y2network/s390_device_activators/qeth.rb b/src/lib/y2network/s390_device_activators/qeth.rb index fd2eaaac6..b20fc5865 100644 --- a/src/lib/y2network/s390_device_activators/qeth.rb +++ b/src/lib/y2network/s390_device_activators/qeth.rb @@ -21,6 +21,8 @@ module Y2Network module S390DeviceActivators + # This class is responsible of activating OSA-Express (QDIO) and + # HiperSockets group devices (qeth driver). class Qeth < S390DeviceActivator def_delegators :@builder, :read_channel, :read_channel=, diff --git a/src/lib/y2network/widgets/s390_common.rb b/src/lib/y2network/widgets/s390_common.rb index ded7f832b..852027629 100644 --- a/src/lib/y2network/widgets/s390_common.rb +++ b/src/lib/y2network/widgets/s390_common.rb @@ -22,7 +22,7 @@ module Y2Network module Widgets - # Widget for setting the s390 device write channel + # Widget for setting the Lcs group device lancmd timeout class S390LanCmdTimeout < CWM::InputField # Constructor # @@ -133,7 +133,8 @@ def store # @see CWM::AbstractWidget def help - _("

Choose the Port Number for this interface.

") + _("

Choose which physical Port Number on the OSA Adapter " \ + "will be used by this interface. (0 by default)

") end end