]> git.proxmox.com Git - proxmox.git/log
proxmox.git
4 years agodeprecate file_set_contents{,_full}
Wolfgang Bumiller [Wed, 18 Dec 2019 09:46:28 +0000 (10:46 +0100)]
deprecate file_set_contents{,_full}

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: replace_file, make options not an option...
Wolfgang Bumiller [Wed, 18 Dec 2019 09:04:21 +0000 (10:04 +0100)]
tools: replace_file, make options not an option...

CreateOptions::new() creates an all-None option set anyway

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agotools: introduce replace_file
Wolfgang Bumiller [Wed, 18 Dec 2019 09:00:54 +0000 (10:00 +0100)]
tools: introduce replace_file

nicer api with CreateOptions
see doc-comments for more info

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agodrop derive-builder dependency
Wolfgang Bumiller [Wed, 18 Dec 2019 09:00:30 +0000 (10:00 +0100)]
drop derive-builder dependency

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoremove old router macro documentation
Wolfgang Bumiller [Wed, 18 Dec 2019 08:40:40 +0000 (09:40 +0100)]
remove old router macro documentation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: remove now-unnecessary PropertySchema type
Wolfgang Bumiller [Mon, 16 Dec 2019 12:06:57 +0000 (13:06 +0100)]
api-macro: remove now-unnecessary PropertySchema type

Schemas can now generally refer to an externally defined
schema.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: generalized '{ schema: PATH }' schemas
Wolfgang Bumiller [Mon, 16 Dec 2019 11:11:52 +0000 (12:11 +0100)]
api-macro: generalized '{ schema: PATH }' schemas

allow 'schema: PATH' outside object property context

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: support 'async fn' with new async api method
Wolfgang Bumiller [Mon, 16 Dec 2019 10:13:26 +0000 (11:13 +0100)]
api-macro: support 'async fn' with new async api method

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoimplement ApiHandler::Async
Dietmar Maurer [Mon, 16 Dec 2019 08:53:25 +0000 (09:53 +0100)]
implement ApiHandler::Async

