This section describes some of the most commonly used Cinder API callsand their corresponding CLI commands. It is not meant to be acomprehensive list that is representative of all functionality presentin Cinder; for more information, please refer to the OpenStackConfigurationReference.
Note
Block Storage V2 API has been deprecated. To ensure Cinder does notuse the V2 API, update enable_v2_api=false
and enable_v3_api=true
in your cinder.conf file.
Volume API¶
Table 4.2, “Cinder API Overview - Volume” specifies the validoperations that can be performed on Cinder volumes. Please note thatCinder volumes are identified as CLI command arguments by either theirnames or UUID.
Operation | CLI Command | Description |
---|---|---|
Create |
| Create a Cinder volume of specified size; optional name, availability zone, volume type |
Delete |
| Delete an existing Cinder volume; the |
Edit |
| Set or unset metadata on a Cinder volume |
Extend |
| Increase the capacity of a Cinder volume to the specified size |
List |
| List all Cinder volumes |
Migrate |
| Move a Cinder volume to a new Cinder backend (specified by name) |
Show |
| Show details about a Cinder volume |
Upload as image |
| Upload a Cinder volume to the OpenStack Image Service |
Manage |
| Bring an existing storage object under Cinder management |
Unmanage |
| Cease management of an existing Cinder volume without deleting the backing storage object |
Revert to snapshot |
| Restore a Cinder volume to the state and data of the most recent snapshot. This command is only available in microversion 3.40 and above. |
Table 4.2. Cinder API Overview - Volume
Snapshot API¶
Table 4.3, “Cinder API Overview - Snapshot” specifies the validoperations that can be performed on Cinder snapshots. Please note thatCinder snapshots are identified as CLI command arguments by either theirdisplay name or UUID.
Operation | CLI Command | Description |
---|---|---|
Create |
| Create a Cinder snapshot of a specific Cinder volume |
Delete |
| Delete a Cinder snapshot |
Edit |
| Set or unset metadata on a Cinder snapshot |
List |
| List all Cinder snapshots |
Rename |
| Change the display-name of a Cinder snapshot |
Reset State |
| Reset the state of a Cinder snapshot |
Show |
| Show details about a Cinder snapshot |
Table 4.3. Cinder API Overview - Snapshot
Consistency Group API¶
Table 4.4, “Cinder API Overview - Consistency Groups” specifies thevalid operations that can be performed on Cinder consistency groups.Please note that Cinder consistency groups and cgsnapshots areidentified as CLI command arguments by either their display name orUUID. Consistency group operations support has been deprecated inBlock Storage V3 API. Only Block Storage V2 API supports consistencygroups. Future releases will involve a migration of existingconsistency group operations to use generic volume group operations.
Operation | CLI Command | Description |
---|---|---|
Create |
| Create a consistency group with support for at least one volume type |
Show |
| Display details for a specified consistency group |
List |
| Show a list of all created consistency groups |
Create a volume and add it to a consistency group |
| Expand a consistency group to have another volume by creating a volume with the |
Create a cgsnapshot |
| Generate a snapshot of a consistency group |
Show a snapshot of a consistency group |
| Display details for the cgsnapshot of consistency group |
List consistency group snapshots |
| Display all cgsnapshots for a consistency group |
Delete a snapshot of a consistency group |
| Remove a cgsnapshot |
Delete a consistency group |
| The |
Modify a consistency group |
| Add or remove volumes from a consistency group with |
Create a consistency group from the snapshot of another consistency group |
| Use a cgsnapshot to generate a new consistency group |
Create a consistency group from a source consistency group |
| Copy a consistency group |
Table 4.4. Cinder API Overview - Consistency Groups
Backup API¶
Table 4.5, “Cinder API Overview - Backup” specifies the validoperations that can be performed on Cinder backups. Please note thatCinder backups are identified as CLI command arguments by either theirdisplay name or UUID.
Operation | CLI Command | Description |
---|---|---|
Create |
| Create a Cinder backup |
Delete |
| Delete a Cinder backup |
List |
| List all Cinder backups |
Restore |
| Restore a Cinder backup into a Cinder volume |
Show |
| Show details about a Cinder backup |
Table 4.5. Cinder API Overview - Backup
Group API¶
Table 4.6, “Cinder API Overview - Group” specifies the validoperations that can be performed on Cinder groups. Please note thatCinder groups are identified as CLI command arguments by either theirdisplay name or UUID.
Note
Currently only the Block Storage V3 API supports group operations. Theminimum version for group operations supported by the ONTAP drivers is3.14. The API version can be specified with the following CLI flag--os-volume-api-version 3.14
Note
The Cinder community plans to migrate existing consistency group operationsto group operations in an upcoming release. Please review Cinderrelease notes for upgrade instructions prior to using group operations.
Note
The ONTAP volume drivers support the consistent_group_snapshot_enabledgroup type. By default Cinder group snapshots take individual snapshotsof each Cinder volume in the group. To enable consistency group snapshots setconsistent_group_snapshot_enabled="<is> True"
in the group type used.Be aware that only one consistency group snapshot per storage pool (i.e.flexvol) can be performed at a time. Overlapping consistency group snapshotoperations can fail.
Operation | CLI Command | Description |
---|---|---|
Create |
| Creates a group. |
Create a group from a source group |
| Creates a group from a group snapshot or a source group. |
Delete |
| Removes one or more groups. |
List |
| Lists all groups. |
Show |
| Shows details of a group. |
Update |
| Updates a group. |
Create group snapshot |
| Creates a group snapshot. |
Delete group snapshot |
| Removes one or more group snapshots. |
List group snapshot |
| Lists all group snapshots. |
Show group snapshot |
| Shows group snapshot details. |
Create group type |
| Creates a group type. |
Delete group type |
| Deletes group type or types. |
List default group type |
| List the default group type. |
List group types |
| Lists available ‘group types’. (Admin only will see private types) |
Show group type |
| Show group type details. |
Update group type |
| Updates group type name, description, and/or is_public. |
List group specs |
| Lists current group types and specs. |
Set group specs |
| Set or unset group_spec for a group type. |
Table 4.6. Cinder API Overview - Volume Group
Volume Type API¶
Table 4.7, “Cinder API Overview - Volume Type” specifies the validoperations that can be performed on Cinder volume types. Please notethat Cinder volume types are identified as CLI command arguments byeither their display name or UUID.
Operation | CLI Command | Description |
---|---|---|
Create |
| Create a Cinder volume type |
Delete |
| Delete a Cinder volume type |
List |
| List existing Cinder volume type |
Table 4.7. Cinder API Overview - Volume Type
Volume Type Extra Specs API¶
Table 4.8, “Cinder API Overview - Volume Type Extra Specs” specifiesthe valid operations that can be performed on Cinder volume type extraspecs. Please note that Cinder volume type extra specs are properties ofCinder volume types and are identified by their parent object.
Operation | CLI Command | Description |
---|---|---|
Set extra specs |
| Assign extra specs to Cinder volume type |
Unset extra specs |
| Remove extra specs from Cinder volume type |
Table 4.8. Cinder API Overview - Volume Type Extra Specs
Volume Type QoS Specs API¶
Table 4.9, “Cinder API Overview - Volume Type QoS Specs” specifies thevalid operations that can be performed on Cinder volume type QoS specs.Please note that Cinder volume type QoS specs are created independentlyof Cinder volume types and are subsequently associated with a Cindervolume type.
Operation | CLI Command | Description |
---|---|---|
Create QoS specs |
| Create a Cinder QoS Spec |
Delete QoS specs |
| Delete a Cinder QoS Spec |
List QoS specs |
| List existing Cinder QoS Specs |
Show |
| Show details about a Cinder QoS Spec |
Associate QoS specs |
| Associate a Cinder QoS Spec with a Cinder volume type |
Disassociate QoS specs |
| Disassociate a Cinder QoS Spec from a Cinder volume type |
Edit QoS spec |
| Set or unset specifications for a Cinder QoS Spec |
Table 4.9. Cinder API Overview - Volume Type QoS Specs