class

Cl8r::Model::Node

Inherits YAML::Serializable < Reference < Object

Models physical and virtual cluster nodes, multi-role classification, rack coordinates, and hardware layout.

Constructors

new(hostname : String = "", kind : String = "baremetal", host : String | Nil = nil, vcpus : Int32 | Nil = nil, memory_mb : Int32 | Nil = nil, roles : Array(String) = [] of String, rack : String | Nil = nil, rack_unit_start : Int32 | Nil = nil, rack_unit_height : Int32 = 1, bmc_ip : String | Nil = nil, bmc_mac : String | Nil = nil, bmc_switch : String | Nil = nil, bmc_port : String | Nil = nil, disks : Array(DiskSpec) = [] of DiskSpec, interfaces : Array(Interface) = [] of Interface, sysctl : Hash(String, String) = {} of String => String)

Initializes a Node with hardware specifications and network interfaces.

Source
new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Source

Instance methods

baremetal?

Returns true if the node represents a physical bare-metal server.

Source
bmc_ip
Source
bmc_ip=(bmc_ip : String | Nil)
Source
bmc_mac
Source
bmc_mac=(bmc_mac : String | Nil)
Source
bmc_port
Source
bmc_port=(bmc_port : String | Nil)
Source
bmc_switch
Source
bmc_switch=(bmc_switch : String | Nil)
Source
boot_disk

Finds the dedicated OS boot disk specification, if present.

Source
container?

Returns true if the node represents a container.

Source
disks
Source
disks=(disks : Array(DiskSpec))
Source
has_role?(role_name : String) : Bool

Returns true if the node is assigned the specified role (matching both '_' and '-' variants).

Source
host
Source
host=(host : String | Nil)
Source
hostname
Source
hostname=(hostname : String)
Source
hypervisor?

Returns true if the node is designated as a hypervisor.

Source
interfaces
Source
interfaces=(interfaces : Array(Interface))
Source
kind
Source
kind=(kind : String)
Source
memory_mb
Source
memory_mb=(memory_mb : Int32 | Nil)
Source
rack
Source
rack=(rack : String | Nil)
Source
rack_unit_height
Source
rack_unit_height=(rack_unit_height : Int32)
Source
rack_unit_start
Source
rack_unit_start=(rack_unit_start : Int32 | Nil)
Source
roles
Source
roles=(roles : Array(String))
Source
sysctl
Source
sysctl=(sysctl : Hash(String, String))
Source
vcpus
Source
vcpus=(vcpus : Int32 | Nil)
Source
virtual?

Returns true if the node represents a virtual machine.

Source