1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*
* Proxmox Virtual Environment API
*
* Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
*
* The version of the OpenAPI document: 9.x
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterSdnAddFabricRequest {
/// OSPF area. Either a IPv4 address or a 32-bit number. Gets validated in rust.
#[serde(rename = "area", skip_serializing_if = "Option::is_none")]
pub area: Option<String>,
/// The csnp_interval property for Openfabric
#[serde(rename = "csnp_interval", skip_serializing_if = "Option::is_none")]
pub csnp_interval: Option<f64>,
/// Prevent changes if current configuration file has a different digest. This can be used to prevent concurrent modifications.
#[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
pub digest: Option<String>,
/// The hello_interval property for Openfabric
#[serde(rename = "hello_interval", skip_serializing_if = "Option::is_none")]
pub hello_interval: Option<f64>,
/// Identifier for SDN fabrics
#[serde(rename = "id")]
pub id: String,
/// The IP prefix for Node IPs
#[serde(rename = "ip6_prefix", skip_serializing_if = "Option::is_none")]
pub ip6_prefix: Option<String>,
/// The IP prefix for Node IPs
#[serde(rename = "ip_prefix", skip_serializing_if = "Option::is_none")]
pub ip_prefix: Option<String>,
/// the token for unlocking the global SDN configuration
#[serde(rename = "lock-token", skip_serializing_if = "Option::is_none")]
pub lock_token: Option<String>,
/// A seconds interval, between 1 and 65535 inclusive, of how often to send an authenticated empty packet to the peer for the purpose of keeping a stateful firewall or NAT mapping valid persistently. For example, if the interface very rarely sends traffic, but it might at anytime receive traffic from another node, and it is behind NAT, the interface might benefit from having a persistent keepalive interval of 25 seconds. If unset or set to 0, it is turned off
#[serde(rename = "persistent_keepalive", skip_serializing_if = "Option::is_none")]
pub persistent_keepalive: Option<f64>,
/// Type of configuration entry in an SDN Fabric section config
#[serde(rename = "protocol")]
pub protocol: models::PveProtocolEnum,
#[serde(rename = "redistribute")]
pub redistribute: Vec<serde_json::Value>,
/// A prefix list that should be used for filtering routes that are to be installed into the kernel routing table
#[serde(rename = "route_filter", skip_serializing_if = "Option::is_none")]
pub route_filter: Option<String>,
}
impl ClusterSdnAddFabricRequest {
pub fn new(id: String, protocol: models::PveProtocolEnum, redistribute: Vec<serde_json::Value>) -> ClusterSdnAddFabricRequest {
ClusterSdnAddFabricRequest {
area: None,
csnp_interval: None,
digest: None,
hello_interval: None,
id,
ip6_prefix: None,
ip_prefix: None,
lock_token: None,
persistent_keepalive: None,
protocol,
redistribute,
route_filter: None,
}
}
}