]> git.proxmox.com Git - pve-network.git/blob - PVE/Network/SDN/Zones/VlanPlugin.pm
0fb4aa71849b6fc262ff8dc9a693744c1f5905c7
[pve-network.git] / PVE / Network / SDN / Zones / VlanPlugin.pm
1 package PVE::Network::SDN::Zones::VlanPlugin;
2
3 use strict;
4 use warnings;
5 use PVE::Network::SDN::Zones::Plugin;
6
7 use base('PVE::Network::SDN::Zones::Plugin');
8
9 sub type {
10 return 'vlan';
11 }
12
13 PVE::JSONSchema::register_format('pve-sdn-vlanrange', \&pve_verify_sdn_vlanrange);
14 sub pve_verify_sdn_vlanrange {
15 my ($vlanstr) = @_;
16
17 PVE::Network::SDN::Zones::Plugin::parse_tag_number_or_range($vlanstr, '4096');
18
19 return $vlanstr;
20 }
21
22 sub properties {
23 return {
24 'bridge' => {
25 type => 'string',
26 },
27 };
28 }
29
30 sub options {
31
32 return {
33 nodes => { optional => 1},
34 'bridge' => { optional => 0 },
35 };
36 }
37
38 # Plugin implementation
39 sub generate_sdn_config {
40 my ($class, $plugin_config, $zoneid, $vnetid, $vnet, $controller, $interfaces_config, $config) = @_;
41 return "";
42 }
43
44 1;
45
46