Stop testing volume v2 APIs

Cinder decided to remove the v2 APIs[1] in Xena cycle, so
in Tempest we need to modify the tempest-cinder-v2-api job
to run against stable wallaby which is last release where
volume v2 APIs are present.

Also ad deprecation warning at v2 service clients module level
import so that we can remove them once Tempest stop supporting
stable wallaby.

NOTE: we do not need to adjust any tests as we already moved all
the Tempest tests to volume v3 APIs.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/791842

[1] https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Removing_the_Block_Storage_API_v2

Change-Id: I98339f67239cf96d26aa4fa87df692139b36673d
diff --git a/releasenotes/notes/deprecate-volume-v2-service-clients-ff8a2a7be1797eb5.yaml b/releasenotes/notes/deprecate-volume-v2-service-clients-ff8a2a7be1797eb5.yaml
new file mode 100644
index 0000000..de05679
--- /dev/null
+++ b/releasenotes/notes/deprecate-volume-v2-service-clients-ff8a2a7be1797eb5.yaml
@@ -0,0 +1,6 @@
+---
+deprecations:
+  - |
+    Tempest service clients for volume v2 APIs (tempest.lib.services.volume.v2 module)
+    is deprecated and will be removed once Tempest stop supporting stable wallaby release
+    which is last release volume v2 APIs are present in cinder.
diff --git a/tempest/lib/services/volume/v2/__init__.py b/tempest/lib/services/volume/v2/__init__.py
index 68982d9..756a41a 100644
--- a/tempest/lib/services/volume/v2/__init__.py
+++ b/tempest/lib/services/volume/v2/__init__.py
@@ -12,6 +12,8 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
+import warnings
+
 from tempest.lib.services.volume.v2.availability_zone_client \
     import AvailabilityZoneClient
 from tempest.lib.services.volume.v2.backups_client import BackupsClient
@@ -44,3 +46,9 @@
            'LimitsClient', 'CapabilitiesClient', 'SchedulerStatsClient',
            'SnapshotManageClient', 'VolumeManageClient', 'TransfersClient',
            'QuotaClassesClient']
+
+warnings.warn(
+    "The tempest.lib.services.volume.v2 module (volume v2 APIs service "
+    "clients) is deprecated in favor of tempest.lib.services.volume.v3 "
+    "(volume v3 APIs service clients) and will be removed once Tempest stop "
+    "supporting stable wallaby.", DeprecationWarning)
diff --git a/zuul.d/integrated-gate.yaml b/zuul.d/integrated-gate.yaml
index b83eb34..d931c55 100644
--- a/zuul.d/integrated-gate.yaml
+++ b/zuul.d/integrated-gate.yaml
@@ -408,8 +408,9 @@
 - job:
     name: tempest-cinder-v2-api
     parent: devstack-tempest
-    branches:
-      - master
+    # NOTE(gmann): Cinder v2 APIs are available until
+    # stable/wallaby only.
+    override-checkout: stable/wallaby
     description: |
       This job runs the cinder API test against v2 endpoint.
     vars: