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