4 years agoapi: update url crate to 2.1
Wolfgang Bumiller [Fri, 13 Dec 2019 10:30:06 +0000 (11:30 +0100)]
api: update url crate to 2.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdate bytes to 0.5
Wolfgang Bumiller [Thu, 12 Dec 2019 14:35:36 +0000 (15:35 +0100)]
update bytes to 0.5

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoformatting fixup
Wolfgang Bumiller [Thu, 12 Dec 2019 14:35:30 +0000 (15:35 +0100)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoupdates for hyper 0.13 release
Wolfgang Bumiller [Thu, 12 Dec 2019 12:06:40 +0000 (13:06 +0100)]
updates for hyper 0.13 release

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoproxmox-api/src/cli.rs: simplify cli setup using generics.
Dietmar Maurer [Mon, 9 Dec 2019 16:38:18 +0000 (17:38 +0100)]
proxmox-api/src/cli.rs: simplify cli setup using generics.

4 years agoproxmox-api/src/cli/format.rs - generate_nested_usage: fix formating with empty prefix
Dietmar Maurer [Fri, 6 Dec 2019 09:13:12 +0000 (10:13 +0100)]
proxmox-api/src/cli/format.rs - generate_nested_usage: fix formating with empty prefix

4 years agoapi: add 'router' and 'cli' features
Wolfgang Bumiller [Thu, 5 Dec 2019 12:36:05 +0000 (13:36 +0100)]
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>
4 years agoapi: use http::{Parts,Response,Method}
Wolfgang Bumiller [Thu, 5 Dec 2019 12:18:19 +0000 (13:18 +0100)]
api: use http::{Parts,Response,Method}

hyper just reexports them

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agomore clippy fixups
Wolfgang Bumiller [Thu, 5 Dec 2019 11:28:05 +0000 (12:28 +0100)]
more clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoclippy fixups
Wolfgang Bumiller [Thu, 5 Dec 2019 10:35:33 +0000 (11:35 +0100)]
clippy fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoformatting fixup
Wolfgang Bumiller [Thu, 5 Dec 2019 10:33:12 +0000 (11:33 +0100)]
formatting fixup

please run `make` to check formatting before committing

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoformatting fixup
Wolfgang Bumiller [Thu, 5 Dec 2019 10:32:48 +0000 (11:32 +0100)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: allow methods without return types
Wolfgang Bumiller [Wed, 4 Dec 2019 13:27:57 +0000 (14:27 +0100)]
api-macro: allow methods without return types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: don't return Null without return schema
Wolfgang Bumiller [Wed, 4 Dec 2019 13:24:32 +0000 (14:24 +0100)]
api-macro: don't return Null without return schema

serde_json turns () into Null anyway, so there's no need to
check this!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: get enum description from doc comments
Wolfgang Bumiller [Wed, 4 Dec 2019 10:52:03 +0000 (11:52 +0100)]
api-macro: get enum description from doc comments

instead of:
    #[api(description: "Some description.")]
    pub enum { ... }

support:
    #[api]
    /// Some description.
    pub enum { ... }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: move doc-comment reading to util
Wolfgang Bumiller [Wed, 4 Dec 2019 10:47:27 +0000 (11:47 +0100)]
api-macro: move doc-comment reading to util

The function attribute reader doesn't read any other
attributes anymore, so make it reusable!

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi: let ConstRegexPattern deref to Regex
Wolfgang Bumiller [Wed, 4 Dec 2019 10:06:00 +0000 (11:06 +0100)]
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>
4 years agoapi-macro: rename SimpleIdent to FieldName
Wolfgang Bumiller [Wed, 4 Dec 2019 08:06:31 +0000 (09:06 +0100)]
api-macro: rename SimpleIdent to FieldName

Initially it was a wrapper around Ident to avoid some
copies, but now it's what we use to allow hyphenated names
for fields in objects (as `syn::Ident` doesn't allow that at
all), so give it a more fitting name.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: support hyphenated parameter names
Wolfgang Bumiller [Tue, 3 Dec 2019 12:34:37 +0000 (13:34 +0100)]
api-macro: support hyphenated parameter names

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: drop ToTokens for SimpleIdent
Wolfgang Bumiller [Tue, 3 Dec 2019 10:58:35 +0000 (11:58 +0100)]
api-macro: drop ToTokens for SimpleIdent

The user must be explicit about whether the ident or string
is required.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: drop Deref of SimpleIdent
Wolfgang Bumiller [Tue, 3 Dec 2019 10:57:01 +0000 (11:57 +0100)]
api-macro: drop Deref of SimpleIdent

The user must always be explicit about whether the Ident or
the String is required, since they may differ.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: fixup idents in SimpleIdent
Wolfgang Bumiller [Tue, 3 Dec 2019 10:56:27 +0000 (11:56 +0100)]
api-macro: fixup idents in SimpleIdent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: remove Into<Ident> for SimpleIdent
Wolfgang Bumiller [Tue, 3 Dec 2019 10:55:14 +0000 (11:55 +0100)]
api-macro: remove Into<Ident> for SimpleIdent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: allow referencing external schemas in properties
Wolfgang Bumiller [Tue, 3 Dec 2019 10:11:46 +0000 (11:11 +0100)]
api-macro: allow referencing external schemas in properties

Reference a predefined BACKUP_ARCHIVE_NAME StringSchema like
this:
    #[api(
        input: {
            properties: {
                archive: {
                    optional: true,
                    schema: BACKUP_ARCHIVE_NAME,
                },
            }
        }
    )]
    fn get_archive(archive: String) -> Result<(), Error> {
        ...
    }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoproxmox_api/src/format.rs - get_property_description: fix paragraph indention
Dietmar Maurer [Tue, 3 Dec 2019 06:55:53 +0000 (07:55 +0100)]
proxmox_api/src/format.rs - get_property_description: fix paragraph indention

4 years agoproxmox-api/src/format.rs: improve docs
Dietmar Maurer [Mon, 2 Dec 2019 19:06:14 +0000 (20:06 +0100)]
proxmox-api/src/format.rs: improve docs

4 years agoproxmox-api/src/format.rs: add missing docs
Dietmar Maurer [Mon, 2 Dec 2019 18:50:04 +0000 (19:50 +0100)]
proxmox-api/src/format.rs: add missing docs

4 years agoproxmox-api/src/cli/shellword.rs: re-export Quote from rustyline
Dietmar Maurer [Mon, 2 Dec 2019 18:29:47 +0000 (19:29 +0100)]
proxmox-api/src/cli/shellword.rs: re-export Quote from rustyline

4 years agoproxmox-api/src/cli/completion.rs: add more tests
Dietmar Maurer [Mon, 2 Dec 2019 16:34:11 +0000 (17:34 +0100)]
proxmox-api/src/cli/completion.rs: add more tests

4 years agoproxmox-api/src/cli/completion.rs: add help completion tests
Dietmar Maurer [Mon, 2 Dec 2019 15:42:59 +0000 (16:42 +0100)]
proxmox-api/src/cli/completion.rs: add help completion tests

