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