• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yast / yast-network / 4882268617

pending completion
4882268617

Pull #1327

github

Unknown Committer
Unknown Commit Message
Pull Request #1327: Firmware configured interface (bsc#1209589)

85 of 85 new or added lines in 9 files covered. (100.0%)

9251 of 11501 relevant lines covered (80.44%)

20.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

96.55
/src/lib/y2network/widgets/interface_button.rb
1
# Copyright (c) [2023] SUSE LLC
2
#
3
# All Rights Reserved.
4
#
5
# This program is free software; you can redistribute it and/or modify it
6
# under the terms of version 2 of the GNU General Public License as published
7
# by the Free Software Foundation.
8
#
9
# This program is distributed in the hope that it will be useful, but WITHOUT
10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
12
# more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with this program; if not, contact SUSE LLC.
16
#
17
# To contact SUSE LLC about this file by physical or electronic mail, you may
18
# find current contact information at www.suse.com.
19

20
require "yast"
1✔
21
require "cwm/common_widgets"
1✔
22
require "abstract_method"
1✔
23
require "y2network/sequences/interface"
1✔
24
require "y2network/s390_group_device"
1✔
25
require "y2network/dialogs/s390_device_activation"
1✔
26

27
Yast.import "Label"
1✔
28
Yast.import "Lan"
1✔
29

30
module Y2Network
1✔
31
  module Widgets
1✔
32
    class InterfaceButton < CWM::PushButton
1✔
33
      include Yast::Logger
1✔
34

35
      abstract_method :label
1✔
36
      abstract_method :help
1✔
37
      # @param table [InterfacesTable]
38
      def initialize(table)
1✔
39
        textdomain "network"
23✔
40

41
        @table = table
23✔
42
      end
43

44
      # @see CWM::AbstractWidget#init
45
      def init
1✔
46
        disable? ? disable : enable
7✔
47
      end
48

49
      def config
1✔
50
        Yast::Lan.yast_config
37✔
51
      end
52

53
      def connection_config
1✔
54
        config.connections.by_name(@table.value)
26✔
55
      end
56

57
      def item
1✔
58
        connection_config || selected_interface(config)
9✔
59
      end
60

61
      def selected_interface(config)
1✔
62
        config.interfaces.by_name(@table.value) || config.s390_devices.by_id(@table.value)
3✔
63
      end
64

65
      def disable?
1✔
66
        false
×
67
      end
68
    end
69
  end
70
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc