Skip to content

Commit

Permalink
Merge branch 'SLE-15-SP4' into merge_SLE-15-SP4
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jul 4, 2023
2 parents 7889add + 5d51681 commit e90727d
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 3 deletions.
13 changes: 13 additions & 0 deletions package/yast2-network.changes
@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jul 4 11:31:05 UTC 2023 - Knut Anderssen <kanderssen@suse.com>

- Fix typo when writing the wireless channel (bsc#1212976)
- 4.5.21

-------------------------------------------------------------------
Tue Jun 13 12:11:42 UTC 2023 - Michal Filka <mfilka@suse.com>

- bsc#1211431
- Do not crash installation when storing vlan configuration into
NetworkManager

-------------------------------------------------------------------
Wed May 10 07:29:32 UTC 2023 - Knut Anderssen <kanderssen@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-network.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-network
Version: 4.5.20
Version: 4.5.21
Release: 0
Summary: YaST2 - Network Configuration
License: GPL-2.0-only
Expand Down
Expand Up @@ -28,7 +28,7 @@ class Vlan < Base
# @see Y2Network::ConnectionConfigWriters::Base#update_file
# @param conn [Y2Network::ConnectionConfig::Vlan] Configuration to write
def update_file(conn)
file.vlan["id"] = conn.vlan_id
file.vlan["id"] = conn.vlan_id.to_s
file.vlan["parent"] = conn.parent_device
file.vlan["type"] = "vlan"
end
Expand Down
Expand Up @@ -33,7 +33,7 @@ def update_file(conn)
file.connection["type"] = "wifi"
file.wifi["ssid"] = conn.essid unless conn.essid.to_s.empty?
file.wifi["mode"] = MODE[conn.mode] || DEFAULT_MODE
file.wifi["channel"] = con.channel if conn.channel
file.wifi["channel"] = conn.channel.to_s if conn.channel

write_auth_settings(conn)
end
Expand Down
@@ -0,0 +1,45 @@
# Copyright (c) [2021] SUSE LLC
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, contact SUSE LLC.
#
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require_relative "../../../test_helper"
require "y2network/network_manager/connection_config_writers/vlan"
require "cfa/nm_connection"
require "y2network/boot_protocol"
require "y2network/startmode"
require "y2network/connection_config/vlan"

describe Y2Network::NetworkManager::ConnectionConfigWriters::Vlan do
subject(:handler) { described_class.new(file) }
let(:file) { CFA::NmConnection.new("bond0.nm_connection") }

let(:conn) do
Y2Network::ConnectionConfig::Vlan.new.tap do |c|
c.interface = "eth0.1006"
c.vlan_id = 1006
end
end

describe "#write" do
it "sets VLAN device attributes" do
handler.write(conn)
expect(file.vlan["type"]).to eql("vlan")
expect(file.vlan["id"]).to eql("1006")
end
end
end
Expand Up @@ -39,6 +39,7 @@
c.auth_mode = :open
c.ap = "00:11:22:33:44:55"
c.ap_scanmode = 1
c.channel = 5
end
end

Expand All @@ -47,6 +48,7 @@
handler.write(conn)
expect(file.wifi["ssid"]).to eql(conn.essid)
expect(file.wifi["mode"]).to eql("infrastructure")
expect(file.wifi["channel"]).to eql("5")
expect(file.ipv4["method"]).to eql("auto")
expect(file.ipv6["method"]).to eql("auto")
end
Expand Down

0 comments on commit e90727d

Please sign in to comment.