Dietmar Maurer
dc40196c32
bump package versions
2020-01-15 15:39:47 +01:00
Dietmar Maurer
17980fe62d
proxmox-api/src/cli/format.rs: improve generate_usage_str()
...
List all arguments, and reduce empty lines.
2020-01-15 14:09:34 +01:00
Fabian Grünbichler
a94de245f0
build: switch to debcargo
...
to autogenerate crate (build)-dependencies, and correct Provides
statements.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-01-15 12:02:47 +01:00
Wolfgang Bumiller
b0ef405186
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>
2020-01-08 10:38:30 +01:00
Wolfgang Bumiller
43682dd416
version bump
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-01-02 14:42:28 +01:00
Wolfgang Bumiller
1a2aaad5a1
more versioning fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2019-12-30 12:33:13 +01:00
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