]>
git.proxmox.com Git - pve-manager.git/blob - bin/pvesubscription
9 use PVE
::RPCEnvironment
;
11 use PVE
::API2
::Subscription
;
14 use base
qw(PVE::CLIHandler);
16 $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
18 initlog
('pvesubscription');
20 die "please run as root\n" if $> != 0;
22 PVE
::INotify
::inotify_init
();
24 my $rpcenv = PVE
::RPCEnvironment-
>init('cli');
26 $rpcenv->init_request();
27 $rpcenv->set_language($ENV{LANG
});
28 $rpcenv->set_user('root@pam');
30 my $nodename = PVE
::INotify
::nodename
();
35 update
=> [ 'PVE::API2::Subscription', 'update', undef, { node
=> $nodename } ],
36 get
=> [ 'PVE::API2::Subscription', 'get', undef, { node
=> $nodename },
39 foreach my $k (sort keys %$info) {
40 print "$k: $info->{$k}\n";
43 set
=> [ 'PVE::API2::Subscription', 'set', ['key'], { node
=> $nodename } ],
48 PVE
::CLIHandler
::handle_cmd
($cmddef, "pvesubscription", $cmd, \
@ARGV, undef, $0);
56 pvesubscription - Proxmox VE subscription mamager
64 This tool is used to handle pve subscriptions.
66 =include pve_copyright