]>
git.proxmox.com Git - proxmox.git/log
Dietmar Maurer [Fri, 15 May 2020 15:43:54 +0000 (17:43 +0200)]
bump version to 0.1.30-1
Dietmar Maurer [Fri, 15 May 2020 15:40:53 +0000 (17:40 +0200)]
proxmox/src/tools/time.rs: binding for libc localtime/timelocal
Wolfgang Bumiller [Fri, 15 May 2020 07:15:10 +0000 (09:15 +0200)]
api-macro: remove more unnecessary parentheses
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 14 May 2020 13:39:22 +0000 (15:39 +0200)]
api-macro: remove some unnecessary parentheses in output
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 12 May 2020 10:57:53 +0000 (12:57 +0200)]
bump version to 0.1.29-1
Dietmar Maurer [Tue, 12 May 2020 10:54:14 +0000 (12:54 +0200)]
proxmox/src/api/section_config.rs: make record_order public
It is sometimes usable to record the order.
Dietmar Maurer [Tue, 12 May 2020 07:15:47 +0000 (09:15 +0200)]
bump version to 0.1.28-1
Dietmar Maurer [Tue, 12 May 2020 07:14:03 +0000 (09:14 +0200)]
proxmox/src/api/section_config.rs: add support for systemd config files
Dietmar Maurer [Tue, 12 May 2020 06:27:23 +0000 (08:27 +0200)]
proxmox/src/api/section_config.rs: support array properties
Dietmar Maurer [Fri, 8 May 2020 06:08:17 +0000 (08:08 +0200)]
bump version to 0.1.27-1
Dietmar Maurer [Fri, 8 May 2020 06:05:22 +0000 (08:05 +0200)]
schema: split property string lists with comma, semicolon and white space.
Dietmar Maurer [Wed, 6 May 2020 10:28:39 +0000 (12:28 +0200)]
bump version to 0.1.26-1
Dietmar Maurer [Wed, 6 May 2020 10:22:56 +0000 (12:22 +0200)]
run_cli_command: add additional rpcenv parameter
Wolfgang Bumiller [Wed, 29 Apr 2020 08:46:42 +0000 (10:46 +0200)]
bump version to 0.1.25-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 29 Apr 2020 08:44:52 +0000 (10:44 +0200)]
bump api macro to 0.1.8
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 29 Apr 2020 08:42:36 +0000 (10:42 +0200)]
implement descriptions for enum variants
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Tue, 28 Apr 2020 06:19:26 +0000 (08:19 +0200)]
fix changelog entry for proxmox 0.1.23
Dietmar Maurer [Tue, 28 Apr 2020 06:16:46 +0000 (08:16 +0200)]
bump proxmox version to 0.1.24
Dietmar Maurer [Tue, 28 Apr 2020 06:13:44 +0000 (08:13 +0200)]
proxmox/src/api/section_config.rs - convert_to_array: remove static lifetime
not required...
Dietmar Maurer [Mon, 27 Apr 2020 04:23:26 +0000 (06:23 +0200)]
src/api/cli/text_table.rs - format_object: skip optional properties without data
Dietmar Maurer [Sat, 25 Apr 2020 15:04:47 +0000 (17:04 +0200)]
bump proxmox version to 0.1.23
Dietmar Maurer [Sat, 25 Apr 2020 14:16:57 +0000 (16:16 +0200)]
api/cli/command.rs: handle fixed_param
Wolfgang Bumiller [Thu, 23 Apr 2020 10:43:29 +0000 (12:43 +0200)]
Revert "proxmox: add SysError::is_errno_raw"
Not actually required, the numbers just overlapped and are
therefore no separate enum entry.
This reverts commit
8f57f29ca84dbfdb99a822fdfbba43b361577a81 .
Wolfgang Bumiller [Thu, 23 Apr 2020 09:40:53 +0000 (11:40 +0200)]
proxmox: add SysError::is_errno_raw
to work around missing errno values in nix 0.16
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 23 Apr 2020 09:09:46 +0000 (11:09 +0200)]
fixup last commit
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 23 Apr 2020 09:06:35 +0000 (11:06 +0200)]
proxmox: tools: add RawFdNum helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 23 Apr 2020 08:58:16 +0000 (10:58 +0200)]
api/cli/completion.rs: implement completion for lists of strings
Dietmar Maurer [Sun, 19 Apr 2020 05:55:40 +0000 (07:55 +0200)]
IP_REGEX - match whole string
Wolfgang Bumiller [Fri, 17 Apr 2020 16:38:06 +0000 (18:38 +0200)]
bump proxmox crate to 0.1.22-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 17 Apr 2020 16:37:55 +0000 (18:37 +0200)]
bump proxmox-api-macro to 0.1.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 17 Apr 2020 16:37:46 +0000 (18:37 +0200)]
bump proxmox-sortable-macro to 0.1.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 17 Apr 2020 16:34:10 +0000 (18:34 +0200)]
switch from failure to anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 17 Apr 2020 13:28:49 +0000 (15:28 +0200)]
proxmox-api-macro/src/api/method.rs: fix error message
Wolfgang Bumiller [Thu, 16 Apr 2020 07:15:08 +0000 (09:15 +0200)]
api-macro: add test for access w/o a description
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 16 Apr 2020 07:12:44 +0000 (09:12 +0200)]
api-macro: avoid duplicate output code
While this is a tiny piece of code, having only one output
code consisting of prepared parts is nicer to keep up to
date.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 16 Apr 2020 07:07:10 +0000 (09:07 +0200)]
api-macro: cleanup & test fixup
remove unnecessary types, they were already in the struct
update test to use Option for access description
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Thu, 16 Apr 2020 06:32:10 +0000 (08:32 +0200)]
bump rust-proxmox-api-macro version to 0.1.6-1
Dietmar Maurer [Thu, 16 Apr 2020 06:31:30 +0000 (08:31 +0200)]
bump rust-proxmox version to 0.1.21-1
Dietmar Maurer [Thu, 16 Apr 2020 06:41:22 +0000 (08:41 +0200)]
proxmox-api-macro/tests/api1.rs: fix test case
Dietmar Maurer [Thu, 16 Apr 2020 06:07:03 +0000 (08:07 +0200)]
proxmox/src/api/permission.rs: pass parameters as HashMap
- to make it suitable for our rest server...
- also avoid repeated is_superuser() checks
- fix privilege test (add check for 0)
Dietmar Maurer [Thu, 16 Apr 2020 05:20:29 +0000 (07:20 +0200)]
make access description optional
Dietmar Maurer [Wed, 15 Apr 2020 15:26:43 +0000 (17:26 +0200)]
api macro: support reload_timezone
Dietmar Maurer [Wed, 15 Apr 2020 07:23:33 +0000 (09:23 +0200)]
list_subdirs_api_method: allow access for Anybody
Wolfgang Bumiller [Wed, 15 Apr 2020 07:21:04 +0000 (09:21 +0200)]
style cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Wed, 15 Apr 2020 07:19:24 +0000 (09:19 +0200)]
rename some permission/access items
router.permissions(...) -> router.access(...)
to be more consistent with the other builder methods and
struct member names
ApiAccessPermissions -> ApiAccess
shorter, not necessarily with defined permissions, and
gets rid of a singular/plural confusion
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 11:28:16 +0000 (13:28 +0200)]
api-macro: support 'access' specification for methods
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 11:29:43 +0000 (13:29 +0200)]
api-macro: error on unexpected keys
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 11:25:52 +0000 (13:25 +0200)]
api-macro: util: add join and join_debug helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 09:45:50 +0000 (11:45 +0200)]
api-macro: minor cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 09:25:18 +0000 (11:25 +0200)]
api/permissions: support test-harness
(Api-macro tests want to use `==` to compare generated
schemas against hardcoded schemas.)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Tue, 14 Apr 2020 08:55:20 +0000 (10:55 +0200)]
api/permissions: cleanup & formatting
Use the `write!` macro as a shortcut for
f.write_fmt(format_args!(...))
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dietmar Maurer [Fri, 10 Apr 2020 13:43:49 +0000 (15:43 +0200)]
flatten use hierarchy for api::Permissions
Dietmar Maurer [Fri, 10 Apr 2020 09:24:24 +0000 (11:24 +0200)]
implement access permission system
Dietmar Maurer [Wed, 25 Mar 2020 09:56:46 +0000 (10:56 +0100)]
bump proxmox crate to 0.1.20-1
Dietmar Maurer [Wed, 25 Mar 2020 09:37:22 +0000 (10:37 +0100)]
improve command line completion with optional argument parameters
Wolfgang Bumiller [Mon, 23 Mar 2020 14:55:18 +0000 (15:55 +0100)]
api-macro: started with some more documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 23 Mar 2020 08:06:43 +0000 (09:06 +0100)]
api-macro: add consts for defaults
Not sure how we want to actually handle default values yet.
For now we need to figure out what "feels best".
This adds default values as publicly available consts so
they can be accessed from anywhere as
`API_METHOD_<METHOD_NAME>_PARAM_DEFAULT_<PARAM_NAME>`.
This is quite a handful to type, but I'm not sure how to
make this better.
Within the function body we also have the
`api_get_default!(param_name)` macro which is more
convenient, but not available outside the `#[api]` tagged
function.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Mon, 23 Mar 2020 07:04:23 +0000 (08:04 +0100)]
api-macro: explicitly enable syn's visit-mut feature
otherwise the build fails because the module is not visible
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Wolfgang Bumiller [Thu, 19 Mar 2020 14:49:34 +0000 (15:49 +0100)]
api-macro: add api_get_default!() macro
When writing an #[api] function, one can now access default
values by parameter name (see test_default_option in
tests/options.rs):
#[api(...)]
pub fn func(value: Option<isize>) {
println!(
"value: {}",
value.unwrap_or(api_get_default!("value")),
);
}
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 19 Mar 2020 11:08:38 +0000 (12:08 +0100)]
api-macro: tests for optional non-Option parameters
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 19 Mar 2020 11:08:10 +0000 (12:08 +0100)]
api-macro: allow optional types without Option<T>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 19 Mar 2020 09:00:50 +0000 (10:00 +0100)]
bump proxmox crate to 0.1.19-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Thu, 19 Mar 2020 08:56:45 +0000 (09:56 +0100)]
bump api-macro to 0.1.5
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Dominik Csapak [Wed, 18 Mar 2020 15:27:38 +0000 (16:27 +0100)]
make cli format a bit saner
this looks more like pve/pmg cli tools now
without double the empty lines
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Mon, 16 Mar 2020 11:21:14 +0000 (12:21 +0100)]
buildsys: drop format check in check target
rename 'checkfmt' target to 'fmt'
there's no "apply formatting" target anymore now, this has
to be done manually to not do this by accident
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 12:50:39 +0000 (13:50 +0100)]
api-macro: cleanup: warnings
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 12:37:59 +0000 (13:37 +0100)]
api-macro: cleanup: don't use try_fold for a Vec
`collect()` uses `FromIterator` which is also implemented
for `Result<Vec, Err>` from `Result<Item, Err>` doing the
same thing.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 11:01:32 +0000 (12:01 +0100)]
api-macro: add integer limit test cases
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 10:57:15 +0000 (11:57 +0100)]
api-macro: include default minimum/maximum for integer types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 10:56:42 +0000 (11:56 +0100)]
api-macro: replace unreachable with a panic
(we're not running into this, but ran into an unreachable in
`syn` during development, and I needed to make sure it's not
one of ours...)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 10:10:22 +0000 (11:10 +0100)]
api-macro: correctly infer newtype types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Wolfgang Bumiller [Fri, 6 Mar 2020 09:53:59 +0000 (10:53 +0100)]
api-macro: factor handle_struct differently
Don't assume an empty object schema for all cases as
newtypes shouldn't use an object schema at all actually!
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fabian Grünbichler [Tue, 3 Mar 2020 10:50:28 +0000 (11:50 +0100)]
build: add -upload target
requires 'dcmd' from devscripts to extract binary package file names
from .changes file
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Dietmar Maurer [Mon, 2 Mar 2020 13:07:35 +0000 (14:07 +0100)]
Revert "add proxmox/src/sys/linux/fs.rs"
This reverts the previous commit
21b9321cf81409cb07ef332076f54dc4f32141ce .
Turn out we only need this for pxar, so this will get moved into the pxar crate.
Dietmar Maurer [Mon, 2 Mar 2020 12:59:39 +0000 (13:59 +0100)]
add proxmox/src/sys/linux/fs.rs
Dietmar Maurer [Mon, 2 Mar 2020 11:48:31 +0000 (12:48 +0100)]
bump rust-proxmox version 0.1.18-1
Dietmar Maurer [Mon, 2 Mar 2020 09:56:40 +0000 (10:56 +0100)]
src/api/section_config.rs: moved SectionConfig from proxmox-backup
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>