]> git.proxmox.com Git - pve-common.git/commit
Handle string parameter to file content replacement
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 5 Apr 2016 07:20:50 +0000 (09:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 5 Apr 2016 10:22:38 +0000 (12:22 +0200)
commit408976c6f711f82895b105733b914660384160df
tree2a47d857f7942c8f7b4d1c5791b045b0a5acabb5
parentb9df2e606393a6276f0350706f2099d0e7bc2038
Handle string parameter to file content replacement

This is modelled after the way read_password() is used to
wrap -password parameters on the command line. If a mapping
for a certain API method and parameter is defined in the
sub class of CLIHandler.pm, the parameter is interpreted as
a file path on the command line and the parameter is
filled with the string contents of the referenced file.

This allows us to use the same API schema once in API2, but
overwrite the behaviour for individual parameters in the CLI
tools when desired.
src/PVE/CLIHandler.pm
src/PVE/RESTHandler.pm