Luna2 REST API Fields

Query parameter

Fields

Presence

Expected

Default

Cluster

controller

mandatory

dictionary

““

READ ONLY

  • hostname

mandatory

string

““

READ ONLY

  • status

internal

string

““

READ ONLY

  • ipaddr

mandatory

string

““

READ ONLY

  • serverport

mandatory

integer

““

READ ONLY

ntp_server

optional

string

“controller“

Global NTP server

nameserver_ip

optional

string

“10.141.255.254”

Global DNS server. default IP address depends on bootstrap time.

forwardserver_ip

optional

string

““

DNS forwarder. can NOT be controller

domain_search

optional

string

““

overriding automatic domain search path

technical_contacts

optional

array

root@localhost

Defines a list of emailaddresses or mailing lists to post warnings and monitoring issues to.

provision_method

optional

string

torrent

Defines the provisioning method. The luna installer may select any of torrent, http or rsync

provision_fallback

optional

string

http

The fallback method, default will be http, but is configurable. If left to None, the installer will not attempt a second method.

security

optional

boolean

False

0 Disable security (also allows requesting boot templates etc.)

1 Enable security (disallows cross requesting templates

More levels possible

debug

optional

boolean

False

Toggle debug mode (logging)

nextnode_discover

optional

boolean

False

find the next node when asked for. i.e. when a node is not known. triggered when only one group is available but honors mac and cloud detection.

createnode_ondemand

optional

boolean

True

Create Nodes while iPXE booting, selected by create-me-a-node-in-this-group option.

createnode_macashost

optional

boolean

False

while nodes are discovered, use the mac address of the boot interface as hostname to create the next node

Auth

rolename

string

““

Name of the role (admin, operator, readonly)

osimagename

string

““

Name of the object

nodename

string

““

Name of the object

clustername

string

““

Name of the object

bmcsetupname

string

““

Name of the object

groupname

string

““

Name of the object

groupsecretsname

string

““

Name of the object

nodesecrets

string

““

Name of the object

networkname

string

““

Name of the object

node

name

mandatory

string

““

Hostname of the node

newnodename

optional

string

None

New hostname, should always be None, when filled it triggers an rename action

group

mandatory

string

““

Group assigned to the node

interfaces *

optional

dictionary

““

  1. When defined, fill in interfaces

  2. None: Take from group assignment

Output when listing or showing must indicate that the field is in override mode.

Required: Interface(name) ONLY Interface, network, ipaddress

localboot

optional

boolean

False

True / false (yes/no), will trigger a rewrite of the PXE boot menu to LOCALBOOT and trigger the installation/setup of the bootloader

macaddr

(warning)

string

““

Used for node identification and DHCP

switchport

optional

string

None

When defined used for port discovery

service

optional

boolean

False

Triggers service mode (boot halts in Luna installer)

setupbmc

optional

boolean

True

Configured BMC when a BMC interface has been defined

status

optional

string

““

Field is updated during boot process

switch

optional

string

None

When defined used for port discovery

comment

optional

string

““

Free textfield to be filled in by admin.

osimage *

optional

string

None

  1. When defined override group setting

  2. None: Take from group assignment

Output when listing or showing must indicate that the field is in override mode.

kerneloptions *

optional

string

None

override group/osimage kernel options boot time

Output when listing or showing must indicate that the field is in override mode.

prescript *

optional

string (multiline)

None

  1. When defined override group setting

  2. None: Take from group assignment

Output when listing or showing must indicate that the field is in override mode.

partscript *

optional

string (multiline)

None

  1. When defined override group setting

  2. None: Take from group assignment

Output when listing or showing must indicate that the field is in override mode.

postscript *

optional

string (multiline)

None

  1. When defined override group setting

  2. None: Take from group assignment

Output when listing or showing must indicate that the field is in override mode.

scripts *

optional

string

““

include a plugin based scripts (comma separated). common use cases: diskfull.py in plugins.

Output when listing or showing must indicate that the field is in override mode.

roles *

optional

string

““

include a plugin based role (comma separated). A role runs after node bootup. a role is typically used when an image needs further ‘expansion’ but could not be included in an image. think of ansible paybooks, parallel filesystem deployment, driver compilation or other tasks that renders a node into a specific ‘role’

Output when listing or showing must indicate that the field is in override mode.

netboot * new

optional

boolean

True

True will offer the default boot menu. False will offer LOCALDISK or BIOS boot order

localinstall * new

optional

boolean

False

False is the default behavior (continue), when True, install grub2 (or whatever is the distro default)

Deprecated since sep 12 2024

bootmenu

optional

boolean

False

Identified nodes only get served the PXE boot menu when False.

When True, the node gets the full menu.

provision_interface *

optional

string

““

Override of BOOTIF

Output when listing or showing must indicate that the field is in override mode.

provision_method *

optional

string

torrent

Defines the provisioning method. The luna installer may select any of torrent, http or rsync

Output when listing or showing must indicate that the field is in override mode.

provision_fallback *

optional

string

http

The fallback method, default will be http, but is configurable. If left to None, the installer will not attempt a second method.

Output when listing or showing must indicate that the field is in override mode.

tpm_uuid

optional

string

None

TPM UUID

tpm_pubkey

optional

data

None

TPM Public key

tpm_sha256

optional

string

None

unmanaged_bmc_users

optional

string

““

See BMCsetup

_override

meta field

boolean

No default

Only used when fetching info. tells if a node has a group override config

secrets

node (secrets)

name

mandatory

string

““

Name of the secret

newsecretname

optional

string

““

Used for rename and cloning

content

mandatory

string

““

Encrypted content of the file

path

mandatory

string

““

Path to the secret

group (secrets)

name

mandatory

string

““

Name of the secret

newsecretname

optional

string

““

Used for rename and cloning

content

mandatory

string

““

Encrypted content of the file

path

mandatory

string

““

Path to the secret

group

name

mandatory

string

““

Name of the group

newgroupname

optional

string

““

New groupname, should always be empty unless renaming

setupbmc

optional

boolean

True

Set up BMC during boot

Renamed from bmcsetup to setupbmc to be consistent cross the board

domain

optional

string

cluster

BOOTIF of the group, otherwise only domains from network are selectable

interfaces

optional

array

BOOTIF

Reserved names

  • BOOTIF (required)

  • BMC

Required: Interface, network, ipaddress

Validation is done on server side

osimage

optional

string

““

Name of the osimage in use

kerneloptions *

optional

string

None

osimage override kernel options boot time

Output when listing or showing must indicate that the field is in override mode.

partscript

optional

string (multiline)

““

Partitioning script

postscript

optional

string (multiline)

““

Post script to be run after the part script, but before pivot

prescript

optional

string (multiline)

““

Pre script to be run before anything else

provision_interface

optional

string

BOOTIF

Override of BOOTIF

netboot * new

optional

boolean

True

True will offer the default boot menu. False will offer LOCALDISK or BIOS boot order

localinstall * new

optional

boolean

false

False is the default behavior (continue), when True, install grub2 (or whatever is the distro default)

bootmenu

optional

boolean

False

Identified nodes only get served the PXE boot menu when False.

When True, the node gets the full menu.

comment

optional

string

““

Free textfield to be filled in by admin.

provision_method *

optional

string

torrent

Defines the provisioning method. The luna installer may select any of torrent, http or rsync

Output when listing or showing must indicate that the field is in override mode.

provision_fallback *

optional

string

http

The fallback method, default will be http, but is configurable. If left to None, the installer will not attempt a second method.

Output when listing or showing must indicate that the field is in override mode.

scripts

optional

string

““

include a plugin based scripts (comma separated). common use cases: diskfull.py in plugins.

roles

optional

string

““

include a plugin based role (comma separated). A role runs after node bootup. a role is typically used when an image needs further ‘expansion’ but could not be included in an image. think of ansible paybooks, parallel filesystem deployment, driver compilation or other tasks that renders a node into a specific ‘role’

_override

meta field

boolean

No default

Only used when fetching info. tells if a node has a group override config

Network

name

mandatory

string

““

Name of the network

newnetname

optional

string

““

New netname, should always be empty unless renaming

dhcp

optional

boolaen

False

Enable DHCP on this network

dhcp_range_begin

optional

string

““

End range

dhcp_range_end

optional

string

““

Starting range

dhcp_nodes_in_pool

optional

boolean

False

Use the dhcp pool to cater nodes' ip addresses. implies rndc and ddns functionality.

network

mandatory

string

““

CIDR notation, validation done on server. Backend storage: network, prefix

ns_hostname

optional

string

controller_hostname

Nameserver for this network

nameserver_ip

optional

string

controller_ip (cluster)

Nameserver IP for this network. This is being used on client side for a resolver. the controllers will not create a zone and will not be authoritative.

gateway

optional

string

controller_ip

Default gateway for this network

gateway_metric

optional

string

101

ntp_server

optional

string

controller_ip (cluster)

NTP Server for this network (default taken from cluster)

comment

optional

string

““

Free textfield to be filled in by admin.

BMCsetup

name

mandatory

string

““

newbmcname

optional

string

““

New BMC name, used for renaming or cloning the configuration when used via _clone.

mgmtchannel

optional

integer

““

netchannel

optional

integer

““

password

optional

string

““

username

optional

string

““

userid

optional

integer

““

comment

optional

string

““

unmanaged_bmc_users

optional

string

skip

BMC setup usually does not remove old or existing users, but they may be required by the customer.

disable: disable all unconfigured users

delete: delete all unconfigured users

skip: do not handle any of the unconfigured users

Switch

name

mandatory

string

““

hostname of the switch

newswitchname

optional

string

““

New switchname, should always be empty unless renaming

network

mandatory

string

““

name of the network

ipaddress

mandatory

string

““

IP address

macaddress

optional

string

““

Switch Mac Address

oid

optional

string

.1.3.6.1.2.1.17.7.1.2.2.1.2

snmp OID for port detection

read

optional

string

public

SNMP community string for reading

rw

optional

string

private

SNMP community string for read/write

comment

optional

string

““

Free textfield to be filled in by admin.

Otherdev

name

mandatory

string

““

hostname for the device

newotherdevname

optional

string

““

New otherdevname, should always be empty unless renaming

network

mandatory

string

““

name of the network

ipaddress

mandatory

string

““

ip address

macaddress

optional

string

Other Device Mac Address

comment

optional

string

““

Free textfield to be filled in by admin.

OSimage

name

mandatory

string

““

Name of the image

newosimagename

optional

string

““

New newosimagename, should always be empty unless renaming

dracutmodules

optional

string

luna, -18n, -plymouth

grab_exclude

optional

string

““

See the default exclude list

grab_filesystems

optional

string

/, /boot

Filesystems to grab

initrdfile

optional

string

osimagename-initramfs-`uname -r`

Always take the osimagename as the base of the name, unless this is defined

kernelfile

optional

string

osimagename-vmlinuz-`uname -r`

Always take the osimagename as the base of the name, unless this is defined

imagefile

optional

string

““

replacement for tarball to remove the ‘tar’ from its name as the plugins decide how to compress/group and with what. This is the compressed image.

kernelmodules

optional

string

ipmi_devintf, ipmi_si, ipmi_msghandler

Default list of kernel modules (required on boot)

kerneloptions

optional

string

““

Empty list, unless defined

kernelversion

optional

string

““

Kernel version *required

path

mandatory

string

““

Take the default path from the configuration file, unless defined

distribution

optional

string

redhat

Defaults to redhat, possible future: debian?

osrelease * new

optional

string

““

used for plugin loading. os version.

systemroot * new

optional

string

“/sysroot”

used during ramdisk time. this is where the before-pivot root filesystem lives. Ubuntu/debian is using “$ROOT” or “$rootmnt”

comment

optional

string

““

Free textfield to be filled in by admin.

Monitor

node

mandatory

string

““

Node referred to

status

mandatory

string

““

Arbitrary string updated by the client itself, or generated by the daemon

state

mandatory

string

““

Progress of the node in the boot state.

Generic states:

  • installer.discovery (204)

  • installer.tpm (500)

  • installer.downloaded (204)

  • installer.started (204)

  • installer.error (500)

  • installer.completed (204)

Specific installer phases

  • installer.prescript (204)

  • installer.partscript (204)

  • installer.postscript (204)

  • installer.image (204)

  • installer.secrets (204)

  • installer.finalizing (204)

  • installer.success (204)

Journal (HA)

function

mandatory

string

Base function call like Node, Group, Cluster, etc

object

mandatory

string

in most cases ‘name’ object in base function like ‘node001’ etc

param

optional

string

second call parameter, single variable

payload

optional

string

in many cases a json payload. in most cases referred to by request_data inside functions

masteronly

optional

boolean

forces this task to only be run by a master (HA)

misc

optional

string

miscellaneous field that can be used in context for extra non object related manipulation. concrete example where OsImage being built by master, forwarding the status update including the request id provided in misc