Package uk.co.ractf.polaris.api.node
Class NodeInfo
- java.lang.Object
-
- uk.co.ractf.polaris.api.common.JsonRepresentable
-
- uk.co.ractf.polaris.api.node.NodeInfo
-
public class NodeInfo extends JsonRepresentable
Represents the current state of a Polaris host{ "id": "embedded", "hostname": "polaris1", "uname": "Linux polaris1 5.10.16-arch1-1 #1 SMP PREEMPT Sat, 13 Feb 2021 20:50:18 +0000 x86_64 GNU/Linux", "architecture": "amd64", "processors": 16, "totalMemory": 67437092864, "freeMemory": 38039498752, "totalSwap": 24771100672, "freeSwap": 24771100672, "labels": { "aslr": "on" }, "publicIP": "127.0.0.1", "osName": "Linux", "osVersion": "5.10.16-arch1-1", "cpuLoad": 6.22 }
-
-
Constructor Summary
Constructors Constructor Description NodeInfo(java.lang.String id, java.lang.String publicIP, java.lang.String hostname, java.lang.String uname, java.lang.String architecture, java.lang.String osName, java.lang.String osVersion, int processors, double cpuLoad, long totalMemory, long freeMemory, long totalSwap, long freeSwap, java.util.Map<java.lang.String,java.lang.String> labels, PortAllocations portAllocations, java.util.List<java.lang.String> podImages, java.util.List<java.lang.String> runners, boolean schedulable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getArchitecture()
double
getCpuLoad()
long
getFreeMemory()
long
getFreeSwap()
java.lang.String
getHostname()
java.lang.String
getId()
java.util.Map<java.lang.String,java.lang.String>
getLabels()
java.lang.String
getOsName()
java.lang.String
getOsVersion()
java.util.List<java.lang.String>
getPodImages()
PortAllocations
getPortAllocations()
int
getProcessors()
java.lang.String
getPublicIP()
java.util.List<java.lang.String>
getRunners()
long
getTotalMemory()
long
getTotalSwap()
java.lang.String
getUname()
int
hashCode()
boolean
isSchedulable()
-
Methods inherited from class uk.co.ractf.polaris.api.common.JsonRepresentable
parse, toJsonString
-
-
-
-
Constructor Detail
-
NodeInfo
public NodeInfo(java.lang.String id, java.lang.String publicIP, java.lang.String hostname, java.lang.String uname, java.lang.String architecture, java.lang.String osName, java.lang.String osVersion, int processors, double cpuLoad, long totalMemory, long freeMemory, long totalSwap, long freeSwap, java.util.Map<java.lang.String,java.lang.String> labels, PortAllocations portAllocations, java.util.List<java.lang.String> podImages, java.util.List<java.lang.String> runners, boolean schedulable)
- Parameters:
id
- the id of the hostpublicIP
- the public ip of the hosthostname
- the hostname of the hostuname
- the kernel details of the hostarchitecture
- the architecture of the hostosName
- the name of the operating systemosVersion
- the version of the operating systemprocessors
- how many processors are availablecpuLoad
- the average cpu load across all cores in the last minutetotalMemory
- total system memoryfreeMemory
- free system memorytotalSwap
- total swap space on the hostfreeSwap
- free swap space on the hostlabels
- labels added to the hostportAllocations
- ports allocated on the hostpodImages
- pod images downloaded on the noderunners
- the runners available on the nodeschedulable
- if the node is schedulable
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getPublicIP
public java.lang.String getPublicIP()
-
getHostname
public java.lang.String getHostname()
-
getUname
public java.lang.String getUname()
-
getArchitecture
public java.lang.String getArchitecture()
-
getOsName
public java.lang.String getOsName()
-
getOsVersion
public java.lang.String getOsVersion()
-
getProcessors
public int getProcessors()
-
getCpuLoad
public double getCpuLoad()
-
getTotalMemory
public long getTotalMemory()
-
getFreeMemory
public long getFreeMemory()
-
getTotalSwap
public long getTotalSwap()
-
getFreeSwap
public long getFreeSwap()
-
getLabels
public java.util.Map<java.lang.String,java.lang.String> getLabels()
-
getPortAllocations
public PortAllocations getPortAllocations()
-
getPodImages
public java.util.List<java.lang.String> getPodImages()
-
getRunners
public java.util.List<java.lang.String> getRunners()
-
isSchedulable
public boolean isSchedulable()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-