return undef;
}});
+__PACKAGE__->register_method ({
+ name => 'delete',
+ path => '',
+ method => 'DELETE',
+ permissions => {
+ check => ['perm', '/nodes/{node}', [ 'Sys.Modify' ]],
+ },
+ description => "Set subscription key.",
+ proxyto => 'node',
+ protected => 1,
+ parameters => {
+ additionalProperties => 0,
+ properties => {
+ node => get_standard_option('pve-node'),
+ },
+ },
+ returns => { type => 'null'},
+ code => sub {
+ my $subscription_file = '/etc/subscription';
+ return if ! -e $subscription_file;
+ unlink($subscription_file) or die "cannot delete subscription key: $!";
+ return undef;
+ }});
+
1;
}
}],
set => [ 'PVE::API2::Subscription', 'set', ['key'], { node => $nodename } ],
+ delete => [ 'PVE::API2::Subscription', 'delete', undef, { node => $nodename } ],
};
1;
win.on('destroy', reload);
}
},
+ {
+ text: gettext('Remove Subscription'),
+ xtype: 'proxmoxStdRemoveButton',
+ confirmMsg: gettext('Are you sure to remove the subscription key?'),
+ baseurl: baseurl,
+ dangerous: true,
+ selModel: false,
+ callback: reload,
+ },
{
text: gettext('Check'),
handler: function() {