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

1pub struct IscsiClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> IscsiClient<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, "/iscsi"),
13        }
14    }
15}
16impl<T> IscsiClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Scan remote iSCSI server."]
21    pub fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &params)
24    }
25}
26impl GetOutputItems {
27    pub fn new(portal: String, target: String) -> Self {
28        Self {
29            portal,
30            target,
31            additional_properties: Default::default(),
32        }
33    }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37    #[doc = "The iSCSI portal name."]
38    pub portal: String,
39    #[doc = "The iSCSI target name."]
40    pub target: String,
41    #[serde(
42        flatten,
43        default,
44        skip_serializing_if = "::std::collections::HashMap::is_empty"
45    )]
46    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
47}
48impl GetParams {
49    pub fn new(portal: String) -> Self {
50        Self {
51            portal,
52            additional_properties: Default::default(),
53        }
54    }
55}
56#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
57pub struct GetParams {
58    #[doc = "The iSCSI portal (IP or DNS name with optional port)."]
59    pub portal: String,
60    #[serde(
61        flatten,
62        default,
63        skip_serializing_if = "::std::collections::HashMap::is_empty"
64    )]
65    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
66}