Skip to content

Commit

Permalink
Merge pull request #1637 from aka7/ncm_network_dhcp_false
Browse files Browse the repository at this point in the history
ncm-network: set profile-name and set dhcp to disable for static config
  • Loading branch information
jrha committed Dec 20, 2023
2 parents 8445093 + ebce675 commit 533badd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ncm-network/src/main/perl/nmstate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ sub generate_nmstate_config

$ifaceconfig->{mtu} = $iface->{mtu} if $iface->{mtu};
$ifaceconfig->{'mac-address'} = $iface->{hwaddr} if $iface->{hwaddr};
$ifaceconfig->{'profile-name'} = $name;
if ($is_eth) {
$ifaceconfig->{type} = "ethernet";
if ($is_bond_eth) {
Expand Down Expand Up @@ -334,6 +335,7 @@ sub generate_nmstate_config

# TODO: append alias ip to ip_list as array, providing ips as array of hashref.
$ifaceconfig->{ipv4}->{address} = [$ip_list];
$ifaceconfig->{ipv4}->{dhcp} = $YFALSE;
$ifaceconfig->{ipv4}->{enabled} = $YTRUE;
} else {
# TODO: configure IPV6 enteries
Expand Down
1 change: 1 addition & 0 deletions ncm-network/src/test/perl/nmstate_simple.t
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ interfaces:
- link-aggregation:
port: []
name: eth0
profile-name: eth0
type: bond
EOF

Expand Down

0 comments on commit 533badd

Please sign in to comment.