Add ConsistencyGroup Exceptions in tempest

The exceptions ConsistencyGroupException and
ConsistencyGroupSnapshotException are required by
cinder-tempest-plugin[1][2] when the
CG or CG Snapshot fails to create and is in error state.
These exceptions never existed as part of the original topic[3]
but failures are seen while running tests as reported in the bug.

[1] https://github.com/openstack/cinder-tempest-plugin/blob/master/cinder_tempest_plugin/services/consistencygroups_client.py#L140
[2] https://github.com/openstack/cinder-tempest-plugin/blob/master/cinder_tempest_plugin/services/consistencygroups_client.py#L172
[3] https://review.opendev.org/#/q/topic:cg-tests+(status:open+OR+status:merged)

Change-Id: I62e0ba556b884c94f6e8796a2e6f6d8083277fa4
Closes-Bug: #1858417
This commit is contained in:
Rajat Dhasmana 2020-01-06 10:44:33 +00:00
parent b637253014
commit fbea823a34
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixed bug #1858417. Adding consistency group exceptions
``ConsistencyGroupException`` and ``ConsistencyGroupSnapshotException``
that didn't exist before and caused failure in cinder-tempest-plugin.

View File

@ -280,3 +280,12 @@ class InvalidTestResource(TempestException):
class InvalidParam(TempestException):
message = ("Invalid Parameter passed: %(invalid_param)s")
class ConsistencyGroupException(TempestException):
message = "Consistency group %(cg_id)s failed and is in ERROR status"
class ConsistencyGroupSnapshotException(TempestException):
message = ("Consistency group snapshot %(cgsnapshot_id)s failed and is "
"in ERROR status")