]>
git.proxmox.com Git - proxmox.git/log
Dietmar Maurer [Fri, 28 Feb 2020 09:10:35 +0000 (10:10 +0100)]
fix typo in doc comment
Dietmar Maurer [Fri, 28 Feb 2020 09:08:24 +0000 (10:08 +0100)]
bump rust-proxmox version 0.1.17-1
Dietmar Maurer [Fri, 28 Feb 2020 09:05:59 +0000 (10:05 +0100)]
text_table.rs: fix max column width when displaying without header
Dietmar Maurer [Fri, 28 Feb 2020 08:45:31 +0000 (09:45 +0100)]
text_table.rs: add table padding
Dietmar Maurer [Fri, 28 Feb 2020 08:29:04 +0000 (09:29 +0100)]
text_table.rs: fix column seperator for ascii tables
Wolfgang Bumiller [Thu, 27 Feb 2020 12:12:28 +0000 (13:12 +0100)]
bump proxmox to 0.1.16
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 27 Feb 2020 12:10:40 +0000 (13:10 +0100)]
bump proxmox-api-macro to 0.1.4
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 27 Feb 2020 12:08:59 +0000 (13:08 +0100)]
api-macro: make API_{RETURN,PARAMETER}_SCHEMA_... public
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 27 Feb 2020 11:36:57 +0000 (12:36 +0100)]
bump rust-proxmox version to 0.1.15-1
Dietmar Maurer [Thu, 27 Feb 2020 11:34:46 +0000 (12:34 +0100)]
proxmox/src/api/cli/text_table.rs: new helpers to read output format from environment
Dietmar Maurer [Thu, 27 Feb 2020 10:17:38 +0000 (11:17 +0100)]
bump rust-proxmox version to 0.1.14-1
Dietmar Maurer [Thu, 27 Feb 2020 10:10:02 +0000 (11:10 +0100)]
proxmox/src/api/cli/text_table.rs - format_object: use column_config header
Also right_align Value column if all properthies are right_aligned.
Dietmar Maurer [Thu, 27 Feb 2020 09:01:30 +0000 (10:01 +0100)]
proxmox/src/api/cli/text_table.rs: implement sort by multiple columns
Also implement sort order flag and column header property.
Dietmar Maurer [Fri, 31 Jan 2020 08:00:51 +0000 (09:00 +0100)]
src/api/schema.rs - verify_json_object: improve error message
Dietmar Maurer [Fri, 31 Jan 2020 07:04:07 +0000 (08:04 +0100)]
bump librust-proxmox version to 0.1.13-1
Dietmar Maurer [Fri, 31 Jan 2020 07:02:06 +0000 (08:02 +0100)]
src/api/cli/text_table.rs: use new sys::linux::tty::stdout_terminal_size
Dietmar Maurer [Fri, 31 Jan 2020 06:58:48 +0000 (07:58 +0100)]
src/sys/linux/tty.rs: add tty helpers
Christian Ebner [Thu, 30 Jan 2020 11:08:02 +0000 (12:08 +0100)]
fix typos in doc comments.
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
Dietmar Maurer [Fri, 31 Jan 2020 05:53:33 +0000 (06:53 +0100)]
bump rust-proxmox version to 0.1.12-1
Dietmar Maurer [Thu, 30 Jan 2020 17:25:43 +0000 (18:25 +0100)]
src/api/cli/text_table.rs: only call TIOCGWINSZ on terminals
Dietmar Maurer [Thu, 30 Jan 2020 17:18:26 +0000 (18:18 +0100)]
src/api/cli/text_table.rs - TableFormatOptions: allow to add single column configs
Wolfgang Bumiller [Thu, 30 Jan 2020 11:46:28 +0000 (12:46 +0100)]
bump version to 0.1.11
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 30 Jan 2020 11:45:51 +0000 (12:45 +0100)]
proxmox: bump api-macro version dependency
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 30 Jan 2020 11:37:26 +0000 (12:37 +0100)]
formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 30 Jan 2020 11:35:28 +0000 (12:35 +0100)]
bump api-macro to 0.1.3
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 30 Jan 2020 11:32:22 +0000 (12:32 +0100)]
expose parameter schema as API_PARAMETER_SCHEMA_<methodname>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 30 Jan 2020 11:28:12 +0000 (12:28 +0100)]
expose return schema as API_RETURN_SCHEMA_<methodname>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 30 Jan 2020 10:47:06 +0000 (11:47 +0100)]
bump rust-proxmox version to 0.1.10-1
Dietmar Maurer [Thu, 30 Jan 2020 10:43:33 +0000 (11:43 +0100)]
proxmox/src/api/cli/text_table.rs: new table formatter
Dietmar Maurer [Mon, 27 Jan 2020 17:04:26 +0000 (18:04 +0100)]
rust-proxmox: bump version to 0.1.9-1
Dietmar Maurer [Mon, 27 Jan 2020 17:01:16 +0000 (18:01 +0100)]
api/cli/command.rs: implement both sync and async versions.
Dietmar Maurer [Mon, 27 Jan 2020 10:09:14 +0000 (11:09 +0100)]
src/api/cli/command.rs - handle_nested_command: fix help output
Thomas Lamprecht [Thu, 23 Jan 2020 12:56:32 +0000 (13:56 +0100)]
fix denglisch: s/rest/remaining/
"rest" as word means "to relax" in english, not the "remaining
stuff", so swap rest out with remaining/remainder, respectively.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Wolfgang Bumiller [Thu, 23 Jan 2020 12:17:56 +0000 (13:17 +0100)]
bump proxmox to 0.1.8 to depend on api macro 0.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 23 Jan 2020 12:16:50 +0000 (13:16 +0100)]
bump api-macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 23 Jan 2020 12:15:59 +0000 (13:15 +0100)]
fix property sorting
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 22 Jan 2020 07:56:51 +0000 (08:56 +0100)]
sys: doc update
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 22 Jan 2020 07:54:53 +0000 (08:54 +0100)]
sys: hide io_assert macro for now
too risky since errno-changing calls before it can ruin the
result
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 21 Jan 2020 11:30:13 +0000 (12:30 +0100)]
build fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 21 Jan 2020 11:23:50 +0000 (12:23 +0100)]
remove valgrind feature for now and bump to 0.1.7
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 21 Jan 2020 11:20:05 +0000 (12:20 +0100)]
Merge remote-tracking branch 'proxdev/master'
Wolfgang Bumiller [Tue, 21 Jan 2020 10:56:56 +0000 (11:56 +0100)]
merge api, sys and tools into proxmox directly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 21 Jan 2020 10:28:15 +0000 (11:28 +0100)]
Add make dinstall target
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 21 Jan 2020 10:28:12 +0000 (11:28 +0100)]
formatting fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 21 Jan 2020 10:18:58 +0000 (11:18 +0100)]
bump proxmox-api version
Dietmar Maurer [Tue, 21 Jan 2020 09:46:41 +0000 (10:46 +0100)]
src/cli/command.rs: avoid creating a tokio runtime by making run_cli_command async
Wolfgang Bumiller [Fri, 17 Jan 2020 12:32:21 +0000 (13:32 +0100)]
sys: double-parse fixup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 17 Jan 2020 12:30:28 +0000 (13:30 +0100)]
sys: mountinfo parsing fixups
* include the failing line on errors
* don't fail on the final empty line...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 16 Jan 2020 10:35:00 +0000 (11:35 +0100)]
bump sys crate
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 16 Jan 2020 10:33:42 +0000 (11:33 +0100)]
sys: read_for_pid -> read_from_pid, drop deprecated functions
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 16 Jan 2020 09:41:08 +0000 (10:41 +0100)]
explicitly run 'cargo +nightly fmt'
drop rust-toolchain file
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 16:10:13 +0000 (17:10 +0100)]
add Cargo.lock to .gitignore
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 15:25:14 +0000 (16:25 +0100)]
build.sh: point to system compiler via rust-toolchain
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 14:56:06 +0000 (15:56 +0100)]
proxmox: fix proxmox-sys dependency version
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 15 Jan 2020 14:39:47 +0000 (15:39 +0100)]
bump package versions
Wolfgang Bumiller [Wed, 15 Jan 2020 14:34:26 +0000 (15:34 +0100)]
bump proxmox-sys to 0.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 13:26:06 +0000 (14:26 +0100)]
README: Remove 'Versioning', add 'Steps for Releases'
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 13:10:36 +0000 (14:10 +0100)]
macro: silence some warnings in tests
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Wed, 15 Jan 2020 13:02:29 +0000 (14:02 +0100)]
proxmox-api/src/cli/format.rs: improve generate_usage_str()
List all arguments, and reduce empty lines.
Wolfgang Bumiller [Wed, 15 Jan 2020 12:11:05 +0000 (13:11 +0100)]
improve build.sh
set $CARGO and $RUSTC env vars to also work for users with
rustup paths in their $PATH.
Replace $(pwd) with $PWD
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Wed, 15 Jan 2020 07:05:49 +0000 (08:05 +0100)]
build: switch to debcargo
to autogenerate crate (build)-dependencies, and correct Provides
statements.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Wolfgang Bumiller [Wed, 15 Jan 2020 09:57:11 +0000 (10:57 +0100)]
sys: add pid module with PidFd type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 14:18:09 +0000 (15:18 +0100)]
sys: derive Clone and Debug for mount_info::Entry and MountInfo
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 14:15:52 +0000 (15:15 +0100)]
sys: use a BTreeMap for MountInfo internally
Since the only reasonable access is by mount "id" and they
don't need to be consecutive (but they are numeric), use a
BTreeMap for MountInfo.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 13:56:03 +0000 (14:56 +0100)]
sys: export MountInfo in procfs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 13:54:51 +0000 (14:54 +0100)]
sys: more helpers for MountInfo
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 13:41:21 +0000 (14:41 +0100)]
sys: add /proc/self/mountinfo parsing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 11:05:04 +0000 (12:05 +0100)]
sys: Add TryFrom<Pid> for PidStat
Since nix's Pid type is a strong type, we can add a TryFrom
implementation here as well.
This can later also have the equivalent TryFrom<PidFd>
variant.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 11:01:06 +0000 (12:01 +0100)]
sys: change PidStat API
Rather than standalone functions, `PidStat` now provides a
`read_for_pid` and `parse` method. Both are public.
One side effect is that the documentation of PidStat's
contents are on the same page as the ways to retrieve it.
Additionally, we deprecate `read_proc_starttime` as it was
reading the entire contents to then filter out one value, in
order to promote caching.
The standalone `read_proc_pid_stat` method is now also
deprecated.
Once we add pid-fds the API will feel cleaner this way.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 10:49:33 +0000 (11:49 +0100)]
sys: extend proc_pid_stat parsing
Rename `ProcFsPidStat` to `PidStat`. It's already in a
procfs submodule anyway. (We have currently no public users
of this type by name.)
Further add pid, ppid and num_threads to PidStat.
Public API change.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Jan 2020 10:21:28 +0000 (11:21 +0100)]
take a reference to the dirfd in Fd::openat
Otherwise we cannot pass references to it unless the AsRawFd
implementation was made for the reference itself rather than
the type.
Note that while this changes the public API, we have no
users outside of this crate yet and no public releases,
so I'm not doing a major version bump.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 13:26:12 +0000 (14:26 +0100)]
fixup provides list
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 13:21:39 +0000 (14:21 +0100)]
finish version bump
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 13:14:11 +0000 (14:14 +0100)]
bump proxmox to 0.1.2
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 10:29:15 +0000 (11:29 +0100)]
bump api-macro to 0.1.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 10:28:00 +0000 (11:28 +0100)]
api-macro: even more documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 10:23:48 +0000 (11:23 +0100)]
api-macro: more documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 10:01:55 +0000 (11:01 +0100)]
api-macro: schema tests for async fns
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:58:26 +0000 (10:58 +0100)]
api-macro: more tests
Note that this one tests the fact that we do not do output
schema validation!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:56:45 +0000 (10:56 +0100)]
api-macro: more invocation tests for api methods
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:41:29 +0000 (10:41 +0100)]
api-macro: add expanded data to tests for verification
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:22:41 +0000 (10:22 +0100)]
api: add test-harness feature
If enabled, the Schema type implements Eq and PartialEq for
testing the api macro better.
Note that these implementations don't make all too much
since since they also compare `dyn Fn` types which do not
implement Eq. Since they're also `&'static` they can't
really be runtime closures, so this should be fine, we know
they'll always point to some regular function.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:09:41 +0000 (10:09 +0100)]
api-macro: support empty api macro on structs
The description comes from the doc comment, the field types
and description from field doc comments and types.
Previously we needed to add at least the hint that the
schema is an object schema. Now we support an empty #[api]
attribute as well.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 8 Jan 2020 09:06:48 +0000 (10:06 +0100)]
api-macro: support renamed struct fields
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 14:29:56 +0000 (15:29 +0100)]
api-macro: support rename_all in enums
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 14:23:52 +0000 (15:23 +0100)]
api-macro: start using serde attribute helpers
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 14:10:55 +0000 (15:10 +0100)]
api-macro: prepare to support serde::rename_all
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:37:33 +0000 (13:37 +0100)]
api-macro: more option type handling
infer_type now also returns whether it was encapsualted in
an Option<>. So `type: String, optional: true` is now
inferred propertly from `Option<String>`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:19:13 +0000 (13:19 +0100)]
api-macro: derive optional values correctly
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:18:21 +0000 (13:18 +0100)]
api-macro: reorganize field iteration
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:16:12 +0000 (13:16 +0100)]
api-macro: error on extraneous fields
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:09:19 +0000 (13:09 +0100)]
api-macro: add basic struct handling
- handle doc comments for descriptions
- infer fields from structs when possible
- perform some basic error checking
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 12:09:08 +0000 (13:09 +0100)]
api-macro: factor out type inference for reuse with structs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 11:11:04 +0000 (12:11 +0100)]
api-macro: split struct handling into newtype, regular, unit, ...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 7 Jan 2020 10:59:24 +0000 (11:59 +0100)]
api-macro: derive descriptions for structs
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Fri, 3 Jan 2020 08:39:52 +0000 (09:39 +0100)]
cargo: switch to use packaged crates by default
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Fabian Grünbichler [Fri, 3 Jan 2020 06:28:24 +0000 (07:28 +0100)]
tools: remove accidentally commited debian/files
it's a build artifact, no need to version control it.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Wolfgang Bumiller [Thu, 2 Jan 2020 13:35:40 +0000 (14:35 +0100)]
version bump
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 2 Jan 2020 13:25:09 +0000 (14:25 +0100)]
api-macro: drop unused dev-dependencies
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Thu, 2 Jan 2020 13:07:12 +0000 (14:07 +0100)]
readme: add cargo config for packaged crates
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>