]> git.proxmox.com Git - proxmox.git/log
proxmox.git
3 years agobump proxmox to 0.11.0
Wolfgang Bumiller [Thu, 25 Feb 2021 08:20:02 +0000 (09:20 +0100)]
bump proxmox to 0.11.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofmt
Wolfgang Bumiller [Thu, 25 Feb 2021 08:16:44 +0000 (09:16 +0100)]
fmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agouse Send+Sync on dyn ObjectSchemaType
Wolfgang Bumiller [Thu, 25 Feb 2021 08:16:38 +0000 (09:16 +0100)]
use Send+Sync on dyn ObjectSchemaType

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosupport AllOfSchemas in section_config
Wolfgang Bumiller [Wed, 24 Feb 2021 13:48:21 +0000 (14:48 +0100)]
support AllOfSchemas in section_config

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoget rid of associated type in ObjectSchemaType trait
Wolfgang Bumiller [Wed, 24 Feb 2021 13:43:15 +0000 (14:43 +0100)]
get rid of associated type in ObjectSchemaType trait

The AllOfProperties Iterator is capable of also being the
Iterator for the regular ObjectSchemas by simply filling it
like it was the "last" object type in an AllOf.

This makes the ObjectSchemaType trait more usable later.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoAllOfSchema support in parse_property_string
Wolfgang Bumiller [Wed, 24 Feb 2021 12:40:50 +0000 (13:40 +0100)]
AllOfSchema support in parse_property_string

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agofix AllOfSchema::lookup to allow nesting
Wolfgang Bumiller [Wed, 24 Feb 2021 12:34:06 +0000 (13:34 +0100)]
fix AllOfSchema::lookup to allow nesting

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox: bump api-macro dep to 0.3.3
Wolfgang Bumiller [Wed, 24 Feb 2021 08:38:32 +0000 (09:38 +0100)]
proxmox: bump api-macro dep to 0.3.3

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump api-macro to 0.3.3-1
Wolfgang Bumiller [Wed, 24 Feb 2021 08:37:02 +0000 (09:37 +0100)]
bump api-macro to 0.3.3-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoUpdater: take serde renames into account
Wolfgang Bumiller [Wed, 24 Feb 2021 08:21:52 +0000 (09:21 +0100)]
Updater: take serde renames into account

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox to 0.10.7
Wolfgang Bumiller [Tue, 23 Feb 2021 13:39:11 +0000 (14:39 +0100)]
bump proxmox to 0.10.7

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agorustfmt
Wolfgang Bumiller [Tue, 23 Feb 2021 13:35:12 +0000 (14:35 +0100)]
rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox::tools: rustfmt
Wolfgang Bumiller [Tue, 23 Feb 2021 13:34:48 +0000 (14:34 +0100)]
proxmox::tools: rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox::test: rustfmt
Wolfgang Bumiller [Tue, 23 Feb 2021 13:34:22 +0000 (14:34 +0100)]
proxmox::test: rustfmt

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoremove u2f example for now
Wolfgang Bumiller [Tue, 23 Feb 2021 13:33:46 +0000 (14:33 +0100)]
remove u2f example for now

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agominor cleanup
Wolfgang Bumiller [Tue, 23 Feb 2021 13:33:08 +0000 (14:33 +0100)]
minor cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox::test::io: properly forward flush
Wolfgang Bumiller [Tue, 23 Feb 2021 13:31:02 +0000 (14:31 +0100)]
proxmox::test::io: properly forward flush

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox: add sparse_copy(_async) to tools::io
Dominik Csapak [Wed, 17 Feb 2021 13:13:21 +0000 (14:13 +0100)]
proxmox: add sparse_copy(_async) to tools::io

this is able to seek the target instead of writing zeroes, which
generates sparse files where supported

also add tests for it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoproxmox: add test/{io, task} modules
Dominik Csapak [Wed, 17 Feb 2021 13:13:20 +0000 (14:13 +0100)]
proxmox: add test/{io, task} modules

contains:
* AsyncBlocking{Reader,Writer} for dummy async code
  by wrapping a 'standard reader/writer'
* poll_result_once for pulling a future once (copied from pxar)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agobump proxmox version to 0.10.6-1
Dietmar Maurer [Sun, 21 Feb 2021 14:47:32 +0000 (15:47 +0100)]
bump proxmox version to 0.10.6-1

