mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 22:58:59 +00:00
rust fmt for pbs src
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
50fa7bad49
commit
b635dc3ee1
@ -1,17 +1,16 @@
|
|||||||
use std::borrow::Cow;
|
|
||||||
use anyhow::{bail, Error};
|
use anyhow::{bail, Error};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use proxmox_schema::{api, ApiStringFormat, const_regex, Schema, StringSchema};
|
use proxmox_schema::{api, const_regex, ApiStringFormat, Schema, StringSchema};
|
||||||
|
|
||||||
const_regex!{
|
const_regex! {
|
||||||
pub MAINTENANCE_MESSAGE_REGEX = r"^[[:^cntrl:]]*$";
|
pub MAINTENANCE_MESSAGE_REGEX = r"^[[:^cntrl:]]*$";
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const MAINTENANCE_MESSAGE_FORMAT: ApiStringFormat =
|
pub const MAINTENANCE_MESSAGE_FORMAT: ApiStringFormat =
|
||||||
ApiStringFormat::Pattern(&MAINTENANCE_MESSAGE_REGEX);
|
ApiStringFormat::Pattern(&MAINTENANCE_MESSAGE_REGEX);
|
||||||
|
|
||||||
|
|
||||||
pub const MAINTENANCE_MESSAGE_SCHEMA: Schema =
|
pub const MAINTENANCE_MESSAGE_SCHEMA: Schema =
|
||||||
StringSchema::new("Message describing the reason for the maintenance.")
|
StringSchema::new("Message describing the reason for the maintenance.")
|
||||||
.format(&MAINTENANCE_MESSAGE_FORMAT)
|
.format(&MAINTENANCE_MESSAGE_FORMAT)
|
||||||
@ -27,7 +26,7 @@ pub enum Operation {
|
|||||||
|
|
||||||
#[api]
|
#[api]
|
||||||
#[derive(Deserialize, Serialize, PartialEq)]
|
#[derive(Deserialize, Serialize, PartialEq)]
|
||||||
#[serde(rename_all="kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
/// Maintenance type.
|
/// Maintenance type.
|
||||||
pub enum MaintenanceType {
|
pub enum MaintenanceType {
|
||||||
/// Only read operations are allowed on the datastore.
|
/// Only read operations are allowed on the datastore.
|
||||||
|
Loading…
Reference in New Issue
Block a user