Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2021-06-15 16:37:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Tue Jun 15 16:37:05 2021 rev:456 rq:899067 version:4.4.15 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2021-06-05 23:31:33.408440544 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.32437/yast2-network.changes 2021-06-15 16:37:21.545695781 +0200 @@ -1,0 +2,14 @@ +Tue Jun 8 08:44:23 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Use the linuxrc proxy settings for the HTTPS and FTP proxies + (bsc#1185016) +- 4.4.15 + +------------------------------------------------------------------- +Fri Jun 4 09:08:43 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Adopt the new YaST2::Equatable mixin in order to fix possible + errors when comparing objects (related to bsc#1186082) +- 4.4.14 + +------------------------------------------------------------------- Old: ---- yast2-network-4.4.13.tar.bz2 New: ---- yast2-network-4.4.15.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.zegfmF/_old 2021-06-15 16:37:22.177696876 +0200 +++ /var/tmp/diff_new_pack.zegfmF/_new 2021-06-15 16:37:22.181696883 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.4.13 +Version: 4.4.15 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only @@ -33,8 +33,8 @@ #for install task BuildRequires: yast2-storage-ng BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) -# Y2Issues -BuildRequires: yast2 >= 4.4.1 +# Yast::Equatable +BuildRequires: yast2 >= 4.4.7 BuildRequires: yast2-packager >= 4.0.18 # Product control need xml agent @@ -49,8 +49,8 @@ Requires: sysconfig >= 0.80.0 Requires: yast2-proxy Requires: yast2-storage-ng -# Y2Issues -Requires: yast2 >= 4.4.1 +# Yast::Equatable +Requires: yast2 >= 4.4.7 # Packages::vnc_packages Requires: augeas-lenses Requires: yast2-packager >= 4.0.18 ++++++ yast2-network-4.4.13.tar.bz2 -> yast2-network-4.4.15.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/package/yast2-network.changes new/yast2-network-4.4.15/package/yast2-network.changes --- old/yast2-network-4.4.13/package/yast2-network.changes 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/package/yast2-network.changes 2021-06-10 17:13:21.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Tue Jun 8 08:44:23 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Use the linuxrc proxy settings for the HTTPS and FTP proxies + (bsc#1185016) +- 4.4.15 + +------------------------------------------------------------------- +Fri Jun 4 09:08:43 UTC 2021 - Knut Anderssen <kanders...@suse.com> + +- Adopt the new YaST2::Equatable mixin in order to fix possible + errors when comparing objects (related to bsc#1186082) +- 4.4.14 + +------------------------------------------------------------------- Mon May 31 17:50:42 UTC 2021 - Michal Filka <mfi...@suse.com> - bnc#1185524 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/package/yast2-network.spec new/yast2-network-4.4.15/package/yast2-network.spec --- old/yast2-network-4.4.13/package/yast2-network.spec 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/package/yast2-network.spec 2021-06-10 17:13:21.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.4.13 +Version: 4.4.15 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only @@ -33,8 +33,8 @@ #for install task BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) BuildRequires: yast2-storage-ng -# Y2Issues -BuildRequires: yast2 >= 4.4.1 +# Yast::Equatable +BuildRequires: yast2 >= 4.4.7 BuildRequires: yast2-packager >= 4.0.18 # Product control need xml agent @@ -49,8 +49,8 @@ Requires: sysconfig >= 0.80.0 Requires: yast2-proxy Requires: yast2-storage-ng -# Y2Issues -Requires: yast2 >= 4.4.1 +# Yast::Equatable +Requires: yast2 >= 4.4.7 # Packages::vnc_packages Requires: yast2-packager >= 4.0.18 Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/network/install_inf_convertor.rb new/yast2-network-4.4.15/src/lib/network/install_inf_convertor.rb --- old/yast2-network-4.4.13/src/lib/network/install_inf_convertor.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/network/install_inf_convertor.rb 2021-06-10 17:13:21.000000000 +0200 @@ -95,6 +95,11 @@ ex["proxy_password"] = proxy.password proxy.password = nil ex["#{proxyProto}_proxy"] = proxy.to_s + # Use the proxy also for https and ftp + if proxyProto == "http" + ex["https_proxy"] = proxy.to_s + ex["ftp_proxy"] = proxy.to_s + end ex["enabled"] = true log.info "Writing proxy settings: #{proxyProto}_proxy = '#{proxy}'" log.debug "Writing proxy settings: #{ex}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/backend.rb new/yast2-network-4.4.15/src/lib/y2network/backend.rb --- old/yast2-network-4.4.13/src/lib/y2network/backend.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/backend.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,16 +18,20 @@ # find current contact information at www.suse.com. require "yast" +require "yast2/equatable" module Y2Network # This class is the base class for the different network backends and also # responsible of listing the supported ones. class Backend include Yast::I18n + include Yast2::Equatable # @return [Symbol] backend id attr_reader :id + eql_attr :id + # Constructor # # @param id [Symbol] @@ -45,14 +49,6 @@ id.to_s end - def ==(other) - return false unless other - - id == other.id - end - - alias_method :eql?, :== - # Return the translated backend label # # @return [String] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/boot_protocol.rb new/yast2-network-4.4.15/src/lib/y2network/boot_protocol.rb --- old/yast2-network-4.4.13/src/lib/y2network/boot_protocol.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/boot_protocol.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,10 +18,13 @@ # find current contact information at www.suse.com. require "yast" +require "yast2/equatable" module Y2Network # This class represents the boot protocols which are supported (not all by all backends). class BootProtocol + include Yast2::Equatable + class << self # Returns all the existing protocols # @@ -45,6 +48,8 @@ attr_reader :name alias_method :to_s, :name + eql_attr :name + # Constructor # # @param name [String] protocol name @@ -66,18 +71,6 @@ STATIC == self end - # Determines whether two objects are equivalent - # - # They are equal when they refer to the same boot protocol (through the name). - # - # @param other [BootProtocol] Boot protocol to compare with - # @return [Boolean] - def ==(other) - name == other.name - end - - alias_method :eql?, :== - # iBFT boot protocol IBFT = new("ibft") # statically assigned interface properties diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/config.rb new/yast2-network-4.4.15/src/lib/y2network/config.rb --- old/yast2-network-4.4.13/src/lib/y2network/config.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/config.rb 2021-06-10 17:13:21.000000000 +0200 @@ -27,6 +27,7 @@ require "y2network/physical_interface" require "y2network/can_be_copied" require "y2network/backend" +require "yast2/equatable" module Y2Network # This class represents the current network configuration including interfaces, @@ -42,6 +43,7 @@ # config.routing.tables.first << route # config.write class Config + include Yast2::Equatable include CanBeCopied include Yast::Logger @@ -142,19 +144,7 @@ Y2Network::ConfigWriter.for(target).write(self, original, only: only) end - # Determines whether two configurations are equal - # - # @return [Boolean] true if both configurations are equal; false otherwise - def ==(other) - source == other.source && - backend == other.backend && - interfaces == other.interfaces && - routing == other.routing && - dns == other.dns && - hostname == other.hostname && - connections == other.connections && - s390_devices == other.s390_devices - end + eql_attr :source, :backend, :interfaces, :routing, :dns, :hostname, :connections, :s390_devices # Renames a given interface and the associated connections # @@ -290,8 +280,6 @@ ) end - alias_method :eql?, :== - private def delete_dependents(name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/base.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/base.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/base.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/base.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,6 +19,7 @@ require "yast" require "y2storage" +require "yast2/equatable" require "y2network/ip_address" require "y2network/interface_type" require "y2network/boot_protocol" @@ -39,7 +40,9 @@ # between two different {Y2Network::Config} objects. When they are copied, the same IDs are # kept, so it is easy to find out which connections have been added, removed or simply changed. class Base + include Yast2::Equatable include Yast::Logger + # A connection could belongs to a specific interface or not. In case of # no specific interface then it could be activated by the first available # device. @@ -96,20 +99,8 @@ @hostnames = [] end - # Compares ConnectionConfigs - # - # @return [Boolean] true when both connections are same - # false otherwise - def ==(other) - return false if self.class != other.class - - [:name, :interface, :bootproto, :ip, :ip_aliases, :mtu, :startmode, - :description, :lladdress, :ethtool_options, :firewall_zone, :hostname].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== + eql_attr :name, :interface, :bootproto, :ip, :ip_aliases, :mtu, :startmode, :description, + :lladdress, :ethtool_options, :firewall_zone, :hostname PROPOSED_PPPOE_MTU = 1492 # suggested value for PPPoE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/bonding.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/bonding.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/bonding.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/bonding.rb 2021-06-10 17:13:21.000000000 +0200 @@ -30,20 +30,14 @@ # @return [String] bond driver options attr_accessor :options + eql_attr :slaves, :options + def initialize super() @slaves = [] @options = "mode=active-backup miimon=100" end - def ==(other) - return false unless super - - options == other.options && ((slaves - other.slaves) + (other.slaves - slaves)).empty? - end - - alias_method :eql?, :== - def virtual? true end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/bridge.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/bridge.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/bridge.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/bridge.rb 2021-06-10 17:13:21.000000000 +0200 @@ -32,6 +32,8 @@ # @return [Integer] attr_accessor :forward_delay + eql_attr :ports, :stp, :forward_delay + def initialize super() @ports = [] @@ -39,18 +41,15 @@ @forward_delay = 15 end - def virtual? - true + def eql_hash + h = super + h[:ports] = h[:ports].sort_by(&:hash) if h.keys.include?(:ports) + h end - def ==(other) - return false unless super - - stp == other.stp && forward_delay == other.forward_delay && - ((ports - other.ports) + (other.ports - ports)).empty? + def virtual? + true end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/ctc.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/ctc.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/ctc.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/ctc.rb 2021-06-10 17:13:21.000000000 +0200 @@ -54,21 +54,13 @@ # @see https://github.com/SUSE/s390-tools/blob/master/ctc_configure#L16 attr_accessor :protocol + eql_attr :read_channel, :write_channel, :protocol + def initialize super() @protocol = 0 end - def ==(other) - return false unless super - - [:read_channel, :write_channel, :protocol].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== - # Returns the complete device id which contains the read ad write # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/infiniband.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/infiniband.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/infiniband.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/infiniband.rb 2021-06-10 17:13:21.000000000 +0200 @@ -29,21 +29,13 @@ # @return [IpoibMode] transport mode attr_accessor :ipoib_mode + eql_attr :ipoib_mode + def initialize super self.ipoib_mode = IpoibMode::DEFAULT end - - def ==(other) - return false unless super - - [:ipoib_mode].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/ip_config.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/ip_config.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/ip_config.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/ip_config.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,11 +19,13 @@ require "y2network/can_be_copied" require "y2network/ip_address" +require "yast2/equatable" module Y2Network module ConnectionConfig class IPConfig include CanBeCopied + include Yast2::Equatable # @return [IPAddress] IP address attr_accessor :address @@ -37,6 +39,8 @@ # ifcfg-* files) attr_accessor :id + eql_attr :address, :label, :remote_address, :broadcast, :id + # Constructor # # @param address [IPAddress] @@ -52,19 +56,6 @@ @remote_address = remote_address @broadcast = broadcast end - - # Determines whether IP configurations are equal - # - # @return [Boolean] true if both are equal; false otherwise - def ==(other) - return false if other.nil? - - address == other.address && label == other.label && - remote_address == other.remote_address && broadcast == other.broadcast && - id == other.id - end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/lcs.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/lcs.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/lcs.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/lcs.rb 2021-06-10 17:13:21.000000000 +0200 @@ -49,22 +49,14 @@ # @see https://www.ibm.com/support/knowledgecenter/en/linuxonibm/com.ibm.linux.z.ljdd/ljdd_t_lcs_wrk_timeout.html attr_accessor :timeout + eql_attr :read_channel, :write_channel, :timeout + # Constructor def initialize super() @timeout = 5 end - def ==(other) - return false unless super - - [:read_channel, :write_channel, :protocol, :timeout].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== - # Returns the complete device id which contains the read ad write # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/qeth.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/qeth.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/qeth.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/qeth.rb 2021-06-10 17:13:21.000000000 +0200 @@ -54,6 +54,9 @@ # @return [String] configuration extra attributes attr_accessor :attributes + eql_attr :read_channel, :write_channel, :data_channel, :layer2, + :port_number, :ipa_takeover, :attributes + # Constructor def initialize super() @@ -62,17 +65,6 @@ @ipa_takeover = false end - def ==(other) - return false unless super - - [:read_channel, :write_channel, :data_channel, :layer2, - :port_number, :ipa_takeover, :attributes].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== - # Returns the complete device id which contains the read, write and data # channels joined by ':' # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/tap.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/tap.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/tap.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/tap.rb 2021-06-10 17:13:21.000000000 +0200 @@ -28,6 +28,8 @@ # @return [String] tunnel group (name or GID) attr_accessor :group + eql_attr :owner, :group + def initialize super() @owner = "" @@ -37,16 +39,6 @@ def virtual? true end - - def ==(other) - return false unless super - - [:owner, :group].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/tun.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/tun.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/tun.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/tun.rb 2021-06-10 17:13:21.000000000 +0200 @@ -28,6 +28,8 @@ # @return [String] tunnel group (name or GID) attr_accessor :group + eql_attr :owner, :group + def initialize super() @owner = "" @@ -37,16 +39,6 @@ def virtual? true end - - def ==(other) - return false unless super - - [:owner, :group].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/vlan.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/vlan.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/vlan.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/vlan.rb 2021-06-10 17:13:21.000000000 +0200 @@ -32,20 +32,12 @@ # @return [Integer, nil] attr_accessor :vlan_id + eql_attr :parent_device, :vlan_id + # @see Y2Network::ConnectionConfig::Base#virtual? def virtual? true end - - def ==(other) - return false unless super - - [:parent_device, :vlan_id].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_config/wireless.rb new/yast2-network-4.4.15/src/lib/y2network/connection_config/wireless.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_config/wireless.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_config/wireless.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,11 +18,14 @@ # find current contact information at www.suse.com. require "y2network/connection_config/base" +require "yast2/equatable" module Y2Network module ConnectionConfig # Configuration for wireless connections class Wireless < Base + include Yast2::Equatable + # wireless options # # FIXME: Consider an enum @@ -94,18 +97,10 @@ self.bootproto = BootProtocol::DHCP end - def ==(other) - return false unless super - - [:mode, :essid, :nwid, :auth_mode, :wpa_psk, :key_length, :keys, :default_key, :nick, - :eap_mode, :eap_auth, :channel, :frequency, :bitrate, :ap, :ap_scanmode, - :wpa_password, :wpa_identity, :wpa_anonymous_identity, :ca_cert, :client_cert, - :client_key, :client_key_password].all? do |method| - public_send(method) == other.public_send(method) - end - end - - alias_method :eql?, :== + eql_attr :mode, :essid, :nwid, :auth_mode, :wpa_psk, :key_length, :keys, :default_key, :nick, + :eap_mode, :eap_auth, :channel, :frequency, :bitrate, :ap, :ap_scanmode, :wpa_password, + :wpa_identity, :wpa_anonymous_identity, :ca_cert, :client_cert, :client_key, + :client_key_password # @param wireless_mode [String] def mode=(wireless_mode) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/connection_configs_collection.rb new/yast2-network-4.4.15/src/lib/y2network/connection_configs_collection.rb --- old/yast2-network-4.4.13/src/lib/y2network/connection_configs_collection.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/connection_configs_collection.rb 2021-06-10 17:13:21.000000000 +0200 @@ -20,6 +20,7 @@ require "yast" require "y2network/can_be_copied" require "forwardable" +require "yast2/equatable" module Y2Network # A container for connection configurations objects. @@ -34,10 +35,13 @@ extend Forwardable include Yast::Logger include CanBeCopied + include Yast2::Equatable attr_reader :connection_configs alias_method :to_a, :connection_configs + eql_attr :connection_configs + def_delegators :@connection_configs, :each, :find, :push, :<<, :reject!, :map, :flat_map, :any?, :size, :first, :empty?, :each_with_object @@ -48,6 +52,14 @@ @connection_configs = connection_configs end + def eql_hash + h = super + if h.keys.include?(:connection_configs) + h[:connection_configs] = h[:connection_configs].sort_by(&:hash) + end + h + end + # Returns a connection configuration with the given name if present # # @param name [String] Connection name @@ -112,18 +124,5 @@ def select(&block) self.class.new(to_a.select(&block)) end - - # Compares ConnectionConfigsCollection - # - # @return [Boolean] true when both collections contain only equal connections, - # false otherwise - def ==(other) - ( - (connection_configs - other.connection_configs) + - (other.connection_configs - connection_configs) - ).empty? - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/dns.rb new/yast2-network-4.4.15/src/lib/y2network/dns.rb --- old/yast2-network-4.4.13/src/lib/y2network/dns.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/dns.rb 2021-06-10 17:13:21.000000000 +0200 @@ -17,9 +17,13 @@ # To contact SUSE LLC about this file by physical or electronic mail, you may # find current contact information at www.suse.com. +require "yast2/equatable" + module Y2Network # DNS configuration (nameservers, search domains, etc.). class DNS + include Yast2::Equatable + # @return [Array<IPAddr>] List of nameservers attr_accessor :nameservers @@ -29,6 +33,8 @@ # @return [String] resolv.conf update policy attr_accessor :resolv_conf_policy + eql_attr :nameservers, :searchlist, :resolv_conf_policy + # @todo receive an array instead all these arguments # # @param opts [Hash] DNS configuration options @@ -40,19 +46,5 @@ @searchlist = opts[:searchlist] || [] @resolv_conf_policy = opts[:resolv_conf_policy] end - - # @return [Array<Symbol>] Methods to check when comparing two instances - ATTRS = [ - :nameservers, :searchlist, :resolv_conf_policy - ].freeze - private_constant :ATTRS - - # Determines whether two set of DNS settings are equal - # - # @param other [DNS] DNS settings to compare with - # @return [Boolean] - def ==(other) - ATTRS.all? { |a| public_send(a) == other.public_send(a) } - end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/driver.rb new/yast2-network-4.4.15/src/lib/y2network/driver.rb --- old/yast2-network-4.4.13/src/lib/y2network/driver.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/driver.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,6 +19,7 @@ require "yast" require "y2network/can_be_copied" +require "yast2/equatable" module Y2Network # This class represents a driver for an interface @@ -26,6 +27,7 @@ # It is composed of a kernel module name and a string representing the module options class Driver include CanBeCopied + include Yast2::Equatable class << self # Returns a driver using the information from the system @@ -56,6 +58,8 @@ # @return [String] Kernel module parameters attr_accessor :params + eql_attr :name, :params + # Constructor # # @param name [String] Driver name @@ -65,17 +69,6 @@ @params = params end - # Determines whether two drivers are equal - # - # @param other [Object] Driver to compare with - # @return [Boolean] true if +other+ is a Driver instance with the same name and params; - # false otherwise. - def ==(other) - return false unless other.is_a?(Driver) - - name == other.name && params == other.params - end - # Adds driver parameters to be written to the underlying system # # Parameters are not written to disk until Y2Network::Driver.commit @@ -93,9 +86,5 @@ end Yast::SCR.Write(Yast::Path.new(".modules.options.#{name}"), params_hash) end - - # eql? (hash key equality) should alias ==, see also - # https://ruby-doc.org/core-2.3.3/Object.html#method-i-eql-3F - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/hostname.rb new/yast2-network-4.4.15/src/lib/y2network/hostname.rb --- old/yast2-network-4.4.13/src/lib/y2network/hostname.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/hostname.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,12 +19,15 @@ require "yast" require "y2network/wicked/hostname_reader" +require "yast2/equatable" Yast.import "Stage" module Y2Network # Hostname configuration class Hostname + include Yast2::Equatable + # @return [String] hostname as got from /etc/hostname attr_accessor :static @@ -68,19 +71,7 @@ alias_method :hostname, :proposal - # @return [Array<Symbol>] Methods to check when comparing two instances - ATTRS = [ - :dhcp_hostname, :static, :transient, :installer - ].freeze - private_constant :ATTRS - - # Determines whether two set of DNS settings are equal - # - # @param other [Hostname] Hostname settings to compare with - # @return [Boolean] - def ==(other) - ATTRS.all? { |a| public_send(a) == other.public_send(a) } - end + eql_attr :dhcp_hostname, :static, :transient, :installer # Reads the static hostname from /etc/hostname # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/hwinfo.rb new/yast2-network-4.4.15/src/lib/y2network/hwinfo.rb --- old/yast2-network-4.4.13/src/lib/y2network/hwinfo.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/hwinfo.rb 2021-06-10 17:13:21.000000000 +0200 @@ -20,6 +20,7 @@ require "yast" require "y2network/driver" require "y2network/udev_rule" +require "yast2/equatable" module Y2Network # A helper for {Hwinfo}. @@ -61,10 +62,13 @@ # FIXME: decide whether it should read hwinfo (on demand or at once) for a network # device and store only necessary info or just parse provided hash class Hwinfo + include Yast2::Equatable # TODO: this method should be private # @return [Hash] attr_reader :hwinfo + eql_attr :hwinfo + class << self # Creates a new instance containing hardware information for a given interface # @@ -271,14 +275,8 @@ @hwinfo["mac"] end - # Determines whether two objects are equivalent - # - # Ignores any element having a nil value. - # - # @param other [Hwinfo] Object to compare with - # @return [Boolean] - def ==(other) - hwinfo.compact == other.hwinfo.compact + def eql_hash + hwinfo.compact end alias_method :eql?, :== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/interface.rb new/yast2-network-4.4.15/src/lib/y2network/interface.rb --- old/yast2-network-4.4.13/src/lib/y2network/interface.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/interface.rb 2021-06-10 17:13:21.000000000 +0200 @@ -20,6 +20,7 @@ require "yast" require "y2network/interface_type" require "y2network/udev_rule" +require "yast2/equatable" module Y2Network # Network interface. @@ -37,6 +38,7 @@ class Interface extend Forwardable include Yast::Logger + include Yast2::Equatable # @return [String] Device name ('eth0', 'wlan0', etc.) attr_accessor :name @@ -81,24 +83,7 @@ @renaming_mechanism = :none end - # Determines whether two interfaces are equal - # - # @param other [Interface] Interface to compare with - # @return [Boolean] - def ==(other) - return false unless other.is_a?(Interface) - - name == other.name - end - - # eql? (hash key equality) should alias ==, see also - # https://ruby-doc.org/core-2.3.3/Object.html#method-i-eql-3F - alias_method :eql?, :== - - # Used by Array or Hash in order to compare equality of elements (bsc#1186082) - def hash - name.hash - end + eql_attr :name # Complete configuration of the interface # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/interfaces_collection.rb new/yast2-network-4.4.15/src/lib/y2network/interfaces_collection.rb --- old/yast2-network-4.4.13/src/lib/y2network/interfaces_collection.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/interfaces_collection.rb 2021-06-10 17:13:21.000000000 +0200 @@ -21,6 +21,7 @@ require "y2network/interface" require "y2network/can_be_copied" require "forwardable" +require "yast2/equatable" module Y2Network # A container for network devices. @@ -43,11 +44,14 @@ extend Forwardable include Yast::Logger include CanBeCopied + include Yast2::Equatable # @return [Array<Interface>] List of interfaces attr_reader :interfaces alias_method :to_a, :interfaces + eql_attr :interfaces + def_delegators :@interfaces, :each, :push, :<<, :reject!, :map, :flat_map, :any?, :size, :select, :find @@ -58,6 +62,12 @@ @interfaces = interfaces end + def eql_hash + h = super + h[:interfaces] = h[:interfaces].sort_by(&:hash) if h.keys.include?(:interfaces) + h + end + # Returns an interface with the given name if present # # @note It uses the hardware's name as a fallback if interface's name is not set @@ -115,16 +125,6 @@ @interfaces.map { |i| [i.old_name, i.name] }.flatten.compact end - # Compares InterfacesCollections - # - # @return [Boolean] true when both collections contain only equal interfaces, - # false otherwise - def ==(other) - ((interfaces - other.interfaces) + (other.interfaces - interfaces)).empty? - end - - alias_method :eql?, :== - # @return [String] returns free interface name for given prefix def free_name(prefix) free_names(prefix, 1).first diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/ip_address.rb new/yast2-network-4.4.15/src/lib/y2network/ip_address.rb --- old/yast2-network-4.4.13/src/lib/y2network/ip_address.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/ip_address.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,6 +19,7 @@ require "ipaddr" require "forwardable" +require "yast2/equatable" module Y2Network # This class represents an IP address @@ -44,6 +45,7 @@ # ip = IPAddress.new("192.168.122.1") # ip.to_s #=> "192.168.122.1" class IPAddress + include Yast2::Equatable extend Forwardable # @return [IPAddr] IP address @@ -51,6 +53,8 @@ # @return [Integer] Prefix attr_accessor :prefix + eql_attr :address, :prefix + def_delegators :@address, :ipv4?, :ipv6? class << self @@ -90,16 +94,6 @@ @address = IPAddr.new(value) end - # Determines whether two addresses are equivalent - # - # @param other [IPAddress] The address to compare with - # @return [Boolean] - def ==(other) - address == other.address && prefix == other.prefix - end - - alias_method :eql?, :== - # Determines whether a prefix is defined # # @return [Boolean] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/ipoib_mode.rb new/yast2-network-4.4.15/src/lib/y2network/ipoib_mode.rb --- old/yast2-network-4.4.13/src/lib/y2network/ipoib_mode.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/ipoib_mode.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,12 +18,14 @@ # find current contact information at www.suse.com. require "yast" +require "yast2/equatable" module Y2Network # This class represents the supported IPoIB transport modes. # @see https://www.kernel.org/doc/html/latest/infiniband/ipoib.html # IP over InfiniBand class IpoibMode + include Yast2::Equatable class << self # Returns all the existing modes # @@ -46,6 +48,8 @@ # @return [String] Returns mode name attr_reader :name + eql_attr :name + # Constructor # # @param name [String] mode name @@ -53,18 +57,6 @@ @name = name end - # Determines whether two objects are equivalent - # - # They are equal when they refer to the same IPoIB mode (through the name). - # - # @param other [IpoibMode] IPoIB mode to compare with - # @return [Boolean] - def ==(other) - name == other.name - end - - alias_method :eql?, :== - DATAGRAM = new("datagram") CONNECTED = new("connected") # Not a mode at all but the default value that will be choose by the IB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/ntp_server.rb new/yast2-network-4.4.15/src/lib/y2network/ntp_server.rb --- old/yast2-network-4.4.13/src/lib/y2network/ntp_server.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/ntp_server.rb 2021-06-10 17:13:21.000000000 +0200 @@ -19,6 +19,7 @@ require "yast" require "yaml" +require "yast2/equatable" Yast.import "Product" @@ -28,6 +29,8 @@ # It includes basic information about NTP servers. It could be extended # in the future as needed. class NtpServer + include Yast2::Equatable + # @return [String] Server's hostname attr_reader :hostname # @return [String,nil] Country code where the server is located @@ -35,6 +38,8 @@ # @return [String,nil] Server's location attr_reader :location + eql_attr :hostname, :country, :location + class << self DEFAULT_SERVERS = 4 DEFAULT_SUBDOMAIN = "pool.ntp.org".freeze @@ -71,15 +76,5 @@ @country = country @location = location end - - # Determines when two servers are the same - # - # @param other [NtpServer] Object to compare with - # @return [Boolean] true if both objects contain the same information; false otherwise - def ==(other) - hostname == other.hostname && country == other.country && location == other.location - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/route.rb new/yast2-network-4.4.15/src/lib/y2network/route.rb --- old/yast2-network-4.4.13/src/lib/y2network/route.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/route.rb 2021-06-10 17:13:21.000000000 +0200 @@ -16,9 +16,13 @@ # # To contact SUSE LLC about this file by physical or electronic mail, you may # find current contact information at www.suse.com. + +require "yast2/equatable" + module Y2Network # This class represents a network route class Route + include Yast2::Equatable # @return [IPAddr,:default] Destination; :default if it is the default route attr_accessor :to # @return [Interface,nil] Interface to associate the route to @@ -28,6 +32,8 @@ # @return [String] Additional options attr_accessor :options + eql_attr :to, :interface, :gateway, :options + # @param to [IPAddr,:default] Destination # @param interface [Interface, nil] Interface to associate the root to # @param gateway [IPAddr,nil] Gateway IP @@ -45,16 +51,5 @@ def default? to == :default end - - # Determines whether two routes are equal - # - # @param other [Route] Route to compare with - # @return [Boolean] - def ==(other) - to == other.to && interface == other.interface && gateway == other.gateway && - options == other.options - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/routing.rb new/yast2-network-4.4.15/src/lib/y2network/routing.rb --- old/yast2-network-4.4.13/src/lib/y2network/routing.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/routing.rb 2021-06-10 17:13:21.000000000 +0200 @@ -17,9 +17,13 @@ # To contact SUSE LLC about this file by physical or electronic mail, you may # find current contact information at www.suse.com. +require "yast2/equatable" + module Y2Network # General routing configuration storage (routing tables, forwarding setup, ...) class Routing + include Yast2::Equatable + # @return [Array<RoutingTable>] attr_reader :tables # @return [Boolean] whether IPv4 forwarding is enabled @@ -27,6 +31,8 @@ # @return [Boolean] whether IPv6 forwarding is enabled attr_accessor :forward_ipv6 + eql_attr :tables, :forward_ipv4, :forward_ipv6 + def initialize(tables: [], forward_ipv4: false, forward_ipv6: false) @tables = tables @forward_ipv4 = forward_ipv4 @@ -62,16 +68,5 @@ def remove_default_routes tables.each(&:remove_default_routes) end - - # Determines whether two set of routing settings are equal - # - # @param other [Routing] Routing settings to compare with - # @return [Boolean] - def ==(other) - forward_ipv4 == other.forward_ipv4 && forward_ipv6 == other.forward_ipv6 && - ((tables - other.tables) | (other.tables - tables)).empty? - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/routing_table.rb new/yast2-network-4.4.15/src/lib/y2network/routing_table.rb --- old/yast2-network-4.4.13/src/lib/y2network/routing_table.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/routing_table.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,6 +18,7 @@ # find current contact information at www.suse.com. require "forwardable" +require "yast2/equatable" module Y2Network # Represents a {https://en.wikipedia.org/wiki/Routing_table routing table} @@ -32,10 +33,13 @@ class RoutingTable extend Forwardable include Enumerable + include Yast2::Equatable # @return [Array<Route>] Routes included in the table attr_reader :routes + eql_attr :routes + def_delegator :@routes, :each def initialize(routes = []) @@ -46,15 +50,5 @@ def remove_default_routes @routes.reject!(&:default?) end - - # Determines whether two routing tables are equal - # - # @param other [RoutingTable] Routing table to compare with - # @return [Boolean] - def ==(other) - routes == other.routes - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/s390_group_device.rb new/yast2-network-4.4.15/src/lib/y2network/s390_group_device.rb --- old/yast2-network-4.4.13/src/lib/y2network/s390_group_device.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/s390_group_device.rb 2021-06-10 17:13:21.000000000 +0200 @@ -21,12 +21,14 @@ require "yast2/execute" require "y2network/interface_type" require "y2network/hwinfo" +require "yast2/equatable" module Y2Network # This class represents z Systems network devices which requires the use of # multiple I/O subchannels as 'QETH', 'CTC' and 'LCS' devices. class S390GroupDevice include Yast::Logger + include Yast2::Equatable # Command for configuring z Systems specific devices CONFIGURE_CMD = "/sbin/chzdev".freeze @@ -43,6 +45,8 @@ # @return [Boolean] attr_accessor :online + eql_attr :id + alias_method :name, :id # @param type [String] @@ -66,20 +70,6 @@ !online end - # Determines whether two s390 group devices are the same - # - # @param other [S390GroupDevice] device to compare with - # @return [Boolean] - def ==(other) - return false unless other.is_a?(S390GroupDevice) - - id == other.id - end - - # eql? (hash key equality) should alias ==, see also - # https://ruby-doc.org/core-2.3.3/Object.html#method-i-eql-3F - alias_method :eql?, :== - class << self # Returns the list of S390 group devices of the given type # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/s390_group_devices_collection.rb new/yast2-network-4.4.15/src/lib/y2network/s390_group_devices_collection.rb --- old/yast2-network-4.4.13/src/lib/y2network/s390_group_devices_collection.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/s390_group_devices_collection.rb 2021-06-10 17:13:21.000000000 +0200 @@ -21,6 +21,7 @@ require "y2network/s390_group_device" require "y2network/can_be_copied" require "forwardable" +require "yast2/equatable" module Y2Network # A container for network devices. @@ -36,11 +37,14 @@ extend Forwardable include Yast::Logger include CanBeCopied + include Yast2::Equatable # @return [Array<S390GroupDevice>] List of devices attr_reader :devices alias_method :to_a, :devices + eql_attr :devices + def_delegators :@devices, :each, :push, :<<, :reject!, :map, :flat_map, :any?, :size, :select, :find @@ -51,6 +55,12 @@ @devices = devices end + def eql_hash + h = super + h[:devices] = h[:devices].sort_by(&:hash) if h.keys.include?(:devices) + h + end + # Returns an s390 group device with the given id if present # # @param id [String] s390 group device id ("eth0", "br1", ...) @@ -74,15 +84,5 @@ devices.delete_if(&block) self end - - # Compares S390GroupDevicesCollections - # - # @return [Boolean] true when both collections contain only equal devices, - # false otherwise - def ==(other) - ((devices - other.devices) + (other.devices - devices)).empty? - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/startmode.rb new/yast2-network-4.4.15/src/lib/y2network/startmode.rb --- old/yast2-network-4.4.13/src/lib/y2network/startmode.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/startmode.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,6 +18,7 @@ # find current contact information at www.suse.com. require "yast" +require "yast2/equatable" module Y2Network # Base class for startmode. It allows to create new one according to name or anlist all. @@ -25,11 +26,14 @@ # TODO: as backends differs, we probably also need to have flag there to which backends # mode exists class Startmode + include Yast2::Equatable include Yast::Logger attr_reader :name alias_method :to_s, :name + eql_attr :name + def initialize(name) @name = name end @@ -49,11 +53,5 @@ require "y2network/startmodes" Startmodes.constants.map { |c| Startmodes.const_get(c).new } end - - def ==(other) - name == other.name - end - - alias_method :eql?, :== end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/src/lib/y2network/udev_rule_part.rb new/yast2-network-4.4.15/src/lib/y2network/udev_rule_part.rb --- old/yast2-network-4.4.13/src/lib/y2network/udev_rule_part.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/src/lib/y2network/udev_rule_part.rb 2021-06-10 17:13:21.000000000 +0200 @@ -18,6 +18,7 @@ # find current contact information at www.suse.com. require "yast" +require "yast2/equatable" module Y2Network # Simple class to represent a key-value pair in a {UdevRule}. @@ -25,6 +26,7 @@ # This class does not check whether operators or keys/values are valid or not. We can implement # that logic later if required. class UdevRulePart + include Yast2::Equatable include Yast::Logger # Regular expression to match a udev rule part PART_REGEXP = Regexp.new("\\A(?<key>[A-Za-z\{\}_]+)(?<operator>[^\"]+)\"(?<value>.+)\"\\Z") @@ -65,6 +67,8 @@ # @return [String] Value to match or assign attr_accessor :value + eql_attr :key, :operator, :value + # Constructor # # @param key [String] Key name @@ -76,16 +80,6 @@ @value = value end - # Determines whether two udev rule parts are equivalent - # - # @param other [UdevRulePart] The rule part to compare with - # @return [Boolean] - def ==(other) - key == other.key && operator == other.operator && value == other.value - end - - alias_method :eql?, :== - # Returns an string representation of the udev rule part # # @return [String] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/test/install_inf_convertor_test.rb new/yast2-network-4.4.15/test/install_inf_convertor_test.rb --- old/yast2-network-4.4.13/test/install_inf_convertor_test.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/test/install_inf_convertor_test.rb 2021-06-10 17:13:21.000000000 +0200 @@ -138,7 +138,8 @@ ) expect(Yast::Proxy).to receive(:Import) do |config| # proxy is enabled and the URL is set - expect(config).to include("enabled" => true, "http_proxy" => proxy_url) + expect(config).to include("enabled" => true, "http_proxy" => proxy_url, + "https_proxy" => proxy_url, "ftp_proxy" => proxy_url) end expect(Yast::Proxy).to receive(:Write).and_return(true) @@ -162,6 +163,7 @@ expect(Yast::Proxy).to receive(:Import) do |config| # proxy is enabled and the URL without credentials is set expect(config).to include("enabled" => true, "http_proxy" => proxy_url, + "https_proxy" => proxy_url, "ftp_proxy" => proxy_url, "proxy_user" => "user", "proxy_password" => "passwd") end expect(Yast::Proxy).to receive(:Write).and_return(true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.4.13/test/network_autoconfiguration_test.rb new/yast2-network-4.4.15/test/network_autoconfiguration_test.rb --- old/yast2-network-4.4.13/test/network_autoconfiguration_test.rb 2021-06-01 16:01:41.000000000 +0200 +++ new/yast2-network-4.4.15/test/network_autoconfiguration_test.rb 2021-06-10 17:13:21.000000000 +0200 @@ -253,7 +253,7 @@ interface: eth5) end let(:eth5) { Y2Network::Interface.new("eth5") } - let(:br0) { Y2Network::Interface.new("br0") } + let(:br0) { Y2Network::VirtualInterface.new("br0") } let(:interfaces) { Y2Network::InterfacesCollection.new([eth5, br0]) } let(:yast_config) do Y2Network::Config.new(interfaces: interfaces, routing: routing, source: :testing)