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!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
While technically an API break, we don't use the public API for this
anywhere and the trait we're changing is explicitly marked as
`#[doc(hidden)]`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The `_application_name` argument is not used anymore. It was previously
used to set the correct journald unit-name, which is now handled
automatically.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Used only for read/writing a pid_t (an integer) to a socket.
The standard to_ne_bytes()/from_ne_bytes() should be sufficient here,
we already have libc::pid_t which we can use to get the correct type
namespace for accessing ::from_ne_bytes().
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
When reaching the final command we relied on the positional parameters
"ending" the global option parsing. This means we did not get global
options at the end, and failed with "unknown option" instead.
Fix this by simply retaining unknown options in that case and not
stopping at positional parameters.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
As per [RFC9110] the Deflate encoding is a "zlib" data format. This
makes the rest-server compatible with the http-client.
[RFC9110] https://www.rfc-editor.org/rfc/rfc9110#field.content-encoding
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Max Carrara <m.carrara@proxmox.com>
Tested-by: Max Carrara <m.carrara@proxmox.com>
Reorder the filters for the journald layer. This sets the LevelFilter
last, which means tracing can disable all log statements lower than the
current level without evaluating the LogContext::exists function.
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
[ TL: note that this is just an optimization in the subject ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Deduplicate the check for whether the argument exists by trying to
fetch the schema once and use check the option instead of calling
'.contains_key()' multiple times.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Passing the &GlobalOptions through is more telling than an opaque
Iterator<&str>...
Also: actually generate the property descriptions in non-ReST mode for
global options as well, so the `help` output for a specific command
includes the property documentation instead of only showing the name.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The rules are as follows:
- An "item" by itself does neither start nor end with a newline.
- Where items are connected, the appropriate amount of newlines must
be inserted, assuming items do not have any trailing newlines.
Otherwise this just gets WAY too confusing everywhere!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This is completely wrong and make working with it extremely annoying.
Whether or not there should be separation should be decided where
multiple elements are connected, they shouldn't automatically come
with a bunch of trailing new lines for absolutely no reason.
Places using this will need to be fixed as they get noticed.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This one does *explicitly* *not* support long options with a single
dash because it is too ambiguous if we want to add support for short
options at some point.
The parsing of the command line and invoking of the command is
separated. `CommandLine::parse` returns an `Invocation` which is
called and consumed via its `call` method.
This allows updating the CLI environment between parsing and invoking
the command, in order to allow *handling* the global options in
between those two steps if desired.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
The CLI environment can now contain ApiType structs which can be
accessed by their type.
The TypeId is used since the options inside must be unique anyway and
we can't have the same type specified multiple times. It also makes
for a somewhat convenient interface:
env.take_global_option::<ConnectInfo>()
where ConnectInfo is a struct containing the server, user, port, ...
since these will not be passed as *parameters* to the API functions.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>