metadataserver.models

Model export and helpers for metadataserver.

Functions

ignore_unused(*args) Suppress warnings about unused variables.

Classes

CommissioningScript(*args, **kwargs) User-provided commissioning script.
NodeCommissionResult(*args, **kwargs) Storage for data returned from node commissioning.
NodeKey(*args, **kwargs) Associate a Node with its OAuth (token) key.
NodeUserData(*args, **kwargs) User-data portion of a node’s metadata.
class metadataserver.models.CommissioningScript(*args, **kwargs)

Bases: django.db.models.base.Model

User-provided commissioning script.

Actually a commissioning “script” could be a binary, e.g. because a hardware vendor supplied an update in the form of a binary executable.

class metadataserver.models.NodeCommissionResult(*args, **kwargs)

Bases: maasserver.models.cleansave.CleanSave, maasserver.models.timestampedmodel.TimestampedModel

Storage for data returned from node commissioning.

Commissioning a node results in various bits of data that need to be stored, such as lshw output. This model allows storing of this data as unicode text, with an arbitrary name, for later retrieval.

Variables:
  • node – The context Node.
  • status – If this data results from the execution of a script, this is the status of this execution. This can be “OK”, “FAILED” or “WORKING” for progress reports.
  • name – A unique name to use for the data being stored.
  • data – The file’s actual data, unicode only.
get_data_as_html()

More-or-less human-readable HTML representation of the output.

class metadataserver.models.NodeKey(*args, **kwargs)

Bases: maasserver.models.cleansave.CleanSave, django.db.models.base.Model

Associate a Node with its OAuth (token) key.

Variables:
  • node – A Node.
  • key – A key, to be used by node for logging in. The key belongs to the maas-init-node user.
class metadataserver.models.NodeUserData(*args, **kwargs)

Bases: maasserver.models.cleansave.CleanSave, django.db.models.base.Model

User-data portion of a node’s metadata.

When cloud-init sets up a node, it retrieves specific data for that node from the metadata service. One portion of that is the “user-data” binary blob.

Variables:
  • node – Node that this is for.
  • data – base64-encoded data.
MAAS logo

MAAS

Metal As A Service.



Related Topics

This Page