proxmox_api/generated/cluster/ceph/
flags.rs1pub mod flag;
2pub struct FlagsClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> FlagsClient<T>
7where
8 T: crate::client::Client,
9{
10 pub fn new(client: T, parent_path: &str) -> Self {
11 Self {
12 client,
13 path: format!("{}{}", parent_path, "/flags"),
14 }
15 }
16}
17impl<T> FlagsClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "get the status of all ceph flags"]
22 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
23 let path = self.path.to_string();
24 self.client.get(&path, &())
25 }
26}
27impl<T> FlagsClient<T>
28where
29 T: crate::client::Client,
30{
31 #[doc = "Set/Unset multiple ceph flags at once."]
32 pub fn put(&self, params: PutParams) -> Result<String, T::Error> {
33 let path = self.path.to_string();
34 self.client.put(&path, ¶ms)
35 }
36}
37impl GetOutputItems {
38 pub fn new(description: String, name: Name, value: bool) -> Self {
39 Self {
40 description,
41 name,
42 value,
43 additional_properties: Default::default(),
44 }
45 }
46}
47#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
48pub struct GetOutputItems {
49 #[doc = "Flag description."]
50 pub description: String,
51 #[doc = "Flag name."]
52 pub name: Name,
53 #[serde(
54 serialize_with = "crate::types::serialize_bool",
55 deserialize_with = "crate::types::deserialize_bool"
56 )]
57 #[doc = "Flag value."]
58 pub value: bool,
59 #[serde(
60 flatten,
61 default,
62 skip_serializing_if = "::std::collections::HashMap::is_empty"
63 )]
64 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
65}
66#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
67pub struct PutParams {
68 #[serde(
69 serialize_with = "crate::types::serialize_bool_optional",
70 deserialize_with = "crate::types::deserialize_bool_optional"
71 )]
72 #[serde(skip_serializing_if = "Option::is_none", default)]
73 #[doc = "Backfilling of PGs is suspended."]
74 pub nobackfill: Option<bool>,
75 #[serde(rename = "nodeep-scrub")]
76 #[serde(
77 serialize_with = "crate::types::serialize_bool_optional",
78 deserialize_with = "crate::types::deserialize_bool_optional"
79 )]
80 #[serde(skip_serializing_if = "Option::is_none", default)]
81 #[doc = "Deep Scrubbing is disabled."]
82 pub nodeep_scrub: Option<bool>,
83 #[serde(
84 serialize_with = "crate::types::serialize_bool_optional",
85 deserialize_with = "crate::types::deserialize_bool_optional"
86 )]
87 #[serde(skip_serializing_if = "Option::is_none", default)]
88 #[doc = "OSD failure reports are being ignored, such that the monitors will not mark OSDs down."]
89 pub nodown: Option<bool>,
90 #[serde(
91 serialize_with = "crate::types::serialize_bool_optional",
92 deserialize_with = "crate::types::deserialize_bool_optional"
93 )]
94 #[serde(skip_serializing_if = "Option::is_none", default)]
95 #[doc = "OSDs that were previously marked out will not be marked back in when they start."]
96 pub noin: Option<bool>,
97 #[serde(
98 serialize_with = "crate::types::serialize_bool_optional",
99 deserialize_with = "crate::types::deserialize_bool_optional"
100 )]
101 #[serde(skip_serializing_if = "Option::is_none", default)]
102 #[doc = "OSDs will not automatically be marked out after the configured interval."]
103 pub noout: Option<bool>,
104 #[serde(
105 serialize_with = "crate::types::serialize_bool_optional",
106 deserialize_with = "crate::types::deserialize_bool_optional"
107 )]
108 #[serde(skip_serializing_if = "Option::is_none", default)]
109 #[doc = "Rebalancing of PGs is suspended."]
110 pub norebalance: Option<bool>,
111 #[serde(
112 serialize_with = "crate::types::serialize_bool_optional",
113 deserialize_with = "crate::types::deserialize_bool_optional"
114 )]
115 #[serde(skip_serializing_if = "Option::is_none", default)]
116 #[doc = "Recovery of PGs is suspended."]
117 pub norecover: Option<bool>,
118 #[serde(
119 serialize_with = "crate::types::serialize_bool_optional",
120 deserialize_with = "crate::types::deserialize_bool_optional"
121 )]
122 #[serde(skip_serializing_if = "Option::is_none", default)]
123 #[doc = "Scrubbing is disabled."]
124 pub noscrub: Option<bool>,
125 #[serde(
126 serialize_with = "crate::types::serialize_bool_optional",
127 deserialize_with = "crate::types::deserialize_bool_optional"
128 )]
129 #[serde(skip_serializing_if = "Option::is_none", default)]
130 #[doc = "Cache tiering activity is suspended."]
131 pub notieragent: Option<bool>,
132 #[serde(
133 serialize_with = "crate::types::serialize_bool_optional",
134 deserialize_with = "crate::types::deserialize_bool_optional"
135 )]
136 #[serde(skip_serializing_if = "Option::is_none", default)]
137 #[doc = "OSDs are not allowed to start."]
138 pub noup: Option<bool>,
139 #[serde(
140 serialize_with = "crate::types::serialize_bool_optional",
141 deserialize_with = "crate::types::deserialize_bool_optional"
142 )]
143 #[serde(skip_serializing_if = "Option::is_none", default)]
144 #[doc = "Pauses read and writes."]
145 pub pause: Option<bool>,
146 #[serde(
147 flatten,
148 default,
149 skip_serializing_if = "::std::collections::HashMap::is_empty"
150 )]
151 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
152}
153#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
154pub enum Name {
155 #[serde(rename = "nobackfill")]
156 Nobackfill,
157 #[serde(rename = "nodeep-scrub")]
158 NodeepScrub,
159 #[serde(rename = "nodown")]
160 Nodown,
161 #[serde(rename = "noin")]
162 Noin,
163 #[serde(rename = "noout")]
164 Noout,
165 #[serde(rename = "norebalance")]
166 Norebalance,
167 #[serde(rename = "norecover")]
168 Norecover,
169 #[serde(rename = "noscrub")]
170 Noscrub,
171 #[serde(rename = "notieragent")]
172 Notieragent,
173 #[serde(rename = "noup")]
174 Noup,
175 #[serde(rename = "pause")]
176 Pause,
177}
178impl<T> FlagsClient<T>
179where
180 T: crate::client::Client,
181{
182 pub fn flag(&self, flag: &str) -> flag::FlagClient<T> {
183 flag::FlagClient::<T>::new(self.client.clone(), &self.path, flag)
184 }
185}