mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 13:07:49 +00:00
whitespace cleanup
Signed-off-by: Tim Marx <t.marx@proxmox.com>
This commit is contained in:
parent
0d8eba72f0
commit
cd8d0de269
@ -47,17 +47,17 @@ __PACKAGE__->register_method ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
subclass => "PVE::API2::Firewall::Cluster",
|
subclass => "PVE::API2::Firewall::Cluster",
|
||||||
path => 'firewall',
|
path => 'firewall',
|
||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
subclass => "PVE::API2::Backup",
|
subclass => "PVE::API2::Backup",
|
||||||
path => 'backup',
|
path => 'backup',
|
||||||
});
|
});
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
subclass => "PVE::API2::HAConfig",
|
subclass => "PVE::API2::HAConfig",
|
||||||
path => 'ha',
|
path => 'ha',
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ if ($have_sdn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $dc_schema = PVE::DataCenterConfig::get_datacenter_schema();
|
my $dc_schema = PVE::DataCenterConfig::get_datacenter_schema();
|
||||||
my $dc_properties = {
|
my $dc_properties = {
|
||||||
delete => {
|
delete => {
|
||||||
type => 'string', format => 'pve-configid-list',
|
type => 'string', format => 'pve-configid-list',
|
||||||
description => "A list of settings you want to delete.",
|
description => "A list of settings you want to delete.",
|
||||||
@ -91,8 +91,8 @@ foreach my $opt (keys %{$dc_schema->{properties}}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__PACKAGE__->register_method ({
|
__PACKAGE__->register_method ({
|
||||||
name => 'index',
|
name => 'index',
|
||||||
path => '',
|
path => '',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Cluster index.",
|
description => "Cluster index.",
|
||||||
permissions => { user => 'all' },
|
permissions => { user => 'all' },
|
||||||
@ -110,7 +110,7 @@ __PACKAGE__->register_method ({
|
|||||||
},
|
},
|
||||||
code => sub {
|
code => sub {
|
||||||
my ($param) = @_;
|
my ($param) = @_;
|
||||||
|
|
||||||
my $result = [
|
my $result = [
|
||||||
{ name => 'log' },
|
{ name => 'log' },
|
||||||
{ name => 'options' },
|
{ name => 'options' },
|
||||||
@ -135,8 +135,8 @@ __PACKAGE__->register_method ({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'log',
|
name => 'log',
|
||||||
path => 'log',
|
path => 'log',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Read cluster log",
|
description => "Read cluster log",
|
||||||
permissions => { user => 'all' },
|
permissions => { user => 'all' },
|
||||||
@ -180,8 +180,8 @@ __PACKAGE__->register_method({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'resources',
|
name => 'resources',
|
||||||
path => 'resources',
|
path => 'resources',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Resources index (cluster wide).",
|
description => "Resources index (cluster wide).",
|
||||||
permissions => { user => 'all' },
|
permissions => { user => 'all' },
|
||||||
@ -311,7 +311,7 @@ __PACKAGE__->register_method({
|
|||||||
|
|
||||||
my $entry = {
|
my $entry = {
|
||||||
id => "/pool/$pool",
|
id => "/pool/$pool",
|
||||||
pool => $pool,
|
pool => $pool,
|
||||||
type => 'pool',
|
type => 'pool',
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -355,7 +355,7 @@ __PACKAGE__->register_method({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ], 1);
|
next if !$rpcenv->check($authuser, "/vms/$vmid", [ 'VM.Audit' ], 1);
|
||||||
|
|
||||||
# get ha status
|
# get ha status
|
||||||
@ -428,8 +428,8 @@ __PACKAGE__->register_method({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'tasks',
|
name => 'tasks',
|
||||||
path => 'tasks',
|
path => 'tasks',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "List recent tasks (cluster wide).",
|
description => "List recent tasks (cluster wide).",
|
||||||
permissions => { user => 'all' },
|
permissions => { user => 'all' },
|
||||||
@ -463,13 +463,13 @@ __PACKAGE__->register_method({
|
|||||||
foreach my $task (@$tlist) {
|
foreach my $task (@$tlist) {
|
||||||
push @$res, $task if $all || ($task->{user} eq $authuser);
|
push @$res, $task if $all || ($task->{user} eq $authuser);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'get_options',
|
name => 'get_options',
|
||||||
path => 'options',
|
path => 'options',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Get datacenter options.",
|
description => "Get datacenter options.",
|
||||||
permissions => {
|
permissions => {
|
||||||
@ -490,8 +490,8 @@ __PACKAGE__->register_method({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'set_options',
|
name => 'set_options',
|
||||||
path => 'options',
|
path => 'options',
|
||||||
method => 'PUT',
|
method => 'PUT',
|
||||||
description => "Set datacenter options.",
|
description => "Set datacenter options.",
|
||||||
permissions => {
|
permissions => {
|
||||||
@ -532,8 +532,8 @@ __PACKAGE__->register_method({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'get_status',
|
name => 'get_status',
|
||||||
path => 'status',
|
path => 'status',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Get cluster status information.",
|
description => "Get cluster status information.",
|
||||||
permissions => {
|
permissions => {
|
||||||
@ -562,7 +562,7 @@ __PACKAGE__->register_method({
|
|||||||
PVE::Cluster::cfs_update();
|
PVE::Cluster::cfs_update();
|
||||||
|
|
||||||
# we also add info from pmxcfs
|
# we also add info from pmxcfs
|
||||||
my $clinfo = PVE::Cluster::get_clinfo();
|
my $clinfo = PVE::Cluster::get_clinfo();
|
||||||
my $members = PVE::Cluster::get_members();
|
my $members = PVE::Cluster::get_members();
|
||||||
my $nodename = PVE::INotify::nodename();
|
my $nodename = PVE::INotify::nodename();
|
||||||
my $rrd = PVE::Cluster::rrd_dump();
|
my $rrd = PVE::Cluster::rrd_dump();
|
||||||
@ -580,10 +580,10 @@ __PACKAGE__->register_method({
|
|||||||
quorate => $d->{quorate},
|
quorate => $d->{quorate},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $node (keys %$members) {
|
foreach my $node (keys %$members) {
|
||||||
my $d = $members->{$node};
|
my $d = $members->{$node};
|
||||||
my $entry = {
|
my $entry = {
|
||||||
type => 'node',
|
type => 'node',
|
||||||
id => "node/$node",
|
id => "node/$node",
|
||||||
name => $node,
|
name => $node,
|
||||||
@ -592,11 +592,11 @@ __PACKAGE__->register_method({
|
|||||||
'local' => ($node eq $nodename) ? 1 : 0,
|
'local' => ($node eq $nodename) ? 1 : 0,
|
||||||
online => $d->{online},
|
online => $d->{online},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (my $d = PVE::API2Tools::extract_node_stats($node, $members, $rrd)) {
|
if (my $d = PVE::API2Tools::extract_node_stats($node, $members, $rrd)) {
|
||||||
$entry->{level} = $d->{level};
|
$entry->{level} = $d->{level};
|
||||||
}
|
}
|
||||||
|
|
||||||
push @$res, $entry;
|
push @$res, $entry;
|
||||||
}
|
}
|
||||||
return $res;
|
return $res;
|
||||||
@ -621,8 +621,8 @@ __PACKAGE__->register_method({
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'nextid',
|
name => 'nextid',
|
||||||
path => 'nextid',
|
path => 'nextid',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
description => "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
|
description => "Get next free VMID. If you pass an VMID it will raise an error if the ID is already used.",
|
||||||
permissions => { user => 'all' },
|
permissions => { user => 'all' },
|
||||||
|
Loading…
Reference in New Issue
Block a user