ironic.objects.volume_connector module¶
- class ironic.objects.volume_connector.VolumeConnector(context=None, **kwargs)[source]¶
Bases:
IronicObject
,VersionedObjectDictCompat
- VERSION = '1.0'¶
- property connector_id¶
- create(context=None)[source]¶
Create a VolumeConnector record in 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.: VolumeConnector(context).
- Raises:
VolumeConnectorTypeAndIdAlreadyExists if a volume connector already exists with the same type and connector_id
- Raises:
VolumeConnectorAlreadyExists if a volume connector with the same UUID already exists
- property created_at¶
- dbapi = <oslo_db.api.DBAPI object>¶
- destroy(context=None)[source]¶
Delete the VolumeConnector 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.: VolumeConnector(context).
- Raises:
VolumeConnectorNotFound if the volume connector cannot be found
- property extra¶
- fields = {'connector_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'node_id': Integer(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'type': String(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(context, ident)[source]¶
Find a volume connector based on its ID or UUID.
- Parameters:
context – security context
ident – the database primary key ID or the UUID of a volume connector
- Returns:
a
VolumeConnector
object- Raises:
InvalidIdentity if ident is neither an integer ID nor a UUID
- Raises:
VolumeConnectorNotFound if no volume connector exists with the specified ident
- classmethod get_by_id(context, db_id)[source]¶
Find a volume connector based on its integer ID.
- Parameters:
cls – the
VolumeConnector
context – Security context.
db_id – The integer (database primary key) ID of a volume connector.
- Returns:
A
VolumeConnector
object.- Raises:
VolumeConnectorNotFound if no volume connector exists with the specified ID.
- classmethod get_by_uuid(context, uuid)[source]¶
Find a volume connector based on its UUID.
- Parameters:
cls – the
VolumeConnector
context – security context
uuid – the UUID of a volume connector
- Returns:
a
VolumeConnector
object- Raises:
VolumeConnectorNotFound if no volume connector exists with the specified UUID
- property id¶
- classmethod list(context, limit=None, marker=None, sort_key=None, sort_dir=None, project=None)[source]¶
Return a list of VolumeConnector objects.
- Parameters:
context – security context
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”.
project – The associated node project to search with.
- Returns:
a list of
VolumeConnector
objects- Raises:
InvalidParameterValue if sort_key does not exist
- classmethod list_by_node_id(context, node_id, limit=None, marker=None, sort_key=None, sort_dir=None, project=None)[source]¶
Return a list of VolumeConnector objects related to a given node ID.
- Parameters:
context – security context
node_id – the integer ID of the node
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”.
project – The associated node project to search with.
- Returns:
a list of
VolumeConnector
objects- Returns:
a list of
VolumeConnector
objects- Raises:
InvalidParameterValue if sort_key does not exist
- property node_id¶
- refresh(context=None)[source]¶
Load updates for this VolumeConnector.
Load a volume connector with the same UUID from the database and check for updated attributes. If there are any updates, they are applied from the loaded volume connector, column by column.
- 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.: VolumeConnector(context).
- save(context=None)[source]¶
Save updates to this VolumeConnector.
Updates will be made column by column based on the result of self.do_version_changes_for_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.: VolumeConnector(context).
- Raises:
VolumeConnectorNotFound if the volume connector cannot be found
- Raises:
VolumeConnectorTypeAndIdAlreadyExists if another connector already exists with the same values for type and connector_id fields
- Raises:
InvalidParameterValue when the UUID is being changed
- property type¶
- property updated_at¶
- property uuid¶
- class ironic.objects.volume_connector.VolumeConnectorCRUDNotification(context=None, **kwargs)[source]¶
Bases:
NotificationBase
Notification emitted at CRUD of a volume connector.
- VERSION = '1.0'¶
- property created_at¶
- property event_type¶
- fields = {'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'event_type': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'level': NotificationLevel(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False,valid_values=('debug', 'info', 'warning', 'error', 'critical')), 'payload': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'publisher': Object(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'updated_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True)}¶
- property level¶
- property payload¶
- property publisher¶
- property updated_at¶
- class ironic.objects.volume_connector.VolumeConnectorCRUDPayload(connector, node_uuid)[source]¶
Bases:
NotificationPayloadBase
Payload schema for CRUD of a volume connector.
- SCHEMA = {'connector_id': ('connector', 'connector_id'), 'created_at': ('connector', 'created_at'), 'extra': ('connector', 'extra'), 'type': ('connector', 'type'), 'updated_at': ('connector', 'updated_at'), 'uuid': ('connector', 'uuid')}¶
- VERSION = '1.0'¶
- property connector_id¶
- property created_at¶
- property extra¶
- fields = {'connector_id': String(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'created_at': DateTime(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'extra': FlexibleDict(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=True), 'node_uuid': UUID(default=<class 'oslo_versionedobjects.fields.UnspecifiedDefault'>,nullable=False), 'type': String(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=False)}¶
- property node_uuid¶
- property type¶
- property updated_at¶
- property uuid¶