From 81e68f01073534eb93118ecaedd98e3f44e8f9f9 Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 8 Jun 2021 16:06:50 +0000 Subject: [PATCH] api: nodes: drop deprecated 'upgrade' option of termproxy The termproxy api was adapted to the changes from PVE and PBS in d9e79ff4b7f0f9b2c49f06484091546353980c5e We can now drop the 'upgrade' option kept for backwards compatibility Signed-off-by: Stoiko Ivanov --- src/PMG/API2/Nodes.pm | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/PMG/API2/Nodes.pm b/src/PMG/API2/Nodes.pm index 8cdf935..f9ccfae 100644 --- a/src/PMG/API2/Nodes.pm +++ b/src/PMG/API2/Nodes.pm @@ -389,12 +389,6 @@ __PACKAGE__->register_method ({ additionalProperties => 0, properties => { node => get_standard_option('pve-node'), - upgrade => { - type => 'boolean', - description => "Run 'apt-get dist-upgrade' instead of normal shell.", - optional => 1, - default => 0, - }, cmd => { type => 'string', description => "Run specific command or default to login.", @@ -434,17 +428,13 @@ __PACKAGE__->register_method ({ my $restenv = PMG::RESTEnvironment->get(); my $user = $restenv->get_user(); - raise_perm_exc('user != root@pam') if $param->{upgrade} && $user ne 'root@pam'; + raise_perm_exc('user != root@pam') if $param->{cmd} eq 'upgrade' && $user ne 'root@pam'; my $ticket = PMG::Ticket::assemble_vnc_ticket($user, $authpath); my $family = PVE::Tools::get_host_address_family($node); my $port = PVE::Tools::next_vnc_port($family); - # FIXME: remove with 7.0 (check if all works before!!) - if ($param->{upgrade}) { - $param->{cmd} = 'upgrade'; - } my $shcmd = get_shell_command($user, $param->{cmd}, $param->{'cmd-opts'}); my $cmd = ['/usr/bin/termproxy', $port, '--path', $authpath, '--', @$shcmd]; -- 2.39.5