4 years agoproxmox_api: add cli submodule (copied from proxmox-backup)
Dietmar Maurer [Mon, 2 Dec 2019 10:49:04 +0000 (11:49 +0100)]
proxmox_api: add cli submodule (copied from proxmox-backup)

4 years agoapi-macro: allow inferring some types automatically
Wolfgang Bumiller [Mon, 2 Dec 2019 10:45:37 +0000 (11:45 +0100)]
api-macro: allow inferring some types automatically

non-optional boolean, string and integer types can be
inferred from the function

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: test optional value invocation
Wolfgang Bumiller [Mon, 2 Dec 2019 10:12:34 +0000 (11:12 +0100)]
api-macro: test optional value invocation

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: allow skipping `input` schema
Wolfgang Bumiller [Mon, 2 Dec 2019 10:00:04 +0000 (11:00 +0100)]
api-macro: allow skipping `input` schema

when there are no parameters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: add test with no parameters
Wolfgang Bumiller [Mon, 2 Dec 2019 09:55:28 +0000 (10:55 +0100)]
api-macro: add test with no parameters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: allow 'bool' and rust int types
Wolfgang Bumiller [Mon, 2 Dec 2019 09:54:57 +0000 (10:54 +0100)]
api-macro: allow 'bool' and rust int types

in place of Boolean and Integer

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: make return schema optional
Wolfgang Bumiller [Mon, 2 Dec 2019 09:38:33 +0000 (10:38 +0100)]
api-macro: make return schema optional

and support returning () from methods

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoproxmox-api: fix text_wrap() - use join instead of concat (separate by newlines)
Dietmar Maurer [Sun, 1 Dec 2019 11:29:26 +0000 (12:29 +0100)]
proxmox-api: fix text_wrap() - use join instead of concat (separate by newlines)

4 years agoapi-macro: some more test code
Wolfgang Bumiller [Thu, 28 Nov 2019 12:49:14 +0000 (13:49 +0100)]
api-macro: some more test code

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: fixup
Wolfgang Bumiller [Thu, 28 Nov 2019 12:47:42 +0000 (13:47 +0100)]
api-macro: fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: cleanup
Wolfgang Bumiller [Thu, 28 Nov 2019 12:43:25 +0000 (13:43 +0100)]
api-macro: cleanup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: parse serde(rename) on enums
Wolfgang Bumiller [Thu, 28 Nov 2019 12:42:46 +0000 (13:42 +0100)]
api-macro: parse serde(rename) on enums

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: experimental enum support
Wolfgang Bumiller [Thu, 28 Nov 2019 11:21:46 +0000 (12:21 +0100)]
api-macro: experimental enum support

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: support defining schemas for structs
Wolfgang Bumiller [Thu, 28 Nov 2019 10:15:37 +0000 (11:15 +0100)]
api-macro: support defining schemas for structs

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: support external types
Wolfgang Bumiller [Thu, 28 Nov 2019 09:42:34 +0000 (10:42 +0100)]
api-macro: support external types

See the test example:

assuming a `pub struct Foo` which implements `Serialize` and
`Deserialize`, we also expect it to provide a
`pub const Foo::API_SCHEMA: &Schema` like so:

    #[derive(Deserialize, Serialize)]
    pub struct StrongString(String);
    impl StrongString {
        pub const API_SCHEMA: &'static Schema =
            &StringSchema::new("Some generic string")
                .format(&ApiStringFormat::Enum(&["a", "b"]))
                .schema();
    }

Then we can use:

    #[api(
        input: {
            properties: {
                arg: { type: StrongString },
            }
        },
        ...
    )]
    fn my_api_func(arg: StrongString) -> Result<...> {
        ...
    }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: tests: remove #![allow(dead_code)]
Wolfgang Bumiller [Thu, 28 Nov 2019 08:29:45 +0000 (09:29 +0100)]
api-macro: tests: remove #![allow(dead_code)]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: match the item type early
Wolfgang Bumiller [Thu, 28 Nov 2019 08:16:34 +0000 (09:16 +0100)]
api-macro: match the item type early

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: move method handling to api/method.rs
Wolfgang Bumiller [Thu, 28 Nov 2019 08:13:32 +0000 (09:13 +0100)]
api-macro: move method handling to api/method.rs

