proxmox_api/generated/nodes/node/ceph/osd/osdid/
lv_info.rs1pub struct LvInfoClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> LvInfoClient<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, "/lv-info"),
13 }
14 }
15}
16impl<T> LvInfoClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Get OSD volume details"]
21 pub fn get(&self, params: GetParams) -> Result<GetOutput, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, ¶ms)
24 }
25}
26impl GetOutput {
27 pub fn new(
28 creation_time: String,
29 lv_name: String,
30 lv_path: String,
31 lv_size: u64,
32 lv_uuid: String,
33 vg_name: String,
34 ) -> Self {
35 Self {
36 creation_time,
37 lv_name,
38 lv_path,
39 lv_size,
40 lv_uuid,
41 vg_name,
42 additional_properties: Default::default(),
43 }
44 }
45}
46#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
47pub struct GetOutput {
48 #[doc = "Creation time as reported by `lvs`."]
49 pub creation_time: String,
50 #[doc = "Name of the logical volume (LV)."]
51 pub lv_name: String,
52 #[doc = "Path to the logical volume (LV)."]
53 pub lv_path: String,
54 #[serde(
55 serialize_with = "crate::types::serialize_int",
56 deserialize_with = "crate::types::deserialize_int"
57 )]
58 #[doc = "Size of the logical volume (LV)."]
59 pub lv_size: u64,
60 #[doc = "UUID of the logical volume (LV)."]
61 pub lv_uuid: String,
62 #[doc = "Name of the volume group (VG)."]
63 pub vg_name: String,
64 #[serde(
65 flatten,
66 default,
67 skip_serializing_if = "::std::collections::HashMap::is_empty"
68 )]
69 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
70}
71#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
72pub struct GetParams {
73 #[serde(rename = "type")]
74 #[serde(skip_serializing_if = "Option::is_none", default)]
75 #[doc = "OSD device type"]
76 pub ty: Option<Type>,
77 #[serde(
78 flatten,
79 default,
80 skip_serializing_if = "::std::collections::HashMap::is_empty"
81 )]
82 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
83}
84#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
85pub enum Type {
86 #[serde(rename = "block")]
87 Block,
88 #[serde(rename = "db")]
89 Db,
90 #[serde(rename = "wal")]
91 Wal,
92}
93impl Default for Type {
94 fn default() -> Self {
95 Self::Block
96 }
97}