proxmox_api/generated/nodes/node/
disks.rs1pub mod directory;
2pub mod initgpt;
3pub mod list;
4pub mod lvm;
5pub mod lvmthin;
6pub mod smart;
7pub mod wipedisk;
8pub mod zfs;
9pub struct DisksClient<T> {
10 client: T,
11 path: String,
12}
13impl<T> DisksClient<T>
14where
15 T: crate::client::Client,
16{
17 pub fn new(client: T, parent_path: &str) -> Self {
18 Self {
19 client,
20 path: format!("{}{}", parent_path, "/disks"),
21 }
22 }
23}
24impl<T> DisksClient<T>
25where
26 T: crate::client::Client,
27{
28 #[doc = "Node index."]
29 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
30 let path = self.path.to_string();
31 self.client.get(&path, &())
32 }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
35pub struct GetOutputItems {
36 #[serde(
37 flatten,
38 default,
39 skip_serializing_if = "::std::collections::HashMap::is_empty"
40 )]
41 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
42}
43impl<T> DisksClient<T>
44where
45 T: crate::client::Client,
46{
47 pub fn lvm(&self) -> lvm::LvmClient<T> {
48 lvm::LvmClient::<T>::new(self.client.clone(), &self.path)
49 }
50}
51impl<T> DisksClient<T>
52where
53 T: crate::client::Client,
54{
55 pub fn lvmthin(&self) -> lvmthin::LvmthinClient<T> {
56 lvmthin::LvmthinClient::<T>::new(self.client.clone(), &self.path)
57 }
58}
59impl<T> DisksClient<T>
60where
61 T: crate::client::Client,
62{
63 pub fn directory(&self) -> directory::DirectoryClient<T> {
64 directory::DirectoryClient::<T>::new(self.client.clone(), &self.path)
65 }
66}
67impl<T> DisksClient<T>
68where
69 T: crate::client::Client,
70{
71 pub fn zfs(&self) -> zfs::ZfsClient<T> {
72 zfs::ZfsClient::<T>::new(self.client.clone(), &self.path)
73 }
74}
75impl<T> DisksClient<T>
76where
77 T: crate::client::Client,
78{
79 pub fn list(&self) -> list::ListClient<T> {
80 list::ListClient::<T>::new(self.client.clone(), &self.path)
81 }
82}
83impl<T> DisksClient<T>
84where
85 T: crate::client::Client,
86{
87 pub fn smart(&self) -> smart::SmartClient<T> {
88 smart::SmartClient::<T>::new(self.client.clone(), &self.path)
89 }
90}
91impl<T> DisksClient<T>
92where
93 T: crate::client::Client,
94{
95 pub fn initgpt(&self) -> initgpt::InitgptClient<T> {
96 initgpt::InitgptClient::<T>::new(self.client.clone(), &self.path)
97 }
98}
99impl<T> DisksClient<T>
100where
101 T: crate::client::Client,
102{
103 pub fn wipedisk(&self) -> wipedisk::WipediskClient<T> {
104 wipedisk::WipediskClient::<T>::new(self.client.clone(), &self.path)
105 }
106}