We may want to add the ability to declare a Schema for
structs, so factorize function handling into its own file.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: update tests, cleanup some macro generated paths
Wolfgang Bumiller [Wed, 27 Nov 2019 13:46:20 +0000 (14:46 +0100)]
api-macro: update tests, cleanup some macro generated paths

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: convert function output to a json value
Wolfgang Bumiller [Wed, 27 Nov 2019 13:44:16 +0000 (14:44 +0100)]
api-macro: convert function output to a json value

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: minor improvements
Wolfgang Bumiller [Wed, 27 Nov 2019 13:41:51 +0000 (14:41 +0100)]
api-macro: minor improvements

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: reduce code output a little
Wolfgang Bumiller [Wed, 27 Nov 2019 13:04:14 +0000 (14:04 +0100)]
api-macro: reduce code output a little

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: start actually extracting parameters
Wolfgang Bumiller [Wed, 27 Nov 2019 12:57:08 +0000 (13:57 +0100)]
api-macro: start actually extracting parameters

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: begin and explain the parameter mapping strategy
Wolfgang Bumiller [Wed, 27 Nov 2019 11:29:50 +0000 (12:29 +0100)]
api-macro: begin and explain the parameter mapping strategy

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: start looking at function parameter types
Wolfgang Bumiller [Wed, 27 Nov 2019 10:31:40 +0000 (11:31 +0100)]
api-macro: start looking at function parameter types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: start checking some function signature parts
Wolfgang Bumiller [Wed, 27 Nov 2019 10:04:36 +0000 (11:04 +0100)]
api-macro: start checking some function signature parts

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: parse properties as attributes to #[api]
Wolfgang Bumiller [Wed, 27 Nov 2019 10:01:40 +0000 (11:01 +0100)]
api-macro: parse properties as attributes to #[api]

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-amcro: expose JSONObject::parse_inner as Parser
Wolfgang Bumiller [Wed, 27 Nov 2019 10:01:12 +0000 (11:01 +0100)]
api-amcro: expose JSONObject::parse_inner as Parser

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: JSONValue to bool shortcut
Wolfgang Bumiller [Wed, 27 Nov 2019 09:59:37 +0000 (10:59 +0100)]
api-macro: JSONValue to bool shortcut

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: factor out inner parser of JSONObject
Wolfgang Bumiller [Wed, 27 Nov 2019 09:48:00 +0000 (10:48 +0100)]
api-macro: factor out inner parser of JSONObject

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: test: add 'protected' attribute
Wolfgang Bumiller [Wed, 27 Nov 2019 09:06:15 +0000 (10:06 +0100)]
api-macro: test: add 'protected' attribute

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agosortable-macro: fixup handle_error
Wolfgang Bumiller [Tue, 26 Nov 2019 13:20:29 +0000 (14:20 +0100)]
sortable-macro: fixup handle_error

Error cases need to include the original code in order for
the compiler to properly show the problematic code pointed
to by the Spans used in the compile_error!() output macro.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: refactoring: split api macro function
Wolfgang Bumiller [Tue, 26 Nov 2019 13:18:25 +0000 (14:18 +0100)]
api-macro: refactoring: split api macro function

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: move json part to util module
Wolfgang Bumiller [Tue, 26 Nov 2019 13:07:47 +0000 (14:07 +0100)]
api-macro: move json part to util module

The json value type is more of an intermediate step between
the TokenStream and the Schema type and should stay somewhat
independent of it. We may want to reuse it for the router?

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: remove old unused files
Wolfgang Bumiller [Tue, 26 Nov 2019 13:04:44 +0000 (14:04 +0100)]
api-macro: remove old unused files

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: fix section iteration
Wolfgang Bumiller [Tue, 26 Nov 2019 12:39:56 +0000 (13:39 +0100)]
api-macro: fix section iteration

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: understand a 'Returns:' section in function doc comments
Wolfgang Bumiller [Tue, 26 Nov 2019 12:39:20 +0000 (13:39 +0100)]
api-macro: understand a 'Returns:' section in function doc comments

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: correctly concatenate doc macros
Wolfgang Bumiller [Tue, 26 Nov 2019 12:34:41 +0000 (13:34 +0100)]
api-macro: correctly concatenate doc macros

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: make type optional in some cases
Wolfgang Bumiller [Tue, 26 Nov 2019 12:27:53 +0000 (13:27 +0100)]
api-macro: make type optional in some cases

