ironic.objects.volume_connector module¶
- class ironic.objects.volume_connector.VolumeConnector(context=None, **kwargs)[source]¶
Bases:
IronicObject,VersionedObjectDictCompat- VERSION = '1.1'¶
Object version field
Each service has its set of objects, each with a version attached. When a client attempts to call an object method, the server checks to see if the version of that object matches (in a compatible way) its object implementation. If so, cool, and if not, fail.
This version is allowed to have three parts,
X.Y.Z, where the.Zelement is reserved for stable branch backports. The.Zis ignored for the purposes of triggering a backport, which means anything changed under a.Zmust be additive and non-destructive such that a node that knows aboutX.Ycan considerX.Y.Zequivalent.
- 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)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- 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
VolumeConnectorobject- 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
VolumeConnectorcontext – Security context.
db_id – The integer (database primary key) ID of a volume connector.
- Returns:
A
VolumeConnectorobject.- 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
VolumeConnectorcontext – security context
uuid – the UUID of a volume connector
- Returns:
a
VolumeConnectorobject- 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
VolumeConnectorobjects- 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
VolumeConnectorobjects- Returns:
a list of
VolumeConnectorobjects- 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:
NotificationBaseNotification emitted at CRUD of a volume connector.
- VERSION = '1.0'¶
Object version field
Each service has its set of objects, each with a version attached. When a client attempts to call an object method, the server checks to see if the version of that object matches (in a compatible way) its object implementation. If so, cool, and if not, fail.
This version is allowed to have three parts,
X.Y.Z, where the.Zelement is reserved for stable branch backports. The.Zis ignored for the purposes of triggering a backport, which means anything changed under a.Zmust be additive and non-destructive such that a node that knows aboutX.Ycan considerX.Y.Zequivalent.
- 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)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- property level¶
- property payload¶
- property publisher¶
- property updated_at¶
- class ironic.objects.volume_connector.VolumeConnectorCRUDPayload(connector, node_uuid)[source]¶
Bases:
NotificationPayloadBasePayload 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'¶
Object version field
Each service has its set of objects, each with a version attached. When a client attempts to call an object method, the server checks to see if the version of that object matches (in a compatible way) its object implementation. If so, cool, and if not, fail.
This version is allowed to have three parts,
X.Y.Z, where the.Zelement is reserved for stable branch backports. The.Zis ignored for the purposes of triggering a backport, which means anything changed under a.Zmust be additive and non-destructive such that a node that knows aboutX.Ycan considerX.Y.Zequivalent.
- 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)}¶
The fields present in this object as
key:fieldpairs.For example:
fields = { 'foo': obj_fields.IntegerField(), 'bar': obj_fields.StringField(), }
- property node_uuid¶
- property type¶
- property updated_at¶
- property uuid¶