]>
git.proxmox.com Git - pve-client.git/blob - pveclient
8 use PVE
::APIClient
::LWP
;
9 use PVE
::APIClient
::Helpers
;
14 die "Usage: implement me";
19 my ($path, $method, $args) = @_;
21 die "missing API path\n" if !defined($path);
23 my $info = PVE
::APIClient
::Helpers
::lookup_api_method
($path, $method);
24 my $param = PVE
::APIClient
::Helpers
::get_options
($info->{parameters
}, $args);
30 # NOTE: This binary is just a placeholer - nothing implemented so far!
32 #my $hostname = 'localhost';
33 #my $username = 'root@pam';
35 #my $conn = PVE::APIClient::LWP->new(
36 # username => $username,
37 # #password => 'yourpassword',
39 # #csrftoken => $csrftoken,
41 # # allow manual fingerprint verification
42 # manual_verification => 1,
45 #my $res = $conn->get("/", {});
46 #print to_json($res, { pretty => 1, canonical => 1});
48 my $cmd = shift || print_usage
();
53 if (scalar(@ARGV) && $ARGV[0] !~ m/^\-/) {
56 my $res = call_method
($path, $method, \
@ARGV);
58 } elsif ($cmd eq 'set') {
60 } elsif ($cmd eq 'create') {
62 } elsif ($cmd eq 'delete') {
64 } elsif ($cmd eq 'enter') {