node config cleanups

This commit is contained in:
Dietmar Maurer
2021-05-04 09:15:57 +02:00
parent 79b902d512
commit 426847e1ce
2 changed files with 15 additions and 20 deletions

View File

@ -5,7 +5,7 @@ use std::path::Path;
use anyhow::{bail, format_err, Error};
use serde::{Deserialize, Serialize};
use proxmox::api::{api, schema::Schema};
use proxmox::api::{api, schema::{Schema, StringSchema, ApiStringFormat}};
use proxmox::sys::error::SysError;
use proxmox::tools::fs::CreateOptions;
@ -78,6 +78,11 @@ pub struct AcmeDomain {
pub plugin: Option<String>,
}
pub const ACME_DOMAIN_PROPERTY_SCHEMA: Schema = StringSchema::new(
"ACME domain configuration string")
.format(&ApiStringFormat::PropertyString(&AcmeDomain::API_SCHEMA))
.schema();
#[api(
properties: {
name: { type: String },