From fbea823a342c0060693a6880be3d8aad670b3ea8 Mon Sep 17 00:00:00 2001 From: Rajat Dhasmana Date: Mon, 6 Jan 2020 10:44:33 +0000 Subject: [PATCH] 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 --- ...dd-consistency-group-exceptions-01cbb792cd710231.yaml | 6 ++++++ tempest/lib/exceptions.py | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/add-consistency-group-exceptions-01cbb792cd710231.yaml diff --git a/releasenotes/notes/add-consistency-group-exceptions-01cbb792cd710231.yaml b/releasenotes/notes/add-consistency-group-exceptions-01cbb792cd710231.yaml new file mode 100644 index 0000000000..e879c2cd05 --- /dev/null +++ b/releasenotes/notes/add-consistency-group-exceptions-01cbb792cd710231.yaml @@ -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. diff --git a/tempest/lib/exceptions.py b/tempest/lib/exceptions.py index 13af890510..b25b4b2e0d 100644 --- a/tempest/lib/exceptions.py +++ b/tempest/lib/exceptions.py @@ -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")