]>
git.proxmox.com Git - pve-client.git/blob - pveclient
8ea109d042ed7683a59681f85babad86f34a2e7d
5 use lib
'/usr/share/pve-client';
10 use PVE
::APIClient
::LWP
;
11 use PVE
::APIClient
::Helpers
;
12 use PVE
::APIClient
::Commands
::remote
;
18 die "Usage: implement me";
23 my ($path, $method, $args) = @_;
25 die "missing API path\n" if !defined($path);
27 my $info = PVE
::APIClient
::Helpers
::lookup_api_method
($path, $method);
28 my $param = PVE
::APIClient
::Helpers
::get_options
($info->{parameters
}, $args);
34 # NOTE: This binary is just a placeholer - nothing implemented so far!
36 #my $hostname = 'localhost';
37 #my $username = 'root@pam';
39 #my $conn = PVE::APIClient::LWP->new(
40 # username => $username,
41 # #password => 'yourpassword',
43 # #csrftoken => $csrftoken,
45 # # allow manual fingerprint verification
46 # manual_verification => 1,
49 #my $res = $conn->get("/", {});
50 #print to_json($res, { pretty => 1, canonical => 1});
52 my $cmd = shift || print_usage
();
57 if (scalar(@ARGV) && $ARGV[0] !~ m/^\-/) {
60 my $res = call_method
($path, $method, \
@ARGV);
62 } elsif ($cmd eq 'set') {
64 } elsif ($cmd eq 'create') {
66 } elsif ($cmd eq 'delete') {
68 } elsif ($cmd eq 'remote') {
69 PVE
::APIClient
::Commands
::remote-
>run_cli_handler();