3 years agomake get_property_string_type_text public
Dietmar Maurer [Sun, 21 Feb 2021 14:44:13 +0000 (15:44 +0100)]
make get_property_string_type_text public

We need that to generate nice docs.

3 years agobump proxmox version to 0.10.5
Dietmar Maurer [Thu, 11 Feb 2021 09:46:11 +0000 (10:46 +0100)]
bump proxmox version to 0.10.5

3 years agoimplement dump_section_config
Dietmar Maurer [Thu, 11 Feb 2021 09:44:04 +0000 (10:44 +0100)]
implement dump_section_config

3 years agorename dump_api_parameters to dump_properties
Dietmar Maurer [Thu, 11 Feb 2021 09:32:39 +0000 (10:32 +0100)]
rename dump_api_parameters to dump_properties

And do not dump object description automatically.

3 years agobump api-macro to 0.3.2-1
Wolfgang Bumiller [Thu, 11 Feb 2021 08:00:36 +0000 (09:00 +0100)]
bump api-macro to 0.3.2-1

This got lost in a rebase...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox to 0.10.4-1
Wolfgang Bumiller [Wed, 10 Feb 2021 09:18:13 +0000 (10:18 +0100)]
bump proxmox to 0.10.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump api-macro dependency to 0.3.2
Wolfgang Bumiller [Wed, 10 Feb 2021 09:17:28 +0000 (10:17 +0100)]
bump api-macro dependency to 0.3.2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox version to 0.10.3-1
Dietmar Maurer [Wed, 10 Feb 2021 09:13:32 +0000 (10:13 +0100)]
bump proxmox version to 0.10.3-1

3 years agoapi: implement schema doc generator for PropertyStrings
Dietmar Maurer [Wed, 10 Feb 2021 07:28:22 +0000 (08:28 +0100)]
api: implement schema doc generator for PropertyStrings

3 years agoSectionConifg: allow access to plugin properties
Dietmar Maurer [Tue, 9 Feb 2021 08:09:45 +0000 (09:09 +0100)]
SectionConifg: allow access to plugin properties

3 years agoapi: add type_text to StringSchema
Dietmar Maurer [Tue, 9 Feb 2021 08:06:39 +0000 (09:06 +0100)]
api: add type_text to StringSchema

3 years agoapi: improve reST formating
Dietmar Maurer [Tue, 9 Feb 2021 07:53:08 +0000 (08:53 +0100)]
api: improve reST formating

3 years agoapi: add dump_enum_properties(), make dump_api_parameter pub
Dietmar Maurer [Mon, 8 Feb 2021 08:13:55 +0000 (09:13 +0100)]
api: add dump_enum_properties(), make dump_api_parameter pub

3 years agobump proxmox to 0.10.2-1
Dietmar Maurer [Fri, 5 Feb 2021 11:31:13 +0000 (12:31 +0100)]
bump proxmox to 0.10.2-1

3 years agoCliCommandMap: add usage_skip_options to suppress options in generate_usage_str()
Dietmar Maurer [Fri, 5 Feb 2021 11:23:25 +0000 (12:23 +0100)]
CliCommandMap: add usage_skip_options to suppress options in generate_usage_str()

This is useful for commands where sub-commands all takes the same options.
You can supress them in the generated manual pages (printdoc), and instead
document them somewhere else.

3 years agoapi-macro: pull in 'extra-traits' feature from syn
Wolfgang Bumiller [Thu, 4 Feb 2021 12:11:34 +0000 (13:11 +0100)]
api-macro: pull in 'extra-traits' feature from syn

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocleanup: remove serde_derive dependency
Wolfgang Bumiller [Thu, 4 Feb 2021 10:43:21 +0000 (11:43 +0100)]
cleanup: remove serde_derive dependency

this comes from the 'derive' feature in serde

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoignore member crate target dirs as well
Fabian Grünbichler [Wed, 3 Feb 2021 10:18:00 +0000 (11:18 +0100)]
ignore member crate target dirs as well

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoapi-macro: let tests depend on api-macro
Wolfgang Bumiller [Wed, 3 Feb 2021 09:48:31 +0000 (10:48 +0100)]
api-macro: let tests depend on api-macro

the updater tests require both the trait and the proc macros
to be visible, running tests with `--all-features` prevents
them from being imported from two separate locations as
their names are the same, so let's always include the macro
versions in test cases by depending on the `api-macro`
feature in tests in the api-macro crate

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodoc fixup
Wolfgang Bumiller [Tue, 2 Feb 2021 13:34:24 +0000 (14:34 +0100)]
doc fixup

not sure if it's worth looking up that link?

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoformatting fixups
Wolfgang Bumiller [Tue, 2 Feb 2021 13:33:17 +0000 (14:33 +0100)]
formatting fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoupdaters: docs and exports
Wolfgang Bumiller [Tue, 2 Feb 2021 13:28:32 +0000 (14:28 +0100)]
updaters: docs and exports

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: introduce updaters
Wolfgang Bumiller [Tue, 2 Feb 2021 13:09:15 +0000 (14:09 +0100)]
api-macro: introduce updaters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: introduce Updatable and Updater traits
Wolfgang Bumiller [Tue, 2 Feb 2021 13:05:19 +0000 (14:05 +0100)]
schema: introduce Updatable and Updater traits

The `Updatable` trait is our mechanism for "updating"
values. The `Updater` trait is a serde-helper to allow using
`skip_serializing_if` on api type structs which
`#[derive(Updater)]`

All basic types implement `Updatable<Updater = Option<T>>`,
and all `Option<T>` where `T: Updatable` are implicitly also
updatable from `Option<T>`.

With the update to the `#[api]` macro, all `#[api]` types
will implicitly `#[derive(Updatable)]` via the default
implementation (which simply assignes from an
`Option<Self>`), unless they explicitly also
`#[derive(Updater)]` in which case an implementation is
derived which goes through each "field" found in the
updater. To prevent fields from being updatable via an
Updater `#[updater(fixed)]` can be used.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: fix AllOf property iteration for nested objects
Wolfgang Bumiller [Tue, 2 Feb 2021 13:05:02 +0000 (14:05 +0100)]
schema: fix AllOf property iteration for nested objects

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: support AllOf in ExtractValueDeserializer
Wolfgang Bumiller [Tue, 2 Feb 2021 13:03:04 +0000 (14:03 +0100)]
schema: support AllOf in ExtractValueDeserializer

fixes nested AllOfs in api methods

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox to 0.10.1-1
Dietmar Maurer [Wed, 3 Feb 2021 07:31:40 +0000 (08:31 +0100)]
bump proxmox to 0.10.1-1

3 years agocli: improve completion of array arguments
Dietmar Maurer [Wed, 3 Feb 2021 07:28:27 +0000 (08:28 +0100)]
cli: improve completion of array arguments

3 years agodebcargo: fix maintainer directive
Fabian Grünbichler [Mon, 1 Feb 2021 10:26:19 +0000 (11:26 +0100)]
debcargo: fix maintainer directive

and remove accidentally committed files

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy: use std::ptr::null
Fabian Grünbichler [Wed, 20 Jan 2021 10:39:45 +0000 (11:39 +0100)]
clippy: use std::ptr::null

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoclippy fixups
Wolfgang Bumiller [Fri, 15 Jan 2021 13:20:55 +0000 (14:20 +0100)]
clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox to 0.10.0-1
Fabian Grünbichler [Thu, 14 Jan 2021 14:43:19 +0000 (15:43 +0100)]
bump proxmox to 0.10.0-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump proxmox-api-macro to 0.3.1-1
Fabian Grünbichler [Thu, 14 Jan 2021 14:42:54 +0000 (15:42 +0100)]
bump proxmox-api-macro to 0.3.1-1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobuild: add autopkgtest target
Fabian Grünbichler [Thu, 14 Jan 2021 13:23:45 +0000 (14:23 +0100)]
build: add autopkgtest target

which runs the autopkgtests on the built packages.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomove ParameterSchema from router to schema
Fabian Grünbichler [Wed, 13 Jan 2021 10:30:29 +0000 (11:30 +0100)]
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>
3 years agofix u2f example
Wolfgang Bumiller [Wed, 13 Jan 2021 10:29:33 +0000 (11:29 +0100)]
fix u2f example

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotokio 1.0: drop TimeoutFutureExt
Fabian Grünbichler [Mon, 11 Jan 2021 10:25:32 +0000 (11:25 +0100)]
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>
3 years agoupdate to tokio 1.0
Fabian Grünbichler [Thu, 3 Dec 2020 10:35:31 +0000 (11:35 +0100)]
update to tokio 1.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoupdate to rustyline 7
Fabian Grünbichler [Thu, 3 Dec 2020 10:35:25 +0000 (11:35 +0100)]
update to rustyline 7

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agoCargo.toml: update to tokio 1.0
Fabian Grünbichler [Thu, 3 Dec 2020 10:34:56 +0000 (11:34 +0100)]
Cargo.toml: update to tokio 1.0

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agomacro: refactoring
Wolfgang Bumiller [Tue, 5 Jan 2021 12:49:32 +0000 (13:49 +0100)]
macro: refactoring

purely non-functional changes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agotime: fix parsing non-full-hour TZ offsets
Fabian Grünbichler [Wed, 30 Dec 2020 10:27:41 +0000 (11:27 +0100)]
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>
3 years agoupdate control files, fix changelogs
Dietmar Maurer [Tue, 22 Dec 2020 12:29:09 +0000 (13:29 +0100)]
update control files, fix changelogs

3 years agoupdate proxmox to 0.9.1-1
Dietmar Maurer [Tue, 22 Dec 2020 12:25:56 +0000 (13:25 +0100)]
update proxmox to 0.9.1-1

3 years agoadd tools::future with TimeoutFutureExt
Stefan Reiter [Mon, 21 Dec 2020 13:56:10 +0000 (14:56 +0100)]
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>
3 years agoproxmox: correctly depend on proxmox-api-macro 0.3
Dietmar Maurer [Tue, 22 Dec 2020 07:06:02 +0000 (08:06 +0100)]
proxmox: correctly depend on proxmox-api-macro 0.3

3 years agobump versions to 0.9.0-1/0.3.0-1
Dietmar Maurer [Tue, 22 Dec 2020 06:54:32 +0000 (07:54 +0100)]
bump versions to 0.9.0-1/0.3.0-1

3 years agoproxmox changelog update
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:06 +0000 (12:26 +0100)]
proxmox changelog update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoproxmox: temporary d/changelog update
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:04 +0000 (12:26 +0100)]
proxmox: temporary d/changelog update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomacro: temporary d/changelog update
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:05 +0000 (12:26 +0100)]
macro: temporary d/changelog update

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: ParameterSchema at 'api' level
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:03 +0000 (12:26 +0100)]
schema: ParameterSchema at 'api' level

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: support flattened parameters
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:02 +0000 (12:26 +0100)]
api-macro: support flattened parameters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: factor parameter extraction into a function
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:01 +0000 (12:26 +0100)]
api-macro: factor parameter extraction into a function

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: more tuple refactoring
Wolfgang Bumiller [Fri, 18 Dec 2020 11:26:00 +0000 (12:26 +0100)]
api-macro: more tuple refactoring

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: object schema entry tuple -> struct
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:59 +0000 (12:25 +0100)]
api-macro: object schema entry tuple -> struct

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: ExtractValueDeserializer
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:58 +0000 (12:25 +0100)]
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>
3 years agoapi-macro: suport AllOf on structs
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:57 +0000 (12:25 +0100)]
api-macro: suport AllOf on structs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: add more standard Maybe methods
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:56 +0000 (12:25 +0100)]
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>
3 years agoapi-macro: forbid flattened fields
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:55 +0000 (12:25 +0100)]
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>
3 years agoapi-macro: add 'flatten' to SerdeAttrib
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:54 +0000 (12:25 +0100)]
api-macro: add 'flatten' to SerdeAttrib

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: allow AllOf schema as method parameter
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:53 +0000 (12:25 +0100)]
schema: allow AllOf schema as method parameter

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: support AllOf schemas
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:52 +0000 (12:25 +0100)]
schema: support AllOf schemas

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: support optional return values
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:51 +0000 (12:25 +0100)]
api-macro: support optional return values

The return specification can now include an `optional`
field.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoschema: support optional return values
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:50 +0000 (12:25 +0100)]
schema: support optional return values

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoformatting fixup
Wolfgang Bumiller [Fri, 18 Dec 2020 11:25:49 +0000 (12:25 +0100)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoupdate d/control
Wolfgang Bumiller [Wed, 9 Dec 2020 09:44:58 +0000 (10:44 +0100)]
update d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox-api-macro to 0.2.4-1
Wolfgang Bumiller [Wed, 9 Dec 2020 09:43:49 +0000 (10:43 +0100)]
bump proxmox-api-macro to 0.2.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodocument forward_de/serialize_to_display/from_str
Wolfgang Bumiller [Wed, 9 Dec 2020 09:19:17 +0000 (10:19 +0100)]
document forward_de/serialize_to_display/from_str

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agodoc fixup
Wolfgang Bumiller [Wed, 9 Dec 2020 09:18:58 +0000 (10:18 +0100)]
doc fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: lower a whole bunch of errors
Wolfgang Bumiller [Mon, 7 Dec 2020 14:33:34 +0000 (15:33 +0100)]
api-macro: lower a whole bunch of errors

to be non fatal for better error messages, this way the user
will see the compile error, but we still generate all the
code & schema variables so that one error isn't accompanied
by all the ones resulting from not having the generated code
there at all.

Eg.

    error: description not allowed on external type
       --> src/api2/access/user.rs:472:22
        |
    472 |         description: "Get API token metadata (with config digest).",
        |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Was previously also accompanied by

    error[E0425]: cannot find value `API_METHOD_READ_TOKEN` in this scope
       --> src/api2/access/user.rs:774:11
        |
    699 | pub fn delete_token(
        | ------ similarly named constant `API_METHOD_DELETE_TOKEN` defined here
    ...
    774 |     .get(&API_METHOD_READ_TOKEN)
        |           ^^^^^^^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `API_METHOD_DELETE_TOKEN`

The second error was "wrong" and came much later, needlessly
filling the screen if this happened on multiple functions.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: forbid description on incompatible schemas
Wolfgang Bumiller [Mon, 7 Dec 2020 11:34:29 +0000 (12:34 +0100)]
api-macro: forbid description on incompatible schemas

References to external schemas (or types) already include
the description in the external schema and therefore are
illegal.

The implementation consists of multiple parts:

* Introduce a `Maybe` type which can be `Explicit`,
  `Derived` or `None`.
* Forbid `Explicit` descriptions on references.
* Instead of bailing out on such errors which causes all of
  the generated code to vanish and create heaps of
  additional nonsensical errors, add a way to *add* errors
  without bailing out immediately via the `error!()` macro.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agocorrect email in changelog
Hannes Laimer [Mon, 7 Dec 2020 09:58:05 +0000 (10:58 +0100)]
correct email in changelog

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
3 years agobump proxmox version to 0.8.1-1
Dietmar Maurer [Sun, 6 Dec 2020 08:08:41 +0000 (09:08 +0100)]
bump proxmox version to 0.8.1-1

3 years agotrait ReadExt: add read_exact_or_eof and skip_to_end
Dietmar Maurer [Sun, 6 Dec 2020 08:05:26 +0000 (09:05 +0100)]
trait ReadExt: add read_exact_or_eof and skip_to_end

3 years agoproxmox: fix example array in Cargo.toml
Wolfgang Bumiller [Thu, 3 Dec 2020 08:58:02 +0000 (09:58 +0100)]
proxmox: fix example array in Cargo.toml

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobuild: track d/control in git
Fabian Grünbichler [Mon, 30 Nov 2020 14:08:05 +0000 (15:08 +0100)]
build: track d/control in git

and check build-dependencies before building..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
3 years agobump proxmox to 0.8.0
Wolfgang Bumiller [Mon, 30 Nov 2020 10:18:57 +0000 (11:18 +0100)]
bump proxmox to 0.8.0

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agominor clippy lints
Wolfgang Bumiller [Mon, 30 Nov 2020 10:18:37 +0000 (11:18 +0100)]
minor clippy lints

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agointroduce FdRef and BorrowedFd
Wolfgang Bumiller [Mon, 30 Nov 2020 09:00:20 +0000 (10:00 +0100)]
introduce FdRef and BorrowedFd

Types used to reprecent borrowed raw file descriptors.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agomake_tmp_file: properly guard file descriptor
Wolfgang Bumiller [Mon, 30 Nov 2020 08:41:47 +0000 (09:41 +0100)]
make_tmp_file: properly guard file descriptor

and return an Fd

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>