Objects and arrays are now optionally identified by their
'properties' or 'items' property if their 'type' is left
out.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: trim doc-comment when used as description
Wolfgang Bumiller [Tue, 26 Nov 2019 11:17:40 +0000 (12:17 +0100)]
api-macro: trim doc-comment when used as description

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi-macro: rename elements to properties
Wolfgang Bumiller [Tue, 26 Nov 2019 11:16:05 +0000 (12:16 +0100)]
api-macro: rename elements to properties

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoreplace builder-pattern api macro parser with json
Wolfgang Bumiller [Mon, 25 Nov 2019 14:07:26 +0000 (15:07 +0100)]
replace builder-pattern api macro parser with json

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agorun 'cargo fmt -- --check' in check target
Wolfgang Bumiller [Mon, 25 Nov 2019 14:08:45 +0000 (15:08 +0100)]
run 'cargo fmt -- --check' in check target

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoformatting fixup
Wolfgang Bumiller [Mon, 25 Nov 2019 14:07:18 +0000 (15:07 +0100)]
formatting fixup

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoproxmox_api: improve ApiStringFormat docs
Dietmar Maurer [Sun, 24 Nov 2019 09:34:59 +0000 (10:34 +0100)]
proxmox_api: improve ApiStringFormat docs

4 years agoproxmox-api: rename ApiStringFormat::Complex into ApiStringFormat::PropertyString
Dietmar Maurer [Sun, 24 Nov 2019 08:51:45 +0000 (09:51 +0100)]
proxmox-api: rename ApiStringFormat::Complex into ApiStringFormat::PropertyString

4 years agoproxmox-api: improve schema docs
Dietmar Maurer [Sat, 23 Nov 2019 16:00:36 +0000 (17:00 +0100)]
proxmox-api: improve schema docs

4 years agoproxmox-api: improve schema docs
Dietmar Maurer [Sat, 23 Nov 2019 14:55:18 +0000 (15:55 +0100)]
proxmox-api: improve schema docs

4 years agoproxmox-api: further doc improvements
Dietmar Maurer [Sat, 23 Nov 2019 13:13:14 +0000 (14:13 +0100)]
proxmox-api: further doc improvements

4 years agoproxmox-api: improve router docs
Dietmar Maurer [Sat, 23 Nov 2019 13:08:44 +0000 (14:08 +0100)]
proxmox-api: improve router docs

4 years agoproxmox-api - improve Router docs
Dietmar Maurer [Sat, 23 Nov 2019 10:51:16 +0000 (11:51 +0100)]
proxmox-api - improve Router docs

4 years agoproxmox-api: move impl ApiMethod to lib.rs
Dietmar Maurer [Sat, 23 Nov 2019 09:58:32 +0000 (10:58 +0100)]
proxmox-api: move impl ApiMethod to lib.rs

4 years agoconst_regex: fixup for previous commit
Dietmar Maurer [Sat, 23 Nov 2019 09:48:36 +0000 (10:48 +0100)]
const_regex: fixup for previous commit

4 years agoproxmox-api: further cleanups
Dietmar Maurer [Sat, 23 Nov 2019 09:42:17 +0000 (10:42 +0100)]
proxmox-api: further cleanups

- improve docs
- move  ConstRegexPattern to const_regex.rs

4 years agoproxmox-api/src/lib.rs: hide modules with inlined docs
Dietmar Maurer [Sat, 23 Nov 2019 08:53:18 +0000 (09:53 +0100)]
proxmox-api/src/lib.rs: hide modules with inlined docs

4 years agoproxmox_api - ApiHandler: rename Async into AsyncHttp
Dietmar Maurer [Sat, 23 Nov 2019 07:54:07 +0000 (08:54 +0100)]
proxmox_api - ApiHandler: rename Async into AsyncHttp

And improve docs.

4 years agoimport a first draft of api macros
Wolfgang Bumiller [Fri, 22 Nov 2019 08:54:29 +0000 (09:54 +0100)]
import a first draft of api macros

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi: simplify ApiAsyncHandlerFn
Dietmar Maurer [Fri, 22 Nov 2019 11:48:36 +0000 (12:48 +0100)]
api: simplify ApiAsyncHandlerFn

4 years agoapi: add format module
Wolfgang Bumiller [Fri, 22 Nov 2019 08:28:22 +0000 (09:28 +0100)]
api: add format module

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoapi: fully qualify types in exported macros
Wolfgang Bumiller [Thu, 21 Nov 2019 13:00:25 +0000 (14:00 +0100)]
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>
4 years agoapi: move ApiMethod from router to top level
Wolfgang Bumiller [Thu, 21 Nov 2019 12:43:10 +0000 (13:43 +0100)]
api: move ApiMethod from router to top level

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