Files
PSProxmoxVE/src/PSProxmoxVE.Core/Models/Cluster/PveClusterConfigNode.cs
T
Clint Branham da2037d0c5 feat: add cluster config and HA management cmdlets (F060, F053)
Cluster Config (F060) — 11 new cmdlets:
- Get-PveClusterStatus, Get-PveClusterNextId
- Get/Set-PveClusterOption (datacenter settings)
- Get-PveClusterConfig, Get-PveClusterConfigNode
- Add/Remove-PveClusterConfigNode (cluster membership)
- Get-PveClusterJoinInfo, Add-PveClusterMember (join workflow)
- New-PveCluster (create cluster)

HA Management (F053) — 14 new cmdlets:
- Get/New/Set/Remove-PveHaResource (HA managed VMs/CTs)
- Move-PveHaResource (migrate/relocate via HA manager)
- Get/New/Set/Remove-PveHaGroup (node groups + priorities)
- Get-PveHaStatus (HA manager status)
- Get/New/Set/Remove-PveHaRule (PVE 9.0+ version-gated)

All cmdlets follow established conventions:
- sealed classes with [OutputType]
- ConfirmImpact.High on destructive operations (D006)
- SecureString for password parameter in Add-PveClusterMember (D002)
- Uri.EscapeDataString on all path segments (D003)
- Verb class constants (D011)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 18:28:11 -05:00

47 lines
1.2 KiB
C#

using Newtonsoft.Json;
namespace PSProxmoxVE.Core.Models.Cluster;
/// <summary>
/// Represents a node entry from the GET /cluster/config/nodes endpoint.
/// </summary>
public class PveClusterConfigNode
{
/// <summary>
/// The node name.
/// </summary>
[JsonProperty("node")]
public string? Name { get; set; }
/// <summary>
/// The numeric node ID within the cluster Corosync configuration.
/// </summary>
[JsonProperty("nodeid")]
public int? NodeId { get; set; }
/// <summary>
/// The address used for Corosync ring 0 communication.
/// </summary>
[JsonProperty("ring0_addr")]
public string? Ring0Addr { get; set; }
/// <summary>
/// The address used for Corosync ring 1 communication.
/// </summary>
[JsonProperty("ring1_addr")]
public string? Ring1Addr { get; set; }
/// <summary>
/// The number of quorum votes assigned to this node.
/// </summary>
[JsonProperty("quorum_votes")]
public int? QuorumVotes { get; set; }
/// <inheritdoc />
public override string ToString()
{
var nodeIdStr = NodeId.HasValue ? $" (ID {NodeId})" : string.Empty;
return $"Node: {Name ?? "N/A"}{nodeIdStr} | Ring0: {Ring0Addr ?? "N/A"}";
}
}