proxmox_api/generated/nodes/node/
startall.rs1#[derive(Debug, Clone)]
2pub struct StartallClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> StartallClient<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, "/startall"),
14 }
15 }
16}
17impl<T> StartallClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Start all VMs and containers located on this node (by default only those with onboot=1)."]
22 #[doc = ""]
23 #[doc = "The 'VM.PowerMgmt' permission is required on '/' or on '/vms/\\<ID\\>' for each ID passed via the 'vms' parameter."]
24 pub async fn post(&self, params: PostParams) -> Result<String, T::Error> {
25 let path = self.path.to_string();
26 self.client.post(&path, ¶ms).await
27 }
28}
29#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
30pub struct PostParams {
31 #[serde(
32 serialize_with = "crate::types::serialize_bool_optional",
33 deserialize_with = "crate::types::deserialize_bool_optional"
34 )]
35 #[serde(skip_serializing_if = "Option::is_none", default)]
36 #[doc = "Issue start command even if virtual guest have 'onboot' not set or set to off."]
37 #[doc = ""]
38 pub force: Option<bool>,
39 #[serde(skip_serializing_if = "Option::is_none", default)]
40 #[doc = "Only consider guests from this comma separated list of VMIDs."]
41 #[doc = ""]
42 pub vms: Option<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}