proxmox_api/generated/nodes/node/ceph/mds/
name.rs1#[derive(Debug, Clone)]
2pub struct NameClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> NameClient<T>
7where
8 T: crate::client::Client,
9{
10 pub fn new(client: T, parent_path: &str, name: &str) -> Self {
11 Self {
12 client,
13 path: format!("{}/{}", parent_path, name),
14 }
15 }
16}
17impl<T> NameClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Destroy Ceph Metadata Server"]
22 #[doc = ""]
23 #[doc = "Permission check: perm(\"/\", [\"Sys.Modify\"])"]
24 pub async fn delete(&self) -> Result<String, T::Error> {
25 let path = self.path.to_string();
26 self.client.delete(&path, &()).await
27 }
28}
29impl<T> NameClient<T>
30where
31 T: crate::client::Client,
32{
33 #[doc = "Create Ceph Metadata Server (MDS)"]
34 #[doc = ""]
35 #[doc = "Permission check: perm(\"/\", [\"Sys.Modify\"])"]
36 pub async fn post(&self, params: PostParams) -> Result<String, T::Error> {
37 let path = self.path.to_string();
38 self.client.post(&path, ¶ms).await
39 }
40}
41#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
42pub struct PostParams {
43 #[serde(
44 serialize_with = "crate::types::serialize_bool_optional",
45 deserialize_with = "crate::types::deserialize_bool_optional"
46 )]
47 #[serde(skip_serializing_if = "Option::is_none", default)]
48 #[doc = "Determines whether a ceph-mds daemon should poll and replay the log of an active MDS. Faster switch on MDS failure, but needs more idle resources."]
49 #[doc = ""]
50 pub hotstandby: Option<bool>,
51 #[serde(
52 flatten,
53 default,
54 skip_serializing_if = "::std::collections::HashMap::is_empty"
55 )]
56 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
57}