]>
git.proxmox.com Git - pve-client.git/blob - pveclient
5 use lib
'/usr/share/pve-client';
11 use PVE
::APIClient
::LWP
;
12 use PVE
::APIClient
::Helpers
;
13 use PVE
::APIClient
::Commands
::remote
;
19 die "Usage: implement me";
24 my ($path, $method, $args) = @_;
26 die "missing API path\n" if !defined($path);
28 my $info = PVE
::APIClient
::Helpers
::lookup_api_method
($path, $method);
29 my $param = PVE
::JSONSchema
::get_options
($info->{parameters
}, $args);
35 # NOTE: This binary is just a placeholer - nothing implemented so far!
37 #my $hostname = 'localhost';
38 #my $username = 'root@pam';
40 #my $conn = PVE::APIClient::LWP->new(
41 # username => $username,
42 # #password => 'yourpassword',
44 # #csrftoken => $csrftoken,
46 # # allow manual fingerprint verification
47 # manual_verification => 1,
50 #my $res = $conn->get("/", {});
51 #print to_json($res, { pretty => 1, canonical => 1});
53 my $cmd = shift || print_usage
();
58 if (scalar(@ARGV) && $ARGV[0] !~ m/^\-/) {
61 my $res = call_method
($path, $method, \
@ARGV);
63 } elsif ($cmd eq 'set') {
65 } elsif ($cmd eq 'create') {
67 } elsif ($cmd eq 'delete') {
69 } elsif ($cmd eq 'remote') {
70 PVE
::APIClient
::Commands
::remote-
>run_cli_handler();