Skip to content

Commit

Permalink
try something
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird committed Sep 27, 2024
1 parent 92486d9 commit 8344286
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ncm-network/src/main/perl/nmstate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,6 @@ sub generate_nmstate_config
$can_ignore_bootproto ||= 1;
$ifaceconfig->{type} = "ovs-bridge";
$ifaceconfig->{state} = "up";
$ifaceconfig->{bridge}->{options} = {
stp => $YTRUE,
};
$ifaceconfig->{bridge}->{port} = [ map { {name => $_} } (@{$iface->{ports}}, $name) ];
} elsif ($lctype eq 'ovsintport') {
$can_ignore_bootproto ||= 1;
Expand All @@ -426,7 +423,7 @@ sub generate_nmstate_config
$ifaceconfig->{type} = "ethernet";
if ($is_partof_bond) {
# no ipv4 address for bonded eth, plus in nmstate bonded eth is controlled by controller. no config is required.
$ifaceconfig->{ipv4}->{enabled} = "false";
$ifaceconfig->{ipv4}->{enabled} = $YFALSE;
$ifaceconfig->{state} = "up";
}
} elsif ($is_vlan_eth) {
Expand Down Expand Up @@ -509,8 +506,8 @@ sub generate_nmstate_config
$ifaceconfig->{ipv4}->{enabled} = $YTRUE;
} elsif (($eth_bootproto eq "none") && (!$can_ignore_bootproto)) {
# no ip on interface and is not a part of a bonded interface, assume not managed so disable eth.
$ifaceconfig->{ipv4}->{enabled} = "false";
$ifaceconfig->{ipv6}->{enabled} = "false";
$ifaceconfig->{ipv4}->{enabled} = $YFALSE;
$ifaceconfig->{ipv6}->{enabled} = $YFALSE;
$ifaceconfig->{state} = "down";
} elsif ($eth_bootproto eq "bootp"){
$self->error("bootp bootproto not supported by nmstate");
Expand Down Expand Up @@ -583,8 +580,7 @@ sub generate_nmstate_config
name => $name,
'profile-name' => $name,
ipv4 => {
dhcp => $YFALSE,
enabled => $YTRUE,
enabled => $YFALSE,
},
ipv6 => {
enabled => $YFALSE,
Expand Down

0 comments on commit 8344286

Please sign in to comment.