proxmox_api/generated/nodes/node/ceph/mds/
name.rs1pub struct NameClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> NameClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str, name: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}/{}", parent_path, name),
13 }
14 }
15}
16impl<T> NameClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Destroy Ceph Metadata Server"]
21 pub fn delete(&self) -> Result<String, T::Error> {
22 let path = self.path.to_string();
23 self.client.delete(&path, &())
24 }
25}
26impl<T> NameClient<T>
27where
28 T: crate::client::Client,
29{
30 #[doc = "Create Ceph Metadata Server (MDS)"]
31 pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
32 let path = self.path.to_string();
33 self.client.post(&path, ¶ms)
34 }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
37pub struct PostParams {
38 #[serde(skip_serializing_if = "Option::is_none", default)]
39 #[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."]
40 pub hotstandby: Option<()>,
41 #[serde(
42 flatten,
43 default,
44 skip_serializing_if = "::std::collections::HashMap::is_empty"
45 )]
46 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
47}