podman_rest_client/v5/models/
topology.rs

1use serde::{Deserialize, Serialize};
2#[derive(Default, Debug, Serialize, Deserialize)]
3/// Topology is a map of topological domains to topological segments.
4/// This description is taken verbatim from the CSI Spec:
5///
6/// A topological domain is a sub-division of a cluster, like "region",
7/// "zone", "rack", etc.
8/// A topological segment is a specific instance of a topological domain,
9/// like "zone3", "rack3", etc.
10/// For example {"com.company/zone": "Z1", "com.company/rack": "R3"}
11/// Valid keys have two segments: an OPTIONAL prefix and name, separated
12/// by a slash (/), for example: "com.company.example/zone".
13/// The key name segment is REQUIRED. The prefix is OPTIONAL.
14/// The key name MUST be 63 characters or less, begin and end with an
15/// alphanumeric character ([a-z0-9A-Z]), and contain only dashes (-),
16/// underscores (_), dots (.), or alphanumerics in between, for example
17/// "zone".
18/// The key prefix MUST be 63 characters or less, begin and end with a
19/// lower-case alphanumeric character ([a-z0-9]), contain only
20/// dashes (-), dots (.), or lower-case alphanumerics in between, and
21/// follow domain name notation format
22/// (https://tools.ietf.org/html/rfc1035#section-2.3.1).
23/// The key prefix SHOULD include the plugin's host company name and/or
24/// the plugin name, to minimize the possibility of collisions with keys
25/// from other plugins.
26/// If a key prefix is specified, it MUST be identical across all
27/// topology keys returned by the SP (across all RPCs).
28/// Keys MUST be case-insensitive. Meaning the keys "Zone" and "zone"
29/// MUST not both exist.
30/// Each value (topological segment) MUST contain 1 or more strings.
31/// Each string MUST be 63 characters or less and begin and end with an
32/// alphanumeric character with '-', '_', '.', or alphanumerics in
33/// between.
34pub struct Topology {
35    #[serde(rename = "Segments")]
36    pub segments: Option<std::collections::HashMap<String, String>>,
37}