This section describes some of the most commonly used Cinder API calls and their corresponding CLI commands. It is not meant to be a comprehensive list that is representative of all functionality present in Cinder; for more information, please refer to the OpenStack Configuration Reference.
Note
Block Storage V2 API has been deprecated. To ensure Cinder does not
use the V2 API, update enable_v2_api=false
and enable_v3_api=true
in your cinder.conf file.
Table 4.2, “Cinder API Overview - Volume” specifies the valid operations that can be performed on Cinder volumes. Please note that Cinder volumes are identified as CLI command arguments by either their names 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 host (specified by name). From Xena release, can be performed using the storage approach, becoming faster and non-disruptive within a same SVM. On NFS drivers is always disruptive. |
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 available in microversion 3.40. From Xena release, this command is performed using the storage with a safer and faster approach. |
Table 4.2. Cinder API Overview - Volume
Table 4.3, “Cinder API Overview - Snapshot” specifies the valid operations that can be performed on Cinder snapshots. Please note that Cinder snapshots are identified as CLI command arguments by either their display 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
Table 4.4, “Cinder API Overview - Consistency Groups” specifies the valid operations that can be performed on Cinder consistency groups. Please note that Cinder consistency groups and cgsnapshots are identified as CLI command arguments by either their display name or UUID. Consistency group operations support has been deprecated in Block Storage V3 API. Only Block Storage V2 API supports consistency groups. Future releases will involve a migration of existing consistency 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
Table 4.5, “Cinder API Overview - Backup” specifies the valid operations that can be performed on Cinder backups. Please note that Cinder backups are identified as CLI command arguments by either their display 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
Table 4.6, “Cinder API Overview - Group” specifies the valid operations that can be performed on Cinder groups. Please note that Cinder groups are identified as CLI command arguments by either their display name or UUID.
Note
Currently only the Block Storage V3 API supports group operations. The
minimum version for group operations supported by the ONTAP drivers is
3.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 operations to group operations in an upcoming release. Please review Cinder release notes for upgrade instructions prior to using group operations.
Note
The ONTAP volume drivers support the consistent_group_snapshot_enabled
group type. By default Cinder group snapshots take individual snapshots
of each Cinder volume in the group. To enable consistency group snapshots set
consistent_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 snapshot
operations 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
Table 4.7, “Cinder API Overview - Volume Type” specifies the valid operations that can be performed on Cinder volume types. Please note that Cinder volume types are identified as CLI command arguments by either 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
Table 4.8, “Cinder API Overview - Volume Type Extra Specs” specifies the valid operations that can be performed on Cinder volume type extra specs. Please note that Cinder volume type extra specs are properties of Cinder 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
Table 4.9, “Cinder API Overview - Volume Type QoS Specs” specifies the valid operations that can be performed on Cinder volume type QoS specs. Please note that Cinder volume type QoS specs are created independently of Cinder volume types and are subsequently associated with a Cinder volume 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
This document is licensed under Apache 2.0 license.