mirror of
git://git.proxmox.com/git/pve-common.git
synced 2025-02-15 13:57:21 +03:00
extrac ovs_option tag= into ovs_tag property
To make the API simpler.
This commit is contained in:
parent
40fae2b341
commit
2a75193897
@ -874,6 +874,8 @@ sub read_etc_network_interfaces {
|
||||
if ($d->{'bond_mode'} eq 'balance-tcp') {
|
||||
$d->{'bond_mode'} = 'lacp-balance-tcp';
|
||||
}
|
||||
my $tag = &$extract_ovs_option($d, 'tag');
|
||||
$d->{ovs_tag} = $tag if defined($tag);
|
||||
} else {
|
||||
$d->{type} = 'unknown';
|
||||
}
|
||||
@ -905,6 +907,8 @@ sub read_etc_network_interfaces {
|
||||
$d->{type} = 'eth';
|
||||
} elsif ($d->{ovs_type} eq 'OVSPort') {
|
||||
$d->{type} = $d->{ovs_type};
|
||||
my $tag = &$extract_ovs_option($d, 'tag');
|
||||
$d->{ovs_tag} = $tag if defined($tag);
|
||||
} else {
|
||||
$d->{type} = 'unknown';
|
||||
}
|
||||
@ -915,6 +919,8 @@ sub read_etc_network_interfaces {
|
||||
$d->{type} = 'unknown';
|
||||
} elsif ($d->{ovs_type} eq 'OVSIntPort') {
|
||||
$d->{type} = $d->{ovs_type};
|
||||
my $tag = &$extract_ovs_option($d, 'tag');
|
||||
$d->{ovs_tag} = $tag if defined($tag);
|
||||
}
|
||||
}
|
||||
|
||||
@ -997,6 +1003,11 @@ sub __interface_to_string {
|
||||
|
||||
$d->{autostart} = 0; # started by the bridge
|
||||
|
||||
if (defined($d->{ovs_tag})) {
|
||||
&$set_ovs_option($d, tag => $d->{ovs_tag});
|
||||
}
|
||||
$done->{ovs_tag} = 1;
|
||||
|
||||
if ($d->{type} eq 'OVSBond') {
|
||||
|
||||
$d->{bond_mode} = 'active-backup' if !$d->{bond_mode};
|
||||
|
Loading…
x
Reference in New Issue
Block a user