Skip to main content

clientapi_pve/models/
cluster_ha_update_resources_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ClusterHaUpdateResourcesRequest {
16
17    /// HA resource may be migrated during automatic rebalancing
18    #[serde(rename = "auto-rebalance", skip_serializing_if = "Option::is_none")]
19    pub auto_rebalance: Option<models::PveBoolean>,
20
21    /// Description.
22    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
23    pub comment: Option<String>,
24
25    /// A list of settings you want to delete.
26    #[serde(rename = "delete", skip_serializing_if = "Option::is_none")]
27    pub delete: Option<String>,
28
29    /// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
30    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
31    pub digest: Option<String>,
32
33    /// Automatically migrate HA resource to the node with the highest priority according to their node affinity  rules, if a node with a higher priority than the current node comes online.
34    #[serde(rename = "failback", skip_serializing_if = "Option::is_none")]
35    pub failback: Option<models::PveBoolean>,
36
37    /// The HA group identifier.
38    #[serde(rename = "group", skip_serializing_if = "Option::is_none")]
39    pub group: Option<String>,
40
41    /// Maximal number of resource relocate tries when a resource fails to start.
42    #[serde(rename = "max_relocate", skip_serializing_if = "Option::is_none")]
43    pub max_relocate: Option<i64>,
44
45    /// Maximal number of tries to restart the resource on a node after its start failed. When reached, the HA manager will try to relocate the resource to an eligible node.
46    #[serde(rename = "max_restart", skip_serializing_if = "Option::is_none")]
47    pub max_restart: Option<i64>,
48
49    /// Requested resource state. The CRM reads this state and acts accordingly. Please note that `enabled` is just an alias for `started`.  `started`;;  The CRM tries to start the resource. Service state is set to `started` after successful start. On node failures, or when start fails, it tries to recover the resource.  If everything fails, service state it set to `error`.  `stopped`;;  The CRM tries to keep the resource in `stopped` state, but it still tries to relocate the resources on node failures.  `disabled`;;  The CRM tries to put the resource in `stopped` state, but does not try to relocate the resources on node failures. The main purpose of this state is error recovery, because it is the only way to move a resource out of the `error` state.  `ignored`;;  The resource gets removed from the manager status and so the CRM and the LRM do not touch the resource anymore. All {pve} API calls affecting this resource will be executed, directly bypassing the HA stack. CRM commands will be thrown away while the resource is in this state. The resource will not get relocated on node failures.  
50    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
51    pub state: Option<models::PveStateEnum>,
52
53
54}
55
56impl ClusterHaUpdateResourcesRequest {
57    pub fn new() -> ClusterHaUpdateResourcesRequest {
58        ClusterHaUpdateResourcesRequest {
59            
60            auto_rebalance: None,
61            
62            comment: None,
63            
64            delete: None,
65            
66            digest: None,
67            
68            failback: None,
69            
70            group: None,
71            
72            max_relocate: None,
73            
74            max_restart: None,
75            
76            state: None,
77            
78        }
79    }
80}
81
82