Skip to content

Commit

Permalink
Merge branch 'proxmox:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
wy414012 authored Dec 10, 2024
2 parents ac5cfde + 20fecb7 commit a99f437
Showing 1 changed file with 120 additions and 2 deletions.
122 changes: 120 additions & 2 deletions PVE/API2/Network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ my $bond_mode_enum = [
];

my $network_type_enum = ['bridge', 'bond', 'eth', 'alias', 'vlan',
'OVSBridge', 'OVSBond', 'OVSPort', 'OVSIntPort'];
'OVSBridge', 'OVSBond', 'OVSPort', 'OVSIntPort', 'vnet'];

my $confdesc = {
type => {
Expand Down Expand Up @@ -223,7 +223,125 @@ __PACKAGE__->register_method({
type => "array",
items => {
type => "object",
properties => {},
properties => json_config_properties({
iface => get_standard_option('pve-iface'),
active => {
type => 'boolean',
optional => 1,
description => "Set to true if the interface is active.",
},
'bridge-access' => {
type => 'integer',
optional => 1,
description => "The bridge port access VLAN.",
},
'bridge-learning' => {
type => 'boolean',
optional => 1,
description => "Bridge port learning flag.",
},
'bridge-arp-nd-suppress' => {
type => 'boolean',
optional => 1,
description => "Bridge port ARP/ND suppress flag.",
},
'bridge-unicast-flood' => {
type => 'boolean',
optional => 1,
description => "Bridge port unicast flood flag.",
},
'bridge-multicast-flood' => {
type => 'boolean',
optional => 1,
description => "Bridge port multicast flood flag.",
},
exists => {
type => 'boolean',
optional => 1,
description => "Set to true if the interface physically exists.",
},
families => {
type => "array",
description => "The network families.",
items => {
type => "string",
description => "A network family.",
enum => ["inet", "inet6"],
},
optional => 1,
},
'link-type' => {
type => 'string',
optional => 1,
description => "The link type.",
},
method => {
type => "string",
description => "The network configuration method for IPv4.",
enum => ["manual", "static", "auto"],
optional => 1,
},
method6 => {
type => "string",
description => "The network configuration method for IPv6.",
enum => ["manual", "static", "auto"],
optional => 1,
},
options => {
type => 'array',
optional => 1,
description => "A list of additional interface options for IPv4.",
items => {
type => "string",
description => "An interface property.",
},
},
options6 => {
type => 'array',
optional => 1,
description => "A list of additional interface options for IPv6.",
items => {
type => "string",
description => "An interface property.",
},
},
priority => {
type => 'integer',
description => "The order of the interface.",
optional => 1,
},
'uplink-id' => {
type => 'string',
optional => 1,
description => "The uplink ID.",
},
'vlan-protocol' => {
type => 'string',
optional => 1,
enum => [qw(802.1ad 802.1q)],
description => "The VLAN protocol.",
},
'vxlan-id' => {
type => 'integer',
optional => 1,
description => "The VXLAN ID.",
},
'vxlan-svcnodeip' => {
type => 'string',
optional => 1,
description => "The VXLAN SVC node IP.",
},
'vxlan-physdev' => {
type => 'string',
optional => 1,
description => "The physical device for the VXLAN tunnel.",
},
'vxlan-local-tunnelip' => {
type => 'string',
optional => 1,
description => "The VXLAN local tunnel IP.",
},
}),
},
links => [ { rel => 'child', href => "{iface}" } ],
},
Expand Down

0 comments on commit a99f437

Please sign in to comment.