Commit Graph

670 Commits

Author SHA1 Message Date
Dietmar Maurer
3adcdacc22 bump version to 0.1.28-1 2020-05-12 09:15:47 +02:00
Dietmar Maurer
7d5a8fdda7 proxmox/src/api/section_config.rs: add support for systemd config files 2020-05-12 09:14:03 +02:00
Dietmar Maurer
414daabbcb proxmox/src/api/section_config.rs: support array properties 2020-05-12 08:27:23 +02:00
Dietmar Maurer
e847487b29 bump version to 0.1.27-1 2020-05-08 08:08:17 +02:00
Dietmar Maurer
aaed6797a5 schema: split property string lists with comma, semicolon and white space. 2020-05-08 08:05:22 +02:00
Dietmar Maurer
0cc97715e3 bump version to 0.1.26-1 2020-05-06 12:28:39 +02:00
Dietmar Maurer
d7c5af499b run_cli_command: add additional rpcenv parameter 2020-05-06 12:22:56 +02:00
Wolfgang Bumiller
3133316a8a bump version to 0.1.25-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-29 10:48:19 +02:00
Wolfgang Bumiller
c329cedb02 bump api macro to 0.1.8
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-29 10:48:19 +02:00
Wolfgang Bumiller
83d9d3e165 implement descriptions for enum variants
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-29 10:48:19 +02:00
Dietmar Maurer
693d8d39be fix changelog entry for proxmox 0.1.23 2020-04-28 08:19:26 +02:00
Dietmar Maurer
51782f7b4f bump proxmox version to 0.1.24 2020-04-28 08:16:46 +02:00
Dietmar Maurer
e93a36955d proxmox/src/api/section_config.rs - convert_to_array: remove static lifetime
not required...
2020-04-28 08:13:44 +02:00
Dietmar Maurer
9e10d85538 src/api/cli/text_table.rs - format_object: skip optional properties without data 2020-04-27 06:23:26 +02:00
Dietmar Maurer
e229c3d582 bump proxmox version to 0.1.23 2020-04-25 17:04:47 +02:00
Dietmar Maurer
b6765d06c5 api/cli/command.rs: handle fixed_param 2020-04-25 16:17:39 +02:00
Wolfgang Bumiller
341795c1ee Revert "proxmox: add SysError::is_errno_raw"
Not actually required, the numbers just overlapped and are
therefore no separate enum entry.

This reverts commit 8f57f29ca8.
2020-04-23 12:43:29 +02:00
Wolfgang Bumiller
8f57f29ca8 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>
2020-04-23 11:41:06 +02:00
Wolfgang Bumiller
c9aa2beb47 fixup last commit
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-23 11:09:46 +02:00
Wolfgang Bumiller
4e2e37b7d3 proxmox: tools: add RawFdNum helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-23 11:07:03 +02:00
Dietmar Maurer
48f8e6070d api/cli/completion.rs: implement completion for lists of strings 2020-04-23 10:58:16 +02:00
Dietmar Maurer
6fba9bf0bf IP_REGEX - match whole string 2020-04-19 07:55:40 +02:00
Wolfgang Bumiller
c45c291f18 bump proxmox crate to 0.1.22-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:38:06 +02:00
Wolfgang Bumiller
95403224c5 bump proxmox-api-macro to 0.1.7-1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:37:55 +02:00
Wolfgang Bumiller
49fb5e127c bump proxmox-sortable-macro to 0.1.1
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:37:46 +02:00
Wolfgang Bumiller
5dd21ee89b switch from failure to anyhow
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-17 18:34:21 +02:00
Dietmar Maurer
5affb691b5 proxmox-api-macro/src/api/method.rs: fix error message 2020-04-17 15:28:49 +02:00
Wolfgang Bumiller
5ae320f577 api-macro: add test for access w/o a description
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-16 09:26:24 +02:00
Wolfgang Bumiller
62f3c7d2d9 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>
2020-04-16 09:26:24 +02:00
Wolfgang Bumiller
6d831e36dd 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>
2020-04-16 09:26:24 +02:00
Dietmar Maurer
b07d592597 bump rust-proxmox-api-macro version to 0.1.6-1 2020-04-16 08:44:17 +02:00
Dietmar Maurer
6976fc4a35 bump rust-proxmox version to 0.1.21-1 2020-04-16 08:43:29 +02:00
Dietmar Maurer
076501e17e proxmox-api-macro/tests/api1.rs: fix test case 2020-04-16 08:42:05 +02:00
Dietmar Maurer
382eb665c4 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)
2020-04-16 08:07:03 +02:00
Dietmar Maurer
e78e31ab4c make access description optional 2020-04-16 07:20:29 +02:00
Dietmar Maurer
25dbb0ebab api macro: support reload_timezone 2020-04-15 17:26:43 +02:00
Dietmar Maurer
9c523a4de6 list_subdirs_api_method: allow access for Anybody 2020-04-15 09:26:56 +02:00
Wolfgang Bumiller
da01ff1a72 style cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-15 09:21:04 +02:00
Wolfgang Bumiller
973e7ccef0 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>
2020-04-15 09:19:25 +02:00
Wolfgang Bumiller
510d410b7a api-macro: support 'access' specification for methods
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-14 14:28:12 +02:00
Wolfgang Bumiller
19ad65ac84 api-macro: error on unexpected keys
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-14 13:48:09 +02:00
Wolfgang Bumiller
2c83d55cb0 api-macro: util: add join and join_debug helper
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-14 13:27:36 +02:00
Wolfgang Bumiller
0b2c9b95b4 api-macro: minor cleanup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-04-14 11:45:50 +02:00
Wolfgang Bumiller
b67e2f7214 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>
2020-04-14 11:25:40 +02:00
Wolfgang Bumiller
5aeebdab44 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>
2020-04-14 10:56:39 +02:00
Dietmar Maurer
5d73e4b8e8 flatten use hierarchy for api::Permissions 2020-04-10 15:43:49 +02:00
Dietmar Maurer
7ec6448db8 implement access permission system 2020-04-10 11:24:24 +02:00
Dietmar Maurer
89e71adfeb bump proxmox crate to 0.1.20-1 2020-03-25 10:56:46 +01:00
Dietmar Maurer
75e4c4a205 improve command line completion with optional argument parameters 2020-03-25 10:52:13 +01:00
Wolfgang Bumiller
ab8a6120ca api-macro: started with some more documentation
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-03-23 15:55:18 +01:00