Merge "Fix 'ref' format errors in README file"
diff --git a/releasenotes/notes/deprecate-volume-api-selection-config-options-b95c5c0ccbf38916.yaml b/releasenotes/notes/deprecate-volume-api-selection-config-options-b95c5c0ccbf38916.yaml
new file mode 100644
index 0000000..1bea6d0
--- /dev/null
+++ b/releasenotes/notes/deprecate-volume-api-selection-config-options-b95c5c0ccbf38916.yaml
@@ -0,0 +1,19 @@
+---
+deprecations:
+  - |
+    The v2 volume API has been deprecated since Pike release.
+    Volume v3 API is current and Tempest volume tests can
+    be run against v2 or v3 API based on config option
+    ``CONF.volume.catalog_type``. If catalog_type is ``volumev2``, then
+    all the volume tests will run against v2 API. If catalog_type is
+    ``volumev3`` which is default in Tempest, then all the volume
+    tests will run against v3 API.
+    That makes below config options unusable in Tempest which used to
+    select the target volume API for volume tests.
+
+    * ``CONF.volume-feature-enabled.api_v2``
+    * ``CONF.volume-feature-enabled.api_v3``
+
+    Tempest deprecate the above two config options in Rocky release
+    and will be removed in future. Alternatively ``CONF.volume.catalog_type``
+    can be used to run the Tempest against volume v2 or v3 API.
diff --git a/releasenotes/notes/tempest-rocky-release-0fc3312053923380.yaml b/releasenotes/notes/tempest-rocky-release-0fc3312053923380.yaml
new file mode 100644
index 0000000..e9c77a6
--- /dev/null
+++ b/releasenotes/notes/tempest-rocky-release-0fc3312053923380.yaml
@@ -0,0 +1,16 @@
+---
+prelude: >
+    This release is to tag the Tempest for OpenStack Rocky release.
+    After this release, Tempest will support below OpenStack Releases:
+
+      * Rocky
+      * Queens
+      * Pike
+      * Ocata
+
+    Current development of Tempest is for OpenStack Stein development
+    cycle. Every Tempest commit is also tested against master during
+    the Stein cycle. However, this does not necessarily mean that using
+    Tempest as of this tag will work against a Stein (or future release)
+    cloud.
+    To be on safe side, use this tag to test the OpenStack Rocky release.
\ No newline at end of file
diff --git a/tempest/config.py b/tempest/config.py
index cc0ba34..0f3fa54 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -845,10 +845,29 @@
                                   "removed."),
     cfg.BoolOpt('api_v2',
                 default=True,
-                help="Is the v2 volume API enabled"),
+                help="Is the v2 volume API enabled",
+                deprecated_for_removal=True,
+                deprecated_reason="The v2 volume API has been deprecated "
+                                  "since Pike release. Now Tempest run all "
+                                  "the volume tests against v2 or v3 API "
+                                  "based on CONF.volume.catalog_type which "
+                                  "makes this config option unusable. If "
+                                  "catalog_type is volumev2, then all the "
+                                  "volume tests will run against v2 API. "
+                                  "Use ``CONF.volume.catalog_type`` to run "
+                                  "the Tempest against volume v2 or v3 API"),
     cfg.BoolOpt('api_v3',
                 default=True,
-                help="Is the v3 volume API enabled"),
+                help="Is the v3 volume API enabled",
+                deprecated_for_removal=True,
+                deprecated_reason="Tempest run all the volume tests against "
+                                  "v2 or v3 API based on "
+                                  "CONF.volume.catalog_type which makes this "
+                                  "config option unusable. If catalog_type is "
+                                  "volumev3 which is default, then all the "
+                                  "volume tests will run against v3 API. "
+                                  "Use ``CONF.volume.catalog_type`` to run "
+                                  "the Tempest against volume v2 or v3 API"),
     cfg.BoolOpt('extend_attached_volume',
                 default=False,
                 help='Does the cloud support extending the size of a volume '
diff --git a/tempest/lib/api_schema/response/compute/v2_53/services.py b/tempest/lib/api_schema/response/compute/v2_53/services.py
index aa132a9..97b0c72 100644
--- a/tempest/lib/api_schema/response/compute/v2_53/services.py
+++ b/tempest/lib/api_schema/response/compute/v2_53/services.py
@@ -42,7 +42,8 @@
                 'properties': {
                     'id': {'type': 'string', 'format': 'uuid'},
                     'binary': {'type': 'string'},
-                    'disabled_reason': {'type': 'string'},
+                    # disabled_reason can be null when status is enabled.
+                    'disabled_reason': {'type': ['string', 'null']},
                     'host': {'type': 'string'},
                     'state': {'type': 'string'},
                     'status': {'type': 'string'},
diff --git a/tempest/lib/services/volume/v3/backups_client.py b/tempest/lib/services/volume/v3/backups_client.py
index 10538b0..f2d2d21 100644
--- a/tempest/lib/services/volume/v3/backups_client.py
+++ b/tempest/lib/services/volume/v3/backups_client.py
@@ -23,7 +23,6 @@
 
 class BackupsClient(base_client.BaseClient):
     """Volume V3 Backups client"""
-    api_version = "v3"
 
     def create_backup(self, **kwargs):
         """Creates a backup of volume.
diff --git a/tempest/lib/services/volume/v3/base_client.py b/tempest/lib/services/volume/v3/base_client.py
index e78380b..617da2e 100644
--- a/tempest/lib/services/volume/v3/base_client.py
+++ b/tempest/lib/services/volume/v3/base_client.py
@@ -20,4 +20,3 @@
 
 BaseClient = moves.moved_class(base_client.BaseClient, 'BaseClient', __name__,
                                version="Pike", removal_version='?')
-BaseClient.api_version = 'v3'
diff --git a/tempest/lib/services/volume/v3/group_snapshots_client.py b/tempest/lib/services/volume/v3/group_snapshots_client.py
index 6e53e3e..16412d3 100644
--- a/tempest/lib/services/volume/v3/group_snapshots_client.py
+++ b/tempest/lib/services/volume/v3/group_snapshots_client.py
@@ -23,7 +23,6 @@
 
 class GroupSnapshotsClient(base_client.BaseClient):
     """Client class to send CRUD Volume Group Snapshot API requests"""
-    api_version = 'v3'
 
     def create_group_snapshot(self, **kwargs):
         """Creates a group snapshot.
diff --git a/tempest/lib/services/volume/v3/group_types_client.py b/tempest/lib/services/volume/v3/group_types_client.py
index ecbcba1..1ccb9f8 100644
--- a/tempest/lib/services/volume/v3/group_types_client.py
+++ b/tempest/lib/services/volume/v3/group_types_client.py
@@ -22,7 +22,6 @@
 
 class GroupTypesClient(base_client.BaseClient):
     """Client class to send CRUD Volume V3 Group Types API requests"""
-    api_version = 'v3'
 
     @property
     def resource_type(self):
diff --git a/tempest/lib/services/volume/v3/groups_client.py b/tempest/lib/services/volume/v3/groups_client.py
index e2e477d..3cf1e6a 100644
--- a/tempest/lib/services/volume/v3/groups_client.py
+++ b/tempest/lib/services/volume/v3/groups_client.py
@@ -23,7 +23,6 @@
 
 class GroupsClient(base_client.BaseClient):
     """Client class to send CRUD Volume Group API requests"""
-    api_version = 'v3'
 
     def create_group(self, **kwargs):
         """Creates a group.
diff --git a/tempest/lib/services/volume/v3/messages_client.py b/tempest/lib/services/volume/v3/messages_client.py
index 0127271..47538cd 100644
--- a/tempest/lib/services/volume/v3/messages_client.py
+++ b/tempest/lib/services/volume/v3/messages_client.py
@@ -22,7 +22,6 @@
 
 class MessagesClient(base_client.BaseClient):
     """Client class to send user messages API requests."""
-    api_version = 'v3'
 
     def show_message(self, message_id):
         """Show details for a single message."""
diff --git a/tempest/lib/services/volume/v3/snapshots_client.py b/tempest/lib/services/volume/v3/snapshots_client.py
index 08e6c94..0cb5e54 100644
--- a/tempest/lib/services/volume/v3/snapshots_client.py
+++ b/tempest/lib/services/volume/v3/snapshots_client.py
@@ -22,7 +22,6 @@
 
 class SnapshotsClient(rest_client.RestClient):
     """Client class to send CRUD Volume Snapshot V3 API requests."""
-    api_version = "v3"
     create_resp = 202
 
     def list_snapshots(self, detail=False, **params):
diff --git a/tempest/lib/services/volume/v3/versions_client.py b/tempest/lib/services/volume/v3/versions_client.py
index 5702f95..57629bd 100644
--- a/tempest/lib/services/volume/v3/versions_client.py
+++ b/tempest/lib/services/volume/v3/versions_client.py
@@ -22,7 +22,6 @@
 
 
 class VersionsClient(base_client.BaseClient):
-    api_version = 'v3'
 
     def list_versions(self):
         """List API versions
diff --git a/tempest/lib/services/volume/v3/volumes_client.py b/tempest/lib/services/volume/v3/volumes_client.py
index a1185c4..11c5767 100644
--- a/tempest/lib/services/volume/v3/volumes_client.py
+++ b/tempest/lib/services/volume/v3/volumes_client.py
@@ -24,7 +24,6 @@
 
 class VolumesClient(base_client.BaseClient):
     """Client class to send CRUD Volume V3 API requests"""
-    api_version = "v3"
 
     def _prepare_params(self, params):
         """Prepares params for use in get or _ext_get methods.