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