Bases: ironic.objects.base.IronicObject, oslo_versionedobjects.base.VersionedObjectDictCompat
Create a VolumeTarget 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.: VolumeTarget(context). |
|---|---|
| Raises: | VolumeTargetBootIndexAlreadyExists if a volume target already exists with the same node ID and boot index |
| Raises: | VolumeTargetAlreadyExists if a volume target with the same UUID exists |
Delete the VolumeTarget 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.: VolumeTarget(context). |
|---|---|
| Raises: | VolumeTargetNotFound if the volume target cannot be found |
Find a volume target based on its ID or UUID.
| Parameters: |
|
|---|---|
| Returns: | a VolumeTarget object |
| Raises: | InvalidIdentity if ident is neither an integer ID nor a UUID |
| Raises: | VolumeTargetNotFound if no volume target with this ident exists |
Find a volume target based on its database ID.
| Parameters: |
|
|---|---|
| Returns: | a VolumeTarget object |
| Raises: | VolumeTargetNotFound if no volume target with this ID exists |
Find a volume target based on its UUID.
| Parameters: |
|
|---|---|
| Returns: | a VolumeTarget object |
| Raises: | VolumeTargetNotFound if no volume target with this UUID exists |
Return a list of VolumeTarget objects.
| Parameters: |
|
|---|---|
| Returns: | a list of VolumeTarget objects |
| Raises: | InvalidParameterValue if sort_key does not exist |
Return a list of VolumeTarget objects related to a given node ID.
| Parameters: |
|
|---|---|
| Returns: | a list of VolumeTarget objects |
| Raises: | InvalidParameterValue if sort_key does not exist |
Loads updates for this VolumeTarget.
Load a volume target with the same UUID from the database and check for updated attributes. If there are any updates, they are applied from the loaded volume target, 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.: VolumeTarget(context). |
|---|---|
| Raises: | VolumeTargetNotFound if the volume target cannot be found |
Save updates to this VolumeTarget.
Updates will be made column by column based on the result of self.obj_get_changes().
| 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.: VolumeTarget(context). |
|---|---|
| Raises: | InvalidParameterValue if the UUID is being changed |
| Raises: | VolumeTargetBootIndexAlreadyExists if a volume target already exists with the same node ID and boot index values |
| Raises: | VolumeTargetNotFound if the volume target cannot be found |