mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 16:00:34 +00:00
subscription delete: followup fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
85222f8237
commit
e82ed1675b
@ -205,7 +205,7 @@ __PACKAGE__->register_method ({
|
|||||||
proxyto => 'node',
|
proxyto => 'node',
|
||||||
protected => 1,
|
protected => 1,
|
||||||
parameters => {
|
parameters => {
|
||||||
additionalProperties => 0,
|
additionalProperties => 0,
|
||||||
properties => {
|
properties => {
|
||||||
node => get_standard_option('pve-node'),
|
node => get_standard_option('pve-node'),
|
||||||
key => {
|
key => {
|
||||||
@ -252,11 +252,11 @@ __PACKAGE__->register_method ({
|
|||||||
permissions => {
|
permissions => {
|
||||||
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
|
check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
|
||||||
},
|
},
|
||||||
description => "Set subscription key.",
|
description => "Delete subscription key.",
|
||||||
proxyto => 'node',
|
proxyto => 'node',
|
||||||
protected => 1,
|
protected => 1,
|
||||||
parameters => {
|
parameters => {
|
||||||
additionalProperties => 0,
|
additionalProperties => 0,
|
||||||
properties => {
|
properties => {
|
||||||
node => get_standard_option('pve-node'),
|
node => get_standard_option('pve-node'),
|
||||||
},
|
},
|
||||||
@ -264,7 +264,7 @@ __PACKAGE__->register_method ({
|
|||||||
returns => { type => 'null'},
|
returns => { type => 'null'},
|
||||||
code => sub {
|
code => sub {
|
||||||
my $subscription_file = '/etc/subscription';
|
my $subscription_file = '/etc/subscription';
|
||||||
return if ! -e $subscription_file;
|
return if ! -e $subscription_file;
|
||||||
unlink($subscription_file) or die "cannot delete subscription key: $!";
|
unlink($subscription_file) or die "cannot delete subscription key: $!";
|
||||||
return undef;
|
return undef;
|
||||||
}});
|
}});
|
||||||
|
Loading…
Reference in New Issue
Block a user