class

Cl8r::Model::QueryEngine

Inherits Reference < Object

Query engine providing sub-millisecond lookups across a ResolvedCluster.

Class methods

analyze_reachability(cluster : ResolvedCluster, query_a : String, query_b : String) : ReachabilityResult | Nil

Analyzes L2 adjacency, shared network planes, and reachability between two nodes.

Source
find_bmc(cluster : ResolvedCluster, hostname : String) : BmcQueryResult | Nil

Finds the BMC controller configuration for a specific node hostname.

Source
find_ip(cluster : ResolvedCluster, address : String) : IpQueryResult | Nil

Searches for any entity matching an IPv4 or IPv6 address.

Source
find_mac(cluster : ResolvedCluster, mac_address : String) : MacQueryResult | Nil

Searches for a MAC address across interfaces and BMC controllers.

Source
find_node(cluster : ResolvedCluster, query : String) : ResolvedNode | Nil

Searches for a node by hostname or FQDN.

Source
find_port(cluster : ResolvedCluster, switch_name : String, port_id : String) : PortQueryResult | Nil

Searches for switch port connections.

Source
find_rack(cluster : ResolvedCluster, rack_name : String) : RackQueryResult | Nil

Searches for a rack by name and returns all installed nodes, switches, and capacity.

Source
find_range(cluster : ResolvedCluster, id_or_name : String) : RangeQueryResult | Nil

Searches for range breakdown of a VLAN network plane.

Source
find_switch(cluster : ResolvedCluster, switch_name : String) : SwitchQueryResult | Nil

Searches for a switch by name and returns all its ports and connected hardware.

Source
find_vlan(cluster : ResolvedCluster, id_or_name : String) : VlanQueryResult | Nil

Searches for a VLAN network plane by VLAN tag or plane name.

Source
list_bmcs(cluster : ResolvedCluster) : Array(BmcQueryResult)

Lists all BMC controllers configured across cluster nodes.

Source
list_ips(cluster : ResolvedCluster, filter : String | Nil = nil) : Array(IpQueryResult)

Lists all allocated IP addresses across the cluster, optionally filtered by plane, hostname, IP substring, or entity type.

Source
list_macs(cluster : ResolvedCluster, filter : String | Nil = nil) : Array(MacQueryResult)

Lists all allocated MAC addresses across the cluster, optionally filtered by hostname, interface name, MAC substring, or network plane.

Source
list_nodes(cluster : ResolvedCluster) : Array(ResolvedNode)

Returns all nodes in the cluster.

Source
list_ports(cluster : ResolvedCluster, switch_name : String | Nil = nil, available : Bool | Nil = nil) : Array(PortQueryResult)

Lists all ports for a specific switch, or all ports across all switches in the cluster, optionally filtered by availability (available = true/false/nil).

Source
list_racks(cluster : ResolvedCluster) : Array(Rack)

Returns all racks in the cluster.

Source
list_switches(cluster : ResolvedCluster) : Array(Switch)

Returns all switches in the cluster.

Source
list_vlans(cluster : ResolvedCluster) : Array(ResolvedPlane)

Returns all network planes in the cluster.

Source
normalize_mac(mac_str : String) : String

Helper to normalize MAC address strings for fuzzy/separator-agnostic comparison

Source
normalize_port(port_str : String) : String

Helper to normalize switch port identifiers

Source
search_ip_partial(cluster : ResolvedCluster, query : String) : Array(IpQueryResult)

Performs a partial search for any IP address, returning all matches

Source
search_mac_partial(cluster : ResolvedCluster, query : String) : Array(MacQueryResult)

Performs a partial search for any MAC address, returning all matches

Source

Nested types