Fabian Grünbichler
ba81db7848
clippy: us *_or_else with function calls
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:23:54 +01:00
Fabian Grünbichler
724e2f47f9
clippy: use strip_prefix instead of manual stripping
...
it's less error-prone (off-by-one!)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:22:59 +01:00
Fabian Grünbichler
28f3b0df9e
clippy: remove unnecessary clones
...
and from::<T>(T)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 16:22:59 +01:00
Fabian Grünbichler
c09d8e1442
clippy: use std::ptr::null
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-20 15:04:49 +01:00
Wolfgang Bumiller
2f7b0872ea
clippy fixups
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-15 14:20:55 +01:00
Fabian Grünbichler
d6874957e3
proxmox 0.10: adapt to moved ParameterSchema
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 16:01:33 +01:00
Fabian Grünbichler
e2e0339966
cleanup: remove unnecessary 'mut' and '.clone()'
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 16:01:33 +01:00
Fabian Grünbichler
c99f950310
tokio 1.0: update to new tokio-openssl interface
...
connect/accept are now happening on pinned SslStreams
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 16:01:33 +01:00
Fabian Grünbichler
d94119efc8
tokio 1.0: delay -> sleep
...
almost the same thing, new name(s), no longer Unpin
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 16:01:33 +01:00
Fabian Grünbichler
d44c032dd5
bump proxmox to 0.10.0-1
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 15:43:19 +01:00
Fabian Grünbichler
586d94947b
bump proxmox-api-macro to 0.3.1-1
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 15:42:54 +01:00
Fabian Grünbichler
8e62cf0600
build: add autopkgtest target
...
which runs the autopkgtests on the built packages.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-14 14:23:45 +01:00
Fabian Grünbichler
43e9cf10af
move ParameterSchema from router to schema
...
it's the place where it belongs, and unbreaks the --no-default-features
build
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-13 13:40:04 +01:00
Wolfgang Bumiller
a5b8f9d340
fix u2f example
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-13 11:29:33 +01:00
Fabian Grünbichler
e05dd0074d
tokio 1.0: drop TimeoutFutureExt
...
tokio's Sleep/Delay/Timeout are no longer Unpin, complicating this
wrapper. we can just use tokio::time::timeout directly as needed..
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-12 14:29:19 +01:00
Fabian Grünbichler
0319030ed9
update to tokio 1.0
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-12 14:29:19 +01:00
Fabian Grünbichler
c65246e9bd
update to rustyline 7
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-12 14:29:19 +01:00
Fabian Grünbichler
27799ccb6d
Cargo.toml: update to tokio 1.0
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-01-12 14:29:19 +01:00
Wolfgang Bumiller
33839410b9
api: tfa management and login
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-11 10:22:32 +01:00
Wolfgang Bumiller
9a290275c3
macro: refactoring
...
purely non-functional changes
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-01-05 13:50:55 +01:00
Fabian Grünbichler
4d93fa0666
time: fix parsing non-full-hour TZ offsets
...
and add a test case to avoid regressions in the future.
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-12-31 08:26:47 +01:00
Dietmar Maurer
04417d1df5
update control files, fix changelogs
2020-12-22 13:29:09 +01:00
Dietmar Maurer
43e0e6c7de
update proxmox to 0.9.1-1
2020-12-22 13:25:56 +01:00
Stefan Reiter
78aacb67da
add tools::future with TimeoutFutureExt
...
Implements shorthands to automatically cancel a long-running future
after a timeout is reached.
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2020-12-22 13:24:36 +01:00
Dietmar Maurer
b53de8b7c0
proxmox: correctly depend on proxmox-api-macro 0.3
2020-12-22 08:06:02 +01:00
Dietmar Maurer
f6e7463ec1
bump versions to 0.9.0-1/0.3.0-1
2020-12-22 07:54:32 +01:00
Wolfgang Bumiller
8bb221663e
adaptions for proxmox 0.9 and proxmox-api-macro 0.3
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:31:05 +01:00
Wolfgang Bumiller
630fd801d2
proxmox changelog update
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:27:11 +01:00
Wolfgang Bumiller
a9318a43aa
proxmox: temporary d/changelog update
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:26:29 +01:00
Wolfgang Bumiller
bc0355e582
macro: temporary d/changelog update
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:24:09 +01:00
Wolfgang Bumiller
3d1432a788
schema: ParameterSchema at 'api' level
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:23:33 +01:00
Wolfgang Bumiller
34651099d1
api-macro: support flattened parameters
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:21:43 +01:00
Wolfgang Bumiller
4802e0321b
api-macro: factor parameter extraction into a function
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:21:25 +01:00
Wolfgang Bumiller
301918529d
api-macro: more tuple refactoring
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:21:13 +01:00
Wolfgang Bumiller
75530cb68c
api-macro: object schema entry tuple -> struct
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:20:48 +01:00
Wolfgang Bumiller
de749b1a52
schema: ExtractValueDeserializer
...
A deserializer which takes an `&mut Value` and an object
schema reference and deserializes by extracting (removing)
the values from the references serde Value.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:20:05 +01:00
Wolfgang Bumiller
9d9231313d
api-macro: suport AllOf on structs
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:19:40 +01:00
Wolfgang Bumiller
357b3016d5
api-macro: add more standard Maybe methods
...
Note that any methods added there should be oriented around
`Option`.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:19:16 +01:00
Wolfgang Bumiller
6b5bf36989
api-macro: forbid flattened fields
...
They don't appear in the json data structure and therefore
should not be named separately in the schema. Structs with
flattened fields will become an `AllOf` schema instead.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:18:46 +01:00
Wolfgang Bumiller
fbc9be471b
api-macro: add 'flatten' to SerdeAttrib
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:18:08 +01:00
Wolfgang Bumiller
0cdd47c8fc
schema: allow AllOf schema as method parameter
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:17:47 +01:00
Wolfgang Bumiller
3f490368cf
schema: support AllOf schemas
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:03:37 +01:00
Wolfgang Bumiller
4916d5b10d
api-macro: support optional return values
...
The return specification can now include an `optional`
field.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:02:47 +01:00
Wolfgang Bumiller
e8998851f8
schema: support optional return values
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:02:17 +01:00
Wolfgang Bumiller
89a3dd5b1f
formatting fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-22 07:00:46 +01:00
Dominik Csapak
f9378cad13
tools/daemon: improve reload behaviour
...
it seems that sometimes, the child process signal gets handled
before the parent process signal. Systemd then ignores the
childs signal (finished reloading) and only after going into
reloading state because of the parent. this will never finish.
Instead, wait for the state to change to 'reloading' after sending
that signal in the parent, an only fork afterwards. This way
we ensure that systemd knows about the reloading before actually trying
to do it.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Fabian Ebner <f.ebner@proxmox.com>
2020-12-18 10:30:37 +01:00
Wolfgang Bumiller
4dec479d2c
update d/control
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-09 10:44:58 +01:00
Wolfgang Bumiller
8cc4c167ac
bump proxmox-api-macro to 0.2.4-1
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-09 10:43:49 +01:00
Wolfgang Bumiller
84d0859ddb
document forward_de/serialize_to_display/from_str
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-09 10:19:59 +01:00
Wolfgang Bumiller
4a0f06d084
doc fixup
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2020-12-09 10:18:58 +01:00