remove unused descriptions from api macros
these are now a hard error in the api macro Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
5d90860688
commit
9b93c62044
|
@ -249,10 +249,7 @@ pub fn create_user(password: Option<String>, param: Value) -> Result<(), Error>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: user::User },
|
||||||
description: "The user configuration (with config digest).",
|
|
||||||
type: user::User,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Or(&[
|
permission: &Permission::Or(&[
|
||||||
&Permission::Privilege(&["access", "users"], PRIV_SYS_AUDIT, false),
|
&Permission::Privilege(&["access", "users"], PRIV_SYS_AUDIT, false),
|
||||||
|
@ -468,10 +465,7 @@ pub fn delete_user(userid: Userid, digest: Option<String>) -> Result<(), Error>
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: user::ApiToken },
|
||||||
description: "Get API token metadata (with config digest).",
|
|
||||||
type: user::ApiToken,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Or(&[
|
permission: &Permission::Or(&[
|
||||||
&Permission::Privilege(&["access", "users"], PRIV_SYS_AUDIT, false),
|
&Permission::Privilege(&["access", "users"], PRIV_SYS_AUDIT, false),
|
||||||
|
|
|
@ -975,10 +975,7 @@ pub fn garbage_collection_status(
|
||||||
returns: {
|
returns: {
|
||||||
description: "List the accessible datastores.",
|
description: "List the accessible datastores.",
|
||||||
type: Array,
|
type: Array,
|
||||||
items: {
|
items: { type: DataStoreListItem },
|
||||||
description: "Datastore name and description.",
|
|
||||||
type: DataStoreListItem,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Anybody,
|
permission: &Permission::Anybody,
|
||||||
|
|
|
@ -151,10 +151,7 @@ pub fn create_datastore(param: Value) -> Result<(), Error> {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: datastore::DataStoreConfig },
|
||||||
description: "The datastore configuration (with config digest).",
|
|
||||||
type: datastore::DataStoreConfig,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_AUDIT, false),
|
permission: &Permission::Privilege(&["datastore", "{name}"], PRIV_DATASTORE_AUDIT, false),
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,10 +19,7 @@ use crate::config::acl::{PRIV_REMOTE_AUDIT, PRIV_REMOTE_MODIFY};
|
||||||
returns: {
|
returns: {
|
||||||
description: "The list of configured remotes (with config digest).",
|
description: "The list of configured remotes (with config digest).",
|
||||||
type: Array,
|
type: Array,
|
||||||
items: {
|
items: { type: remote::Remote },
|
||||||
type: remote::Remote,
|
|
||||||
description: "Remote configuration (without password).",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
access: {
|
access: {
|
||||||
description: "List configured remotes filtered by Remote.Audit privileges",
|
description: "List configured remotes filtered by Remote.Audit privileges",
|
||||||
|
@ -124,10 +121,7 @@ pub fn create_remote(password: String, param: Value) -> Result<(), Error> {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: remote::Remote },
|
||||||
description: "The remote configuration (with config digest).",
|
|
||||||
type: remote::Remote,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["remote", "{name}"], PRIV_REMOTE_AUDIT, false),
|
permission: &Permission::Privilege(&["remote", "{name}"], PRIV_REMOTE_AUDIT, false),
|
||||||
}
|
}
|
||||||
|
@ -347,10 +341,7 @@ pub async fn remote_client(remote: remote::Remote) -> Result<HttpClient, Error>
|
||||||
returns: {
|
returns: {
|
||||||
description: "List the accessible datastores.",
|
description: "List the accessible datastores.",
|
||||||
type: Array,
|
type: Array,
|
||||||
items: {
|
items: { type: DataStoreListItem },
|
||||||
description: "Datastore name and description.",
|
|
||||||
type: DataStoreListItem,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
)]
|
)]
|
||||||
/// List datastores of a remote.cfg entry
|
/// List datastores of a remote.cfg entry
|
||||||
|
|
|
@ -182,10 +182,7 @@ pub fn create_sync_job(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: sync::SyncJobConfig },
|
||||||
description: "The sync job configuration.",
|
|
||||||
type: sync::SyncJobConfig,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
description: "Limited to sync job entries where user has Datastore.Audit on target datastore, and Remote.Audit on source remote.",
|
description: "Limited to sync job entries where user has Datastore.Audit on target datastore, and Remote.Audit on source remote.",
|
||||||
permission: &Permission::Anybody,
|
permission: &Permission::Anybody,
|
||||||
|
|
|
@ -127,10 +127,7 @@ pub fn create_verification_job(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: verify::VerificationJobConfig },
|
||||||
description: "The verification job configuration.",
|
|
||||||
type: verify::VerificationJobConfig,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Anybody,
|
permission: &Permission::Anybody,
|
||||||
description: "Requires Datastore.Audit or Datastore.Verify on job's datastore.",
|
description: "Requires Datastore.Audit or Datastore.Verify on job's datastore.",
|
||||||
|
|
|
@ -102,10 +102,7 @@ pub fn list_network_devices(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: Interface },
|
||||||
description: "The network interface configuration (with config digest).",
|
|
||||||
type: Interface,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Privilege(&["system", "network", "interfaces", "{name}"], PRIV_SYS_AUDIT, false),
|
permission: &Permission::Privilege(&["system", "network", "interfaces", "{name}"], PRIV_SYS_AUDIT, false),
|
||||||
},
|
},
|
||||||
|
@ -135,7 +132,6 @@ pub fn read_interface(iface: String) -> Result<Value, Error> {
|
||||||
schema: NETWORK_INTERFACE_NAME_SCHEMA,
|
schema: NETWORK_INTERFACE_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
description: "Interface type.",
|
|
||||||
type: NetworkInterfaceType,
|
type: NetworkInterfaceType,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
@ -388,7 +384,6 @@ pub enum DeletableProperty {
|
||||||
schema: NETWORK_INTERFACE_NAME_SCHEMA,
|
schema: NETWORK_INTERFACE_NAME_SCHEMA,
|
||||||
},
|
},
|
||||||
"type": {
|
"type": {
|
||||||
description: "Interface type. If specified, need to match the current type.",
|
|
||||||
type: NetworkInterfaceType,
|
type: NetworkInterfaceType,
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,10 +73,7 @@ pub fn check_subscription(
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
returns: {
|
returns: { type: SubscriptionInfo },
|
||||||
description: "Subscription status.",
|
|
||||||
type: SubscriptionInfo,
|
|
||||||
},
|
|
||||||
access: {
|
access: {
|
||||||
permission: &Permission::Anybody,
|
permission: &Permission::Anybody,
|
||||||
},
|
},
|
||||||
|
|
|
@ -166,7 +166,6 @@ fn check_task_access(auth_id: &Authid, upid: &UPID) -> Result<(), Error> {
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: Userid,
|
type: Userid,
|
||||||
description: "The user who started the task.",
|
|
||||||
},
|
},
|
||||||
tokenid: {
|
tokenid: {
|
||||||
type: Tokenname,
|
type: Tokenname,
|
||||||
|
|
|
@ -372,7 +372,6 @@ fn create_master_key() -> Result<(), Error> {
|
||||||
},
|
},
|
||||||
"output-format": {
|
"output-format": {
|
||||||
type: PaperkeyFormat,
|
type: PaperkeyFormat,
|
||||||
description: "Output format. Text or Html.",
|
|
||||||
optional: true,
|
optional: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue