proxmox_api/generated/nodes/node/
ceph.rs1pub mod cfg;
2pub mod cmd_safety;
3pub mod crush;
4pub mod fs;
5pub mod init;
6pub mod log;
7pub mod mds;
8pub mod mgr;
9pub mod mon;
10pub mod osd;
11pub mod pool;
12pub mod restart;
13pub mod rules;
14pub mod start;
15pub mod status;
16pub mod stop;
17#[derive(Debug, Clone)]
18pub struct CephClient<T> {
19 client: T,
20 path: String,
21}
22impl<T> CephClient<T>
23where
24 T: crate::client::Client,
25{
26 pub fn new(client: T, parent_path: &str) -> Self {
27 Self {
28 client,
29 path: format!("{}{}", parent_path, "/ceph"),
30 }
31 }
32}
33impl<T> CephClient<T>
34where
35 T: crate::client::Client,
36{
37 #[doc = "Directory index."]
38 #[doc = ""]
39 #[doc = "Permission check: perm(\"/\", [\"Sys.Audit\", \"Datastore.Audit\"], any)"]
40 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
41 let path = self.path.to_string();
42 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
43 Ok(optional_vec.unwrap_or_default())
44 }
45}
46#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
47pub struct GetOutputItems {
48 #[serde(
49 flatten,
50 default,
51 skip_serializing_if = "::std::collections::HashMap::is_empty"
52 )]
53 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
54}
55impl<T> CephClient<T>
56where
57 T: crate::client::Client,
58{
59 pub fn cfg(&self) -> cfg::CfgClient<T> {
60 cfg::CfgClient::<T>::new(self.client.clone(), &self.path)
61 }
62}
63impl<T> CephClient<T>
64where
65 T: crate::client::Client,
66{
67 pub fn osd(&self) -> osd::OsdClient<T> {
68 osd::OsdClient::<T>::new(self.client.clone(), &self.path)
69 }
70}
71impl<T> CephClient<T>
72where
73 T: crate::client::Client,
74{
75 pub fn mds(&self) -> mds::MdsClient<T> {
76 mds::MdsClient::<T>::new(self.client.clone(), &self.path)
77 }
78}
79impl<T> CephClient<T>
80where
81 T: crate::client::Client,
82{
83 pub fn mgr(&self) -> mgr::MgrClient<T> {
84 mgr::MgrClient::<T>::new(self.client.clone(), &self.path)
85 }
86}
87impl<T> CephClient<T>
88where
89 T: crate::client::Client,
90{
91 pub fn mon(&self) -> mon::MonClient<T> {
92 mon::MonClient::<T>::new(self.client.clone(), &self.path)
93 }
94}
95impl<T> CephClient<T>
96where
97 T: crate::client::Client,
98{
99 pub fn fs(&self) -> fs::FsClient<T> {
100 fs::FsClient::<T>::new(self.client.clone(), &self.path)
101 }
102}
103impl<T> CephClient<T>
104where
105 T: crate::client::Client,
106{
107 pub fn pool(&self) -> pool::PoolClient<T> {
108 pool::PoolClient::<T>::new(self.client.clone(), &self.path)
109 }
110}
111impl<T> CephClient<T>
112where
113 T: crate::client::Client,
114{
115 pub fn init(&self) -> init::InitClient<T> {
116 init::InitClient::<T>::new(self.client.clone(), &self.path)
117 }
118}
119impl<T> CephClient<T>
120where
121 T: crate::client::Client,
122{
123 pub fn stop(&self) -> stop::StopClient<T> {
124 stop::StopClient::<T>::new(self.client.clone(), &self.path)
125 }
126}
127impl<T> CephClient<T>
128where
129 T: crate::client::Client,
130{
131 pub fn start(&self) -> start::StartClient<T> {
132 start::StartClient::<T>::new(self.client.clone(), &self.path)
133 }
134}
135impl<T> CephClient<T>
136where
137 T: crate::client::Client,
138{
139 pub fn restart(&self) -> restart::RestartClient<T> {
140 restart::RestartClient::<T>::new(self.client.clone(), &self.path)
141 }
142}
143impl<T> CephClient<T>
144where
145 T: crate::client::Client,
146{
147 pub fn status(&self) -> status::StatusClient<T> {
148 status::StatusClient::<T>::new(self.client.clone(), &self.path)
149 }
150}
151impl<T> CephClient<T>
152where
153 T: crate::client::Client,
154{
155 pub fn crush(&self) -> crush::CrushClient<T> {
156 crush::CrushClient::<T>::new(self.client.clone(), &self.path)
157 }
158}
159impl<T> CephClient<T>
160where
161 T: crate::client::Client,
162{
163 pub fn log(&self) -> log::LogClient<T> {
164 log::LogClient::<T>::new(self.client.clone(), &self.path)
165 }
166}
167impl<T> CephClient<T>
168where
169 T: crate::client::Client,
170{
171 pub fn rules(&self) -> rules::RulesClient<T> {
172 rules::RulesClient::<T>::new(self.client.clone(), &self.path)
173 }
174}
175impl<T> CephClient<T>
176where
177 T: crate::client::Client,
178{
179 pub fn cmd_safety(&self) -> cmd_safety::CmdSafetyClient<T> {
180 cmd_safety::CmdSafetyClient::<T>::new(self.client.clone(), &self.path)
181 }
182}