summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PVE/API2/Network/SDN.pm28
-rw-r--r--PVE/API2/Network/SDN/Content.pm10
-rw-r--r--PVE/API2/Network/SDN/Status.pm12
-rw-r--r--PVE/Network/SDN/FrrPlugin.pm4
-rw-r--r--PVE/Network/SDN/Plugin.pm2
-rw-r--r--PVE/Network/SDN/VxlanPlugin.pm12
6 files changed, 34 insertions, 34 deletions
diff --git a/PVE/API2/Network/SDN.pm b/PVE/API2/Network/SDN.pm
index 7ca5a5d..043aa0d 100644
--- a/PVE/API2/Network/SDN.pm
+++ b/PVE/API2/Network/SDN.pm
@@ -33,20 +33,20 @@ my $api_sdn_config = sub {
};
__PACKAGE__->register_method ({
- name => 'index',
+ name => 'index',
path => '',
method => 'GET',
description => "SDN index.",
- permissions => {
+ permissions => {
description => "Only list entries where you have 'SDN.Audit' or 'SDN.Allocate' permissions on '/cluster/sdn/<sdn>'",
user => 'all',
},
parameters => {
additionalProperties => 0,
properties => {
- type => {
+ type => {
description => "Only list sdn of specific type",
- type => 'string',
+ type => 'string',
enum => $sdn_type_enum,
optional => 1,
},
@@ -84,11 +84,11 @@ __PACKAGE__->register_method ({
}});
__PACKAGE__->register_method ({
- name => 'read',
+ name => 'read',
path => '{sdn}',
method => 'GET',
description => "Read sdn configuration.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn/{sdn}', ['SDN.Allocate']],
# },
@@ -110,10 +110,10 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({
name => 'create',
protected => 1,
- path => '',
+ path => '',
method => 'POST',
description => "Create a new sdn object.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn', ['SDN.Allocate']],
# },
parameters => PVE::Network::SDN::Plugin->createSchema(),
@@ -149,7 +149,7 @@ __PACKAGE__->register_method ({
}
PVE::Network::SDN::write_config($cfg);
-
+
}, "create sdn object failed");
return undef;
@@ -161,7 +161,7 @@ __PACKAGE__->register_method ({
path => '',
method => 'PUT',
description => "Apply sdn changes.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn', ['SDN.Allocate']],
# },
parameters => {
@@ -185,7 +185,7 @@ __PACKAGE__->register_method ({
path => '',
method => 'DELETE',
description => "Revert sdn changes.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn', ['SDN.Allocate']],
# },
parameters => {
@@ -207,7 +207,7 @@ __PACKAGE__->register_method ({
path => '{sdn}',
method => 'PUT',
description => "Update sdn object configuration.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn', ['SDN.Allocate']],
# },
parameters => PVE::Network::SDN::Plugin->updateSchema(),
@@ -256,12 +256,12 @@ __PACKAGE__->register_method ({
path => '{sdn}',
method => 'DELETE',
description => "Delete sdn object configuration.",
-# permissions => {
+# permissions => {
# check => ['perm', '/cluster/sdn', ['SDN.Allocate']],
# },
parameters => {
additionalProperties => 0,
- properties => {
+ properties => {
sdn => get_standard_option('pve-sdn-id', {
completion => \&PVE::Network::SDN::complete_sdn,
}),
diff --git a/PVE/API2/Network/SDN/Content.pm b/PVE/API2/Network/SDN/Content.pm
index f6b59ec..1b45ce5 100644
--- a/PVE/API2/Network/SDN/Content.pm
+++ b/PVE/API2/Network/SDN/Content.pm
@@ -17,18 +17,18 @@ use PVE::Network::SDN;
use base qw(PVE::RESTHandler);
__PACKAGE__->register_method ({
- name => 'index',
+ name => 'index',
path => '',
method => 'GET',
description => "List transportzone content.",
-# permissions => {
+# permissions => {
# check => ['perm', '/sdn/{sdn}', ['SDN.Audit'], any => 1],
# },
protected => 1,
proxyto => 'node',
parameters => {
additionalProperties => 0,
- properties => {
+ properties => {
node => get_standard_option('pve-node'),
sdn => get_standard_option('pve-sdn-id', {
completion => \&PVE::Network::SDN::complete_sdn,
@@ -39,7 +39,7 @@ __PACKAGE__->register_method ({
type => 'array',
items => {
type => "object",
- properties => {
+ properties => {
vnet => {
description => "Vnet identifier.",
type => 'string',
@@ -74,7 +74,7 @@ __PACKAGE__->register_method ({
}
}
- return $res;
+ return $res;
}});
1;
diff --git a/PVE/API2/Network/SDN/Status.pm b/PVE/API2/Network/SDN/Status.pm
index 073b18a..7f23214 100644
--- a/PVE/API2/Network/SDN/Status.pm
+++ b/PVE/API2/Network/SDN/Status.pm
@@ -17,16 +17,16 @@ use PVE::Exception qw(raise_param_exc);
use base qw(PVE::RESTHandler);
__PACKAGE__->register_method ({
- subclass => "PVE::API2::Network::SDN::Content",
+ subclass => "PVE::API2::Network::SDN::Content",
path => '{sdn}/content',
});
__PACKAGE__->register_method ({
- name => 'index',
+ name => 'index',
path => '',
method => 'GET',
description => "Get status for all transportzones.",
- permissions => {
+ permissions => {
description => "Only list entries where you have 'SDN.Audit'",
user => 'all',
},
@@ -75,10 +75,10 @@ __PACKAGE__->register_method ({
__PACKAGE__->register_method ({
name => 'diridx',
- path => '{sdn}',
+ path => '{sdn}',
method => 'GET',
description => "",
-# permissions => {
+# permissions => {
# check => ['perm', '/sdn/{sdn}', ['SDN.Audit'], any => 1],
# },
parameters => {
@@ -103,7 +103,7 @@ __PACKAGE__->register_method ({
my $res = [
{ subdir => 'content' },
];
-
+
return $res;
}});
diff --git a/PVE/Network/SDN/FrrPlugin.pm b/PVE/Network/SDN/FrrPlugin.pm
index a628cf2..2559b10 100644
--- a/PVE/Network/SDN/FrrPlugin.pm
+++ b/PVE/Network/SDN/FrrPlugin.pm
@@ -19,7 +19,7 @@ sub properties {
},
'peers' => {
description => "peers address list.",
- type => 'string', #fixme: format
+ type => 'string', #fixme: format
},
};
}
@@ -57,7 +57,7 @@ sub generate_frr_config {
foreach my $address (@peers) {
next if $address eq $ifaceip;
push @router_config, "neighbor $address remote-as $asn";
- }
+ }
push @router_config, "!";
push @router_config, "address-family l2vpn evpn";
foreach my $address (@peers) {
diff --git a/PVE/Network/SDN/Plugin.pm b/PVE/Network/SDN/Plugin.pm
index 11feb12..20984fe 100644
--- a/PVE/Network/SDN/Plugin.pm
+++ b/PVE/Network/SDN/Plugin.pm
@@ -37,7 +37,7 @@ sub parse_sdn_id {
my $defaultData = {
propertyList => {
- type => {
+ type => {
description => "Plugin type.",
type => 'string', format => 'pve-configid',
type => 'string',
diff --git a/PVE/Network/SDN/VxlanPlugin.pm b/PVE/Network/SDN/VxlanPlugin.pm
index b0b48c4..18ed629 100644
--- a/PVE/Network/SDN/VxlanPlugin.pm
+++ b/PVE/Network/SDN/VxlanPlugin.pm
@@ -28,15 +28,15 @@ sub properties {
},
'multicast-address' => {
description => "Multicast address.",
- type => 'string', #fixme: format
+ type => 'string', #fixme: format
},
'unicast-address' => {
description => "Unicast peers address ip list.",
- type => 'string', #fixme: format
+ type => 'string', #fixme: format
},
'vrf' => {
description => "vrf name.",
- type => 'string', #fixme: format
+ type => 'string', #fixme: format
},
'vrf-vxlan' => {
type => 'integer',
@@ -205,7 +205,7 @@ sub on_delete_hook {
# verify that no vnet are associated to this transport
foreach my $id (keys %{$sdn_cfg->{ids}}) {
my $sdn = $sdn_cfg->{ids}->{$id};
- die "transport $transportid is used by vnet $id"
+ die "transport $transportid is used by vnet $id"
if ($sdn->{type} eq 'vnet' && defined($sdn->{transportzone}) && $sdn->{transportzone} eq $transportid);
}
}
@@ -217,7 +217,7 @@ sub on_update_hook {
# verify that vxlan-allowed don't conflict with another vxlan-allowed transport
- # verify that vxlan-allowed is matching currently vnet tag in this transport
+ # verify that vxlan-allowed is matching currently vnet tag in this transport
my $vxlanallowed = $transport->{'vxlan-allowed'};
if ($vxlanallowed) {
foreach my $id (keys %{$sdn_cfg->{ids}}) {
@@ -269,7 +269,7 @@ sub on_update_hook {
if (defined($sdn_cfg->{ids}->{$id}->{'vrf-vxlan'}) && $sdn_cfg->{ids}->{$id}->{'vrf-vxlan'} eq $vrfvxlan);
}
}
- }
+ }
}
1;