Commit Graph

119 Commits

Author SHA1 Message Date
Dietmar Maurer
faa47c20e2 adopt code for changes in pve-common 2018-07-04 08:54:16 +02:00
Dietmar Maurer
d012b98c9b update files from pve-common 2018-07-04 08:53:36 +02:00
Dietmar Maurer
b76ab6556e Makefile: fix target 'clean' - do not fail if files does not exist 2018-07-02 13:17:38 +02:00
Dietmar Maurer
6f6263a7dd PVE::APIClient::Helper::print_ordered_result - correctly declare local var 2018-07-02 10:09:52 +02:00
Dietmar Maurer
5101e472b1 PVE::APIClient::Helpers::extract_even_elements - new helper 2018-07-02 10:05:45 +02:00
Dietmar Maurer
c2bcfdb264 update files from pve-common 2018-07-02 09:19:53 +02:00
Dietmar Maurer
c27b93a5e3 use new PVE::APIClient::CLIHandler::print_api_result 2018-06-25 12:13:38 +02:00
Dietmar Maurer
2ecf9b57e8 pve-api-definition.dat: add root index method 2018-06-25 12:13:38 +02:00
Dietmar Maurer
826591e032 update files from pve-common 2018-06-25 12:13:38 +02:00
Dietmar Maurer
6912bbad9d pve-api-definition.dat: update 2018-06-22 07:56:04 +02:00
René Jochum
20e7131b2d Handle errors on tasks correctly with a die,
so we get the correct exit code on errors.

Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-20 12:29:23 +02:00
Dietmar Maurer
969b8624f3 update files from pve-common 2018-06-20 07:03:48 +02:00
René Jochum
4e14c0d17b Remove timeout from the stop command (lxc doesn't support it) 2018-06-20 06:50:13 +02:00
René Jochum
2b267ba22e Add task log to 'lxc create' 2018-06-20 06:42:49 +02:00
René Jochum
b7db4587c1 Add create and destroy subcommands to the lxc command 2018-06-20 06:42:49 +02:00
René Jochum
aa66d1df95 Fix old none ::APIClient uses.
Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-20 06:42:49 +02:00
René Jochum
ace4a6df4b Use a different path for the lock file
This prevents lock_file from creating the config file with wrong permissions.
2018-06-20 06:42:49 +02:00
Dietmar Maurer
e346866631 remote.pm: use better command names (list, add, set, delete) 2018-06-19 07:50:35 +02:00
Dietmar Maurer
4fbacba6de fix parameter name inside description, minor cleanups 2018-06-19 07:44:07 +02:00
Dietmar Maurer
51da150240 Helpers.pm: remove unknown format definitions
We do those checks at the server side anyways ...
2018-06-18 13:16:11 +02:00
Dietmar Maurer
2767c2b92f add a manual page 2018-06-18 10:37:19 +02:00
Dietmar Maurer
5eb200482a remove $pve_api_path_hash - no longer used 2018-06-18 09:52:59 +02:00
Dietmar Maurer
520f543ef8 Helpers.pm: new helper find_method_info()
To lookup method info with extracted uri parameters.
2018-06-18 09:51:36 +02:00
Dietmar Maurer
50d8425652 copy Tools.pm from pve-common 2018-06-15 13:04:12 +02:00
Dietmar Maurer
b400742534 implement config file locking 2018-06-15 12:28:05 +02:00
Dietmar Maurer
05d328ef65 remote_conn: try to cache tickets 2018-06-15 09:17:29 +02:00
Dietmar Maurer
df89fcb907 add helper to read/update a ticket cache file 2018-06-15 09:17:29 +02:00
Dietmar Maurer
bcd2a4df29 change configuration file name ~/.config/pveclient/config 2018-06-15 09:17:29 +02:00
Dietmar Maurer
0ca370283d Helpers.pm: new helper configuration_directory
Read configs from XDG_CONFIG_HOME/pveclient/ first.
if XDG_CONFIG_HOME is not set, then use $HOME/.config/pveclient/
2018-06-15 09:17:29 +02:00
Dietmar Maurer
b8b2e694f1 Tools.pm: copied lock_file_full from pve-common 2018-06-15 09:17:29 +02:00
Dietmar Maurer
9305b2c986 make timeouts optional 2018-06-14 13:22:40 +02:00
René Jochum
42de9764b4 Add the remaining guest commands
Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-14 12:41:12 +02:00
Dietmar Maurer
b2123baa34 correctly use PVE::APIClient::PTY 2018-06-14 12:19:38 +02:00
Dietmar Maurer
4a7e63b852 pveclient: add read_pasword handler
Because this is the base CLIHandler class now.
2018-06-14 12:14:58 +02:00
Dietmar Maurer
b5aeedb062 rename defaut output format from 'table' to 'text' 2018-06-14 11:57:40 +02:00
Dietmar Maurer
4db9ff67bc add new helper print_result 2018-06-14 11:12:29 +02:00
Dietmar Maurer
61ad3df5bc fully implement api get/set/create/delete 2018-06-14 10:18:10 +02:00
Dietmar Maurer
269f8ffa5a Config.pm: use PVE::APIClient::PTY 2018-06-14 10:08:06 +02:00
Dietmar Maurer
cbfba90bd8 register stanadard option 'pveclient-output-format' 2018-06-14 09:36:54 +02:00
Dietmar Maurer
ef03892d0c list.pm: add missing use clauses 2018-06-14 09:31:53 +02:00
Dietmar Maurer
b0495d825b implement call_method 2018-06-14 09:16:02 +02:00
Dietmar Maurer
0cdec22753 update files from pve-common
Includes some changes which are still not applied.
2018-06-14 09:16:02 +02:00
Dietmar Maurer
c9138c03bc use packages from PVE::APIClient 2018-06-14 09:16:02 +02:00
Dietmar Maurer
a086d1ce00 Makefile: cleanup - use a loop to install files 2018-06-13 13:42:28 +02:00
René Jochum
ca3269f4d8 Add update-pve-common make target to move code to PVE/APIClient. 2018-06-13 13:20:53 +02:00
René Jochum
4cedebf640 Add spice command 2018-06-13 10:50:24 +02:00
Dietmar Maurer
c07228555a install missing files 2018-06-13 10:17:04 +02:00
Dietmar Maurer
89335fb177 rename start.pm to GuestStatus.pm, implement stop command
Please note that we group similar commands inside a single command class.
Our CLIHandler then nicely groups this commands inside help.
2018-06-13 09:24:37 +02:00
Dietmar Maurer
654a262843 remove PVE/APIClient/Commands/help.pm
not needed anymore.
2018-06-13 08:57:53 +02:00
René Jochum
2f964a751c Add start command
I've added the logic to poll the task given by status/start until its
"stopped", this enables an usage like:

pveclient lxc create 999 && pveclient start 999 && pveclient enter 999

Signed-off-by: René Jochum <r.jochum@proxmox.com>
2018-06-13 08:39:51 +02:00