The ironicclient.v1.resource_fields Module

class ironicclient.v1.resource_fields.Resource(field_ids, sort_excluded=None)[source]

Bases: object

Resource class

This class is used to manage the various fields that a resource (e.g. Chassis, Node, Port) contains. An individual field consists of a ‘field_id’ (key) and a ‘label’ (value). The caller only provides the ‘field_ids’ when instantiating the object.

Ordering of the ‘field_ids’ will be preserved as specified by the caller.

It also provides the ability to exclude some of these fields when they are being used for sorting.

FIELDS = {'internal_info': 'Internal Info', 'async': 'Async', 'driver': 'Driver', 'inspection_finished_at': 'Inspection Finished At', 'pxe_enabled': 'PXE boot enabled', 'target_raid_config': 'Target RAID configuration', 'power_state': 'Power State', 'extra': 'Extra', 'description': 'Description', 'created_at': 'Created At', 'reservation': 'Reservation', 'chassis_uuid': 'Chassis UUID', 'provision_updated_at': 'Provision Updated At', 'node_uuid': 'Node UUID', 'provision_state': 'Provisioning State', 'name': 'Name', 'driver_info': 'Driver Info', 'target_provision_state': 'Target Provision State', 'http_methods': 'Supported HTTP methods', 'local_link_connection': 'Local Link Connection', 'instance_uuid': 'Instance UUID', 'inspection_started_at': 'Inspection Started At', 'address': 'Address', 'instance_info': 'Instance Info', 'uuid': 'UUID', 'maintenance_reason': 'Maintenance Reason', 'updated_at': 'Updated At', 'driver_internal_info': 'Driver Internal Info', 'console_enabled': 'Console Enabled', 'raid_config': 'Current RAID configuration', 'last_error': 'Last Error', 'resource_class': 'Resource Class', 'properties': 'Properties', 'clean_step': 'Clean Step', 'attach': 'Response is attachment', 'maintenance': 'Maintenance', 'target_power_state': 'Target Power State', 'network_interface': 'Network Interface'}
fields
labels
sort_fields
sort_labels