Skip to content

Commit

Permalink
IPConfig address is not a named argument anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Jul 22, 2019
1 parent 490cb4f commit 95daa65
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/y2network/connection_config/ip_config.rb
Expand Up @@ -41,7 +41,7 @@ class IPConfig
# @param label [String,nil]
# @param remote_address [IPaddress,nil]
# @param broadcast [IPaddress,nil]
def initialize(address:, id: nil, scope: nil, label: nil, remote_address: nil, broadcast: nil)
def initialize(address, id: nil, scope: nil, label: nil, remote_address: nil, broadcast: nil)
@address = address
@id = id || :default
@scope = scope || :global
Expand Down
Expand Up @@ -43,8 +43,8 @@ def ip_configs
prefix = file.prefixlens[id]
ip.prefix = prefix if prefix
Y2Network::ConnectionConfig::IPConfig.new(
ip,
id: id,
address: ip,
scope: file.scopes[id],
label: file.labels[id],
remote_address: file.remote_ipaddrs[id],
Expand Down
Expand Up @@ -46,11 +46,13 @@ def file_content(scr_root, file)
let(:ip_configs) do
[
Y2Network::ConnectionConfig::IPConfig.new(
address: "192.168.122.1/24", id: :default,
broadcast: Y2Network::IPAddress.from_string("192.168.122.255")
Y2Network::IPAddress.from_string("192.168.122.1/24"), id: :default,
broadcast: Y2Network::IPAddress.from_string("192.168.122.255")
),
Y2Network::ConnectionConfig::IPConfig.new(address: Y2Network::IPAddress.from_string("10.0.0.1/8"),
id: "_0", label: "my-label", remote_address: Y2Network::IPAddress.from_string("10.0.0.2"))
Y2Network::ConnectionConfig::IPConfig.new(
Y2Network::IPAddress.from_string("10.0.0.1/8"), id: "_0",
label: "my-label", remote_address: Y2Network::IPAddress.from_string("10.0.0.2")
)
]
end

Expand Down
Expand Up @@ -45,11 +45,13 @@
let(:ip_configs) do
[
Y2Network::ConnectionConfig::IPConfig.new(
address: "192.168.122.1/24", id: :default,
broadcast: Y2Network::IPAddress.from_string("192.168.122.255")
Y2Network::IPAddress.from_string("192.168.122.1/24"), id: :default,
broadcast: Y2Network::IPAddress.from_string("192.168.122.255")
),
Y2Network::ConnectionConfig::IPConfig.new(address: Y2Network::IPAddress.from_string("10.0.0.1/8"),
id: "_0", label: "my-label", remote_address: Y2Network::IPAddress.from_string("10.0.0.2"))
Y2Network::ConnectionConfig::IPConfig.new(
Y2Network::IPAddress.from_string("10.0.0.1/8"), id: "_0",
label: "my-label", remote_address: Y2Network::IPAddress.from_string("10.0.0.2")
)
]
end

Expand Down

0 comments on commit 95daa65

Please sign in to comment.