The ironic.objects.conductor Module

class ironic.objects.conductor.Conductor(context=None, **kwargs)[source]

Bases: ironic.objects.base.IronicObject, oslo_versionedobjects.base.VersionedObjectDictCompat

classmethod get_by_hostname(context, hostname)[source]

Get a Conductor record by its hostname.

Parameters:hostname – the hostname on which a Conductor is running
Returns:a Conductor object.
refresh(context=None)[source]

Loads and applies updates for this Conductor.

Loads a Conductor with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded chassis column by column, if there are any updates.

Parameters:context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: Conductor(context)
classmethod register(context, hostname, drivers, update_existing=False)[source]

Register an active conductor with the cluster.

Parameters:
  • hostname – the hostname on which the conductor will run
  • drivers – the list of drivers enabled in the conductor
  • update_existing – When false, registration will raise an exception when a conflicting online record is found. When true, will overwrite the existing record. Default: False.
Raises:

ConductorAlreadyRegistered

Returns:

a Conductor object.

save(context)[source]

Save is not supported by Conductor objects.

touch(context=None)[source]

Touch this conductor’s DB record, marking it as up-to-date.

unregister(context=None)[source]

Remove this conductor from the service registry.

Project Source

This Page