]>
git.proxmox.com Git - pve-client.git/blob - PVE/APIClient/Commands/lxc.pm
1 package PVE
::APIClient
::Commands
::lxc
;
8 use PVE
::JSONSchema
qw(get_standard_option);
11 use base
qw(PVE::CLIHandler);
12 use PVE
::APIClient
::Config
;
14 __PACKAGE__-
>register_method ({
18 description
=> "Enter container console.",
20 additionalProperties
=> 0,
22 remote
=> get_standard_option
('pveclient-remote-name'),
24 description
=> "The container ID",
29 returns
=> { type
=> 'null'},
33 my $conn = PVE
::APIClient
::Config
::get_remote_connection
($param->{remote
});
34 my $node = 'localhost'; # ??
36 my $api_path = "api2/json/nodes/$node/lxc/$param->{vmid}";
38 my $res = $conn->get($api_path, {});
40 print to_json
($res, { pretty
=> 1, canonical
=> 1});
45 __PACKAGE__-
>register_method ({
49 description
=> "List containers.",
51 additionalProperties
=> 0,
53 remote
=> get_standard_option
('pveclient-remote-name'),
56 returns
=> { type
=> 'null'},
66 enter
=> [ __PACKAGE__
, 'enter', ['remote', 'vmid']],
67 list
=> [ __PACKAGE__
, 'list', ['remote']],