proxmox_api/generated/nodes/node/ceph/
init.rs

1pub struct InitClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> InitClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}{}", parent_path, "/init"),
13        }
14    }
15}
16impl<T> InitClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Create initial ceph default configuration and setup symlinks."]
21    pub fn post(&self, params: PostParams) -> Result<(), T::Error> {
22        let path = self.path.to_string();
23        self.client.post(&path, &params)
24    }
25}
26#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
27pub struct PostParams {
28    #[serde(rename = "cluster-network")]
29    #[serde(skip_serializing_if = "Option::is_none", default)]
30    #[doc = "Declare a separate cluster network, OSDs will routeheartbeat, object replication and recovery traffic over it"]
31    pub cluster_network: Option<String>,
32    #[serde(
33        serialize_with = "crate::types::serialize_bool_optional",
34        deserialize_with = "crate::types::deserialize_bool_optional"
35    )]
36    #[serde(skip_serializing_if = "Option::is_none", default)]
37    #[doc = "Disable cephx authentication.\n\nWARNING: cephx is a security feature protecting against man-in-the-middle attacks. Only consider disabling cephx if your network is private!"]
38    pub disable_cephx: Option<bool>,
39    #[serde(
40        serialize_with = "crate::types::serialize_int_optional",
41        deserialize_with = "crate::types::deserialize_int_optional"
42    )]
43    #[serde(skip_serializing_if = "Option::is_none", default)]
44    #[doc = "Minimum number of available replicas per object to allow I/O"]
45    pub min_size: Option<u64>,
46    #[serde(skip_serializing_if = "Option::is_none", default)]
47    #[doc = "Use specific network for all ceph related traffic"]
48    pub network: Option<String>,
49    #[serde(
50        serialize_with = "crate::types::serialize_int_optional",
51        deserialize_with = "crate::types::deserialize_int_optional"
52    )]
53    #[serde(skip_serializing_if = "Option::is_none", default)]
54    #[doc = "Placement group bits, used to specify the default number of placement groups.\n\nDepreacted. This setting was deprecated in recent Ceph versions."]
55    pub pg_bits: Option<u64>,
56    #[serde(
57        serialize_with = "crate::types::serialize_int_optional",
58        deserialize_with = "crate::types::deserialize_int_optional"
59    )]
60    #[serde(skip_serializing_if = "Option::is_none", default)]
61    #[doc = "Targeted number of replicas per object"]
62    pub size: Option<u64>,
63    #[serde(
64        flatten,
65        default,
66        skip_serializing_if = "::std::collections::HashMap::is_empty"
67    )]
68    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
69}