using Newtonsoft.Json;
using System.Collections.Generic;
namespace PSProxmox.Models
{
///
/// Represents a cluster in Proxmox VE.
///
public class ProxmoxCluster
{
///
/// Gets or sets the cluster name.
///
[JsonProperty("name")]
public string Name { get; set; }
///
/// Gets or sets the cluster ID.
///
[JsonProperty("id")]
public string ID { get; set; }
///
/// Gets or sets the cluster nodes.
///
[JsonProperty("nodes")]
public List Nodes { get; set; }
///
/// Gets or sets the cluster quorum.
///
[JsonProperty("quorum")]
public ProxmoxClusterQuorum Quorum { get; set; }
///
/// Gets or sets the cluster version.
///
[JsonProperty("version")]
public string Version { get; set; }
///
/// Gets or sets the cluster config version.
///
[JsonProperty("config_version")]
public int ConfigVersion { get; set; }
}
///
/// Represents a node in a Proxmox VE cluster.
///
public class ProxmoxClusterNode
{
///
/// Gets or sets the node name.
///
[JsonProperty("name")]
public string Name { get; set; }
///
/// Gets or sets the node ID.
///
[JsonProperty("id")]
public string ID { get; set; }
///
/// Gets or sets the node IP address.
///
[JsonProperty("ip")]
public string IP { get; set; }
///
/// Gets or sets the node online status.
///
[JsonProperty("online")]
public bool Online { get; set; }
///
/// Gets or sets the node type.
///
[JsonProperty("type")]
public string Type { get; set; }
}
///
/// Represents the quorum information for a Proxmox VE cluster.
///
public class ProxmoxClusterQuorum
{
///
/// Gets or sets the quorum status.
///
[JsonProperty("quorate")]
public bool Quorate { get; set; }
///
/// Gets or sets the number of nodes.
///
[JsonProperty("nodes")]
public int Nodes { get; set; }
///
/// Gets or sets the expected votes.
///
[JsonProperty("expected_votes")]
public int ExpectedVotes { get; set; }
///
/// Gets or sets the number of votes needed for quorum.
///
[JsonProperty("quorum")]
public int Quorum { get; set; }
}
}