IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
we sometimes define
result => {}
on an api call, so check that result->{type} is defined
and guess the type if not
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
We can add to a bridge a non defined vlan interface.
We only need to check that physical interface exist
example:
auto eno1
iface eno1 inet manual
auto vmbr0
iface vmbr0 inet manual
bridge_ports eno1.1
[w.bumiller@proxmox.com: style & commit message fixup]
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
- special check for bond, set parent mtu from slaves mtu if no defined.
- error if parent mtu is lower than child mtu (not bigger)
- return if child mtu is not defined
- fix vlan check (parent/child was inverted)
when stopping a worker while doing a run_fork_with_timeout,
we want to handle that there and send the child the SIGTERM
so that it can clean up
for this we have to use readline_nointr,
because the read from the pipe gets interrupted by the signal
this partially fixes#1874
as we now correctly clean up the new disk, except if it is
on lvm/lvmthin (possibly other storages as well), and use the old disk
in the config
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
this is a wrapper to have an uninterruptible readline
so that we can read e.g. from a pipe even if interrupted by
a signal
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Usually, sub commands already form a logical group, so further grouping
just adds confusion (see 'qm' as example)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This is useful if we do not have a fixed schema, for example to
print results from qemu agent commands.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
The value of $width depends on possible untainted $data (for example
task logs read from external files).
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Tools like pvesh and pveclient pass them as normal arguments. We use
a simply heuristic to test if there is an 'output_format' parameter.
If so, we remove all $standard_output_options and display [FORMAT_OPTIONS]
instead.
This simplifies usage, because we can simple omit the $terminal_opts
parameter in most cases (automatically call query_terminal_option) while
still setting $options.
Best shown with a example:
my $test_formatter = sub {
my ($res, $result_schema, $fmt_param) = @_;
PVE::CLIFormatter::print_api_result($res, $result_schema, undef, $fmt_param);
};
$cmddef = [ __PACKAGE__, 'test', [], undef, $test_formatter, $PVE::RESTHandler::standard_output_options],
- and rename format to 'output-format'
- provide a method to add properties to schema:
PVE::RESTHandler::add_standard_output_properties
- provide methods to extract output properties:
PVE::RESTHandler::extract_standard_output_properties()
We transform indexed parameters (like scsi0 scsi1 ...) to a single
scsi[n]. The check if we should transform did not handle the case
where a parameter was indexed but (currently) only index 0 existed.
Such definitions where simply skipped and seemed then to miss from
places using the API dump, like the api-viewer.
We now only skip those parameters with an index > 0 where the same
parameter with index 0 is defined.
This fixes a missing efidisk0 entry in an API dump[0].
[0]: https://forum.proxmox.com/threads/efidisk0-creation-missing-from-api.45624/
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
The new standard options overwrite some already existing options in
already existing CLI tools, which is surely no good, e.g. vzdump
already has an quiet option which now gets overwritten, thus any
backup triggered by CRON always sents out an (additional) email.
Further, they may even only have an effect if the respective CLI
command uses an CLIFormatter print* method to output things.
And for some commands, like 'pvecm status' they may even never make
sense, as they exec an external program which doesn't honors nor gets
those std options...
Also some internal commands, like 'qm mtunnel' will never use it, as
probably even "normal" commands, as it may simply not make sense for
every command..
So make it opt-in for now, any CLI command can set std-output-opts to
get them.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>