]> git.proxmox.com Git - proxmox.git/log
proxmox.git
2 years agobuildsys: drop bullseye from *stable* branch upload target stable-1
Thomas Lamprecht [Tue, 20 Jul 2021 07:49:17 +0000 (09:49 +0200)]
buildsys: drop bullseye from *stable* branch upload target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump proxmox version to 0.11.6-1
Dietmar Maurer [Wed, 14 Jul 2021 10:36:44 +0000 (12:36 +0200)]
bump proxmox version to 0.11.6-1

2 years agomake_tmp_file: return File instead of Fd
Dietmar Maurer [Wed, 14 Jul 2021 10:26:24 +0000 (12:26 +0200)]
make_tmp_file: return File instead of Fd

2 years agoproxmox-http: bump version to 0.2.1
Fabian Grünbichler [Tue, 18 May 2021 08:31:26 +0000 (10:31 +0200)]
proxmox-http: bump version to 0.2.1

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agowebsocket: add note about compat removal
Fabian Grünbichler [Tue, 18 May 2021 07:23:37 +0000 (09:23 +0200)]
websocket: add note about compat removal

this major release still needs to have an incompatible, the next one can
drop setting a protocol client-side, and the one after that can remove
the protocol handling on the server side.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoproxmox-http/websocket: remove subprotocol handling
Dominik Csapak [Mon, 17 May 2021 13:11:01 +0000 (15:11 +0200)]
proxmox-http/websocket: remove subprotocol handling

we do not support websocket subprotocols, but for compatibility with
current clients (novnc, pve-xtermjs) we have to reply with the one requested,
else this is a protocol error and browsers will error out

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agoproxmox-http/websocket: remove code for 'text' frames
Dominik Csapak [Mon, 17 May 2021 13:11:00 +0000 (15:11 +0200)]
proxmox-http/websocket: remove code for 'text' frames

we never actually sent text frames, nor did any client request them.
Also, no validity check ever ocurred, so technically it was against
the spec.

Simply remove the code handling sending out text frames. If we need
to actually handle that, we can always create a 'WebSocketStringWriter'
or similar.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agorustfmt fixup
Wolfgang Bumiller [Mon, 17 May 2021 10:25:49 +0000 (12:25 +0200)]
rustfmt fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agodoc fixups
Wolfgang Bumiller [Mon, 17 May 2021 09:39:11 +0000 (11:39 +0200)]
doc fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump d/control
Wolfgang Bumiller [Mon, 17 May 2021 09:38:52 +0000 (11:38 +0200)]
bump d/control

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump proxmox-http to 0.2.0-1
Wolfgang Bumiller [Mon, 17 May 2021 09:16:46 +0000 (11:16 +0200)]
bump proxmox-http to 0.2.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoadd some more module level docs
Wolfgang Bumiller [Mon, 17 May 2021 09:25:38 +0000 (11:25 +0200)]
add some more module level docs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agouri: drop anyhow::Error and improve docs
Wolfgang Bumiller [Mon, 17 May 2021 09:21:17 +0000 (11:21 +0200)]
uri: drop anyhow::Error and improve docs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoreorganize crate
Wolfgang Bumiller [Mon, 17 May 2021 09:03:29 +0000 (11:03 +0200)]
reorganize crate

it's a 'http' utility crate
* the extra 'http' module is redundant
* the module name 'helpers' as a public path doesn't say
  much about what it does

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agoupdate proxmox/debian/control
Dietmar Maurer [Mon, 17 May 2021 08:21:54 +0000 (10:21 +0200)]
update proxmox/debian/control

2 years agobump proxmox version to 0.11.5-1
Dietmar Maurer [Mon, 17 May 2021 08:07:28 +0000 (10:07 +0200)]
bump proxmox version to 0.11.5-1

2 years agohttp: update d/control
Fabian Grünbichler [Fri, 14 May 2021 13:44:49 +0000 (15:44 +0200)]
http: update d/control

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: rustfmt
Fabian Grünbichler [Fri, 14 May 2021 13:44:48 +0000 (15:44 +0200)]
http: rustfmt

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: make clippy happy
Fabian Grünbichler [Fri, 14 May 2021 13:44:47 +0000 (15:44 +0200)]
http: make clippy happy

again.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover simple HTTP client from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:46 +0000 (15:44 +0200)]
http: takeover simple HTTP client from proxmox_backup

adapted to use already moved helpers/code.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover tools::http from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:45 +0000 (15:44 +0200)]
http: takeover tools::http from proxmox_backup

the parts that were not already moved.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover ProxyConfig from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:44 +0000 (15:44 +0200)]
http: takeover ProxyConfig from proxmox_backup

adapted to use moved build_authority helper.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover build_authority helper from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:43 +0000 (15:44 +0200)]
http: takeover build_authority helper from proxmox_backup

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover MaybeTlsStream from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:42 +0000 (15:44 +0200)]
http: takeover MaybeTlsStream from proxmox_backup

this is just a (rather HTTP specific) wrapper, so put it into a
'wrapper' module for now.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoproxmox: takeover socket helper from proxmox_backup
Fabian Grünbichler [Fri, 14 May 2021 13:44:41 +0000 (15:44 +0200)]
proxmox: takeover socket helper from proxmox_backup

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: make clippy happy
Fabian Grünbichler [Fri, 14 May 2021 13:44:40 +0000 (15:44 +0200)]
http: make clippy happy

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agohttp: takeover websocket feature from proxmox
Fabian Grünbichler [Fri, 14 May 2021 13:44:39 +0000 (15:44 +0200)]
http: takeover websocket feature from proxmox

adapted: use statements for proxmox::*, use statements for doctests

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agometa: add empty proxmox-http sub-crate
Fabian Grünbichler [Fri, 14 May 2021 13:44:38 +0000 (15:44 +0200)]
meta: add empty proxmox-http sub-crate

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoproxmox: add missing +router -> futures dep
Fabian Grünbichler [Fri, 14 May 2021 13:44:37 +0000 (15:44 +0200)]
proxmox: add missing +router -> futures dep

this is shadowed by the websocket feature being enabled by default.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agod/control: update deb-cargo generated file
Thomas Lamprecht [Fri, 14 May 2021 10:17:09 +0000 (12:17 +0200)]
d/control: update deb-cargo generated file

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox: bump version to 0.11.4-1
Thomas Lamprecht [Fri, 14 May 2021 10:11:48 +0000 (12:11 +0200)]
proxmox: bump version to 0.11.4-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: upload to both, buster and bullseye for now
Thomas Lamprecht [Fri, 14 May 2021 10:08:50 +0000 (12:08 +0200)]
buildsys: upload to both, buster and bullseye for now

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: update
Thomas Lamprecht [Fri, 14 May 2021 09:43:02 +0000 (11:43 +0200)]
d/control: update

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodrop bogus tests
Thomas Lamprecht [Fri, 14 May 2021 09:36:52 +0000 (11:36 +0200)]
drop bogus tests

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoproxmox/tools/email: adapt tests to changes to sendmail
Dominik Csapak [Fri, 14 May 2021 08:39:29 +0000 (10:39 +0200)]
proxmox/tools/email: adapt tests to changes to sendmail

with test1/3 we only tested the regex, which is now gone

transform the tests to valid emails, so we test this also
and rename them to know what they should test

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3302: allow for more characters for email
Dominik Csapak [Wed, 12 May 2021 14:20:16 +0000 (16:20 +0200)]
fix #3302: allow for more characters for email

by removing the regex check here, that is responsibility of the caller

this is ok since we pass the args directly and not via shell, so
command injection should not be possible

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoapi_type_macros.rs: disable failing doctest (set it to ignore instead of no_run)
Dietmar Maurer [Wed, 5 May 2021 06:03:35 +0000 (08:03 +0200)]
api_type_macros.rs: disable failing doctest (set it to ignore instead of no_run)

3 years agoapi_type_macros.rs: disable failing doctest
Dietmar Maurer [Wed, 5 May 2021 05:56:53 +0000 (07:56 +0200)]
api_type_macros.rs: disable failing doctest

3 years agobump proxmox version to 0.11.3-1
Dietmar Maurer [Wed, 5 May 2021 05:47:25 +0000 (07:47 +0200)]
bump proxmox version to 0.11.3-1

3 years agoadd api_string_type macro
Wolfgang Bumiller [Tue, 4 May 2021 12:41:14 +0000 (14:41 +0200)]
add api_string_type macro

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agosimplify const_regex macro
Wolfgang Bumiller [Tue, 4 May 2021 12:50:56 +0000 (14:50 +0200)]
simplify const_regex macro

The :vis macro matcher has been stable for a long time now.
Let's use it, and replace the recursion with a plus pattern.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox version to 0.11.2-1
Dietmar Maurer [Mon, 3 May 2021 06:06:12 +0000 (08:06 +0200)]
bump proxmox version to 0.11.2-1

3 years agoproxmox/api/cli: add extract_output_format
Dominik Csapak [Fri, 30 Apr 2021 12:51:55 +0000 (14:51 +0200)]
proxmox/api/cli: add extract_output_format

just getting it is not enough, sometimes we want it to remove from
params (if possble) too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
3 years agoproxmox: constify CreateOptions methods and add helpers
Wolfgang Bumiller [Wed, 21 Apr 2021 09:32:07 +0000 (11:32 +0200)]
proxmox: constify CreateOptions methods and add helpers

Adds convenience helpers `.owner_root()`.
Unfortunately for the group equivalent `nix` needs to have
const `Gid` constructors...

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agowebsocket: remove AsyncReadExt
Wolfgang Bumiller [Thu, 15 Apr 2021 11:14:55 +0000 (13:14 +0200)]
websocket: remove AsyncReadExt

style wise, bounds should refer to AsyncRead instead

also we don't actually use any of the Ext methods

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump proxmox to 0.11.1-1
Wolfgang Bumiller [Wed, 14 Apr 2021 10:04:35 +0000 (12:04 +0200)]
bump proxmox to 0.11.1-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agobump api-macro to 0.3.4-1
Wolfgang Bumiller [Wed, 14 Apr 2021 10:00:01 +0000 (12:00 +0200)]
bump api-macro to 0.3.4-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: fix Updatable path in generated derive attribute
Wolfgang Bumiller [Wed, 14 Apr 2021 09:58:32 +0000 (11:58 +0200)]
api-macro: fix Updatable path in generated derive attribute

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoadd proxmox::tools::serde::string_as_base64url_nopad
Wolfgang Bumiller [Wed, 14 Apr 2021 09:27:45 +0000 (11:27 +0200)]
add proxmox::tools::serde::string_as_base64url_nopad

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi: enable Updater for usize, isize, f32, f64, char
Wolfgang Bumiller [Wed, 7 Apr 2021 08:47:19 +0000 (10:47 +0200)]
api: enable Updater for usize, isize, f32, f64, char

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 years agoapi-macro: fix dev-dep versions
Wolfgang Bumiller [Wed, 24 Mar 2021 10:20:23 +0000 (11:20 +0100)]
api-macro: fix dev-dep versions

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
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>