ironic.objects.deployment module¶
- class ironic.objects.deployment.Deployment(context=None, **kwargs)[source]¶
Bases:
IronicObject
,VersionedObjectDictCompat
- VERSION = '1.0'¶
- create(context=None, node=None)[source]¶
Create a Deployment.
Updates the corresponding node under the hood.
- 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.: Deployment(context)
node – Node object for deployment.
- Raises:
InstanceAssociated, NodeAssociated, NodeNotFound
- property created_at¶
- dbapi = <oslo_db.api.DBAPI object>¶
- destroy(context=None, node=None)[source]¶
Delete the Deployment.
Updates the corresponding node under the hood.
- 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.: Node(context)
node – Node object for deployment.
- fields = {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'image_checksum': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'image_ref': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'kernel_ref': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'ramdisk_ref': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'root_device': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'root_gib': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'state': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'swap_mib': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶
- classmethod get_by_node_uuid(context, node_uuid)[source]¶
Find a deployment based by its node’s UUID.
- Parameters:
cls – the
Deployment
context – Security context
node_uuid – The UUID of a corresponding node.
- Returns:
An
Deployment
object.- Raises:
NodeNotFound
- classmethod get_by_uuid(context, uuid)[source]¶
Find a deployment by its UUID.
- Parameters:
cls – the
Deployment
context – Security context
uuid – The UUID of a deployment.
- Returns:
An
Deployment
object.- Raises:
InstanceNotFound
- property image_checksum¶
- property image_ref¶
- instance_info_mapping = {'image_checksum': 'image_checksum', 'image_source': 'image_ref', 'kernel': 'kernel_ref', 'ramdisk': 'ramdisk_ref', 'root_device': 'root_device', 'root_gb': 'root_gib', 'swap_mb': 'swap_mib'}¶
- instance_info_mapping_rev = {'image_checksum': 'image_checksum', 'image_ref': 'image_source', 'kernel_ref': 'kernel', 'ramdisk_ref': 'ramdisk', 'root_device': 'root_device', 'root_gib': 'root_gb', 'swap_mib': 'swap_mb'}¶
- property kernel_ref¶
- classmethod list(context, filters=None, limit=None, marker=None, sort_key=None, sort_dir=None)[source]¶
Return a list of Deployment objects.
- Parameters:
cls – the
Deployment
context – Security context.
filters – Filters to apply.
limit – Maximum number of resources to return in a single result.
marker – Pagination marker for large data sets.
sort_key – Column to sort results by.
sort_dir – Direction to sort. “asc” or “desc”.
- Returns:
A list of
Deployment
object.- Raises:
InvalidParameterValue
- node_mapping = {'instance_uuid': 'uuid', 'provision_state': 'state', 'uuid': 'node_uuid'}¶
- property node_uuid¶
- property ramdisk_ref¶
- refresh(context=None)[source]¶
Refresh the object by re-fetching from the DB.
- 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.: Node(context)
- property root_device¶
- property root_gib¶
- property state¶
- property swap_mib¶
- property updated_at¶
- property uuid¶