Fabian Grünbichler
08433fd330
proxmox-api: use proxmox-tools package in d/rules
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 09:39:45 +01:00
Fabian Grünbichler
92c645cee2
proxmox-api: initial packaging
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 09:39:45 +01:00
Fabian Grünbichler
36f03c0feb
proxmox-api: update rustyline to 5.0.5
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 09:39:45 +01:00
Fabian Grünbichler
2ecd975608
proxmox-api: update lazy_static to 1.4
...
which is available in Debian unstable.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2019-12-20 09:39:45 +01:00
Wolfgang Bumiller
5e1468bff8
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-18 13:20:58 +01:00
Dietmar Maurer
d0349e9ba9
src/cli/format.rs - print_help: by default, use verbose output for simply commands
2019-12-18 13:08:18 +01:00
Thomas Lamprecht
13007df318
api/macro: add NumberSchema
...
Adapted from the integer schema, uses f64 type.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Cc: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-18 11:30:55 +01:00
Dietmar Maurer
7dadea06dd
implement ApiHandler::Async
2019-12-16 09:53:25 +01:00
Wolfgang Bumiller
d9897316b8
api: update url crate to 2.1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-13 11:30:09 +01:00
Wolfgang Bumiller
5d5918ef8e
update bytes to 0.5
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-12 15:35:36 +01:00
Wolfgang Bumiller
f1fcdff9a3
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-12 15:35:30 +01:00
Wolfgang Bumiller
6d152f8930
updates for hyper 0.13 release
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-12 13:13:53 +01:00
Dietmar Maurer
bf7b939bdf
proxmox-api/src/cli.rs: simplify cli setup using generics.
2019-12-09 17:38:18 +01:00
Dietmar Maurer
c9cec98ece
proxmox-api/src/cli/format.rs - generate_nested_usage: fix formating with empty prefix
2019-12-06 10:14:22 +01:00
Wolfgang Bumiller
d00a096851
api: add 'router' and 'cli' features
...
Move API types into the router module and make router and
cli optional.
This way the 'router' module is the only thing with a
dependency on 'hyper', allowing the use of the schema alone
without pulling in the entire hyper stack.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-05 13:40:09 +01:00
Wolfgang Bumiller
2d12f81235
api: use http::{Parts,Response,Method}
...
hyper just reexports them
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-05 13:18:21 +01:00
Wolfgang Bumiller
ee1a7cd68b
more clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-05 12:33:29 +01:00
Wolfgang Bumiller
92ffe4c240
formatting fixup
...
please run `make` to check formatting before committing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-05 11:33:12 +01:00
Wolfgang Bumiller
8a6e741d6c
api: let ConstRegexPattern deref to Regex
...
This way we can just use `SOME_REGEX.is_match()` again
without having to explicitly call `(SOME_REGEX.regex_obj)()`
first.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-04 11:06:03 +01:00
Dietmar Maurer
55f90b4eac
proxmox_api/src/format.rs - get_property_description: fix paragraph indention
2019-12-03 07:55:53 +01:00
Dietmar Maurer
4bca463944
proxmox-api/src/format.rs: improve docs
2019-12-02 20:06:14 +01:00
Dietmar Maurer
00f3a6575c
proxmox-api/src/format.rs: add missing docs
2019-12-02 19:50:04 +01:00
Dietmar Maurer
8f7127a9aa
proxmox-api/src/cli/shellword.rs: re-export Quote from rustyline
2019-12-02 19:29:47 +01:00
Dietmar Maurer
a9275caa61
proxmox-api/src/cli/completion.rs: add more tests
2019-12-02 17:34:11 +01:00
Dietmar Maurer
f9d4dcc540
proxmox-api/src/cli/completion.rs: add help completion tests
2019-12-02 16:42:59 +01:00
Dietmar Maurer
1819b194a4
proxmox_api: add cli submodule (copied from proxmox-backup)
2019-12-02 11:49:58 +01:00
Dietmar Maurer
354cfabd37
proxmox-api: fix text_wrap() - use join instead of concat (separate by newlines)
2019-12-01 12:30:50 +01:00
Wolfgang Bumiller
9b07990086
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-25 15:07:18 +01:00
Dietmar Maurer
7e3b6944f6
proxmox_api: improve ApiStringFormat docs
2019-11-24 10:34:59 +01:00
Dietmar Maurer
e4d44ae7a3
proxmox-api: rename ApiStringFormat::Complex into ApiStringFormat::PropertyString
2019-11-24 09:51:45 +01:00
Dietmar Maurer
38abbed608
proxmox-api: improve schema docs
2019-11-23 17:00:36 +01:00
Dietmar Maurer
a3c62c420d
proxmox-api: improve schema docs
2019-11-23 15:55:18 +01:00
Dietmar Maurer
6d31db9aca
proxmox-api: further doc improvements
2019-11-23 14:13:52 +01:00
Dietmar Maurer
ed426cd99b
proxmox-api: improve router docs
2019-11-23 14:08:44 +01:00
Dietmar Maurer
f02462039d
proxmox-api - improve Router docs
2019-11-23 11:51:16 +01:00
Dietmar Maurer
c1ffee0901
proxmox-api: move impl ApiMethod to lib.rs
2019-11-23 10:58:32 +01:00
Dietmar Maurer
446ee31466
const_regex: fixup for previous commit
2019-11-23 10:48:36 +01:00
Dietmar Maurer
e89a52c30b
proxmox-api: further cleanups
...
- improve docs
- move ConstRegexPattern to const_regex.rs
2019-11-23 10:42:17 +01:00
Dietmar Maurer
fa83cbde13
proxmox-api/src/lib.rs: hide modules with inlined docs
2019-11-23 09:53:18 +01:00
Dietmar Maurer
edb41c1929
proxmox_api - ApiHandler: rename Async into AsyncHttp
...
And improve docs.
2019-11-23 08:54:07 +01:00
Dietmar Maurer
e06151b90e
api: simplify ApiAsyncHandlerFn
2019-11-22 12:48:36 +01:00
Wolfgang Bumiller
f73ebb7209
api: add format module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-22 09:28:22 +01:00
Wolfgang Bumiller
a6ce1e432b
api: fully qualify types in exported macros
...
and move const_regex macro into a separate module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 14:05:23 +01:00
Wolfgang Bumiller
c38d18484d
api: move ApiMethod from router to top level
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:43:10 +01:00
Wolfgang Bumiller
c0266a17cd
move HttpError to separate error module
...
the router doesn't actually use it
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:38:57 +01:00
Wolfgang Bumiller
2577effaf7
api: schema: avoid an extra temp string
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:32:42 +01:00
Wolfgang Bumiller
b489c2ceeb
import the new api definitions
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:30:28 +01:00
Wolfgang Bumiller
068d56ed3d
delete the old api macro stuff
...
to be replaced by a new set of macros for the current api
schema in proxmox-backup
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-11-21 13:13:18 +01:00
Wolfgang Bumiller
617e25abba
api: make ApiMethodInfo already require Send + Sync
...
ApiMethodInfo provides static information about a type
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-28 10:30:33 +02:00
Wolfgang Bumiller
eb4e28d7bf
remove async_await feature gate
...
then we can build with beta as well
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-09-28 10:10:06 +02:00