Skip to main content

proxmox_api/generated/nodes/node/scan/
zfs.rs

1#[derive(Debug, Clone)]
2pub struct ZfsClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> ZfsClient<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, "/zfs"),
14        }
15    }
16}
17impl<T> ZfsClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "Scan zfs pool list on local node."]
22    #[doc = ""]
23    #[doc = "Permission check: perm(\"/storage\", [\"Datastore.Allocate\"])"]
24    pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
27        Ok(optional_vec.unwrap_or_default())
28    }
29}
30impl GetOutputItems {
31    pub fn new(pool: String) -> Self {
32        Self {
33            pool,
34            additional_properties: ::std::default::Default::default(),
35        }
36    }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
39pub struct GetOutputItems {
40    #[doc = "ZFS pool name."]
41    #[doc = ""]
42    pub pool: String,
43    #[serde(
44        flatten,
45        default,
46        skip_serializing_if = "::std::collections::HashMap::is_empty"
47    )]
48    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
49}