Merge "Set CONF.image_feature_enabled.api_v1 default to False"
diff --git a/releasenotes/notes/config-image-api-v1-default-to-false-39d5f2xafc534ab1.yaml b/releasenotes/notes/config-image-api-v1-default-to-false-39d5f2xafc534ab1.yaml
new file mode 100644
index 0000000..5efa4a9
--- /dev/null
+++ b/releasenotes/notes/config-image-api-v1-default-to-false-39d5f2xafc534ab1.yaml
@@ -0,0 +1,7 @@
+---
+upgrade:
+  - |
+    Changed the default value of 'api_v1' config option in the
+    'image-feature-enabled' group to False from True, because
+    glance v1 APIs are deprecated. Please set True explicitly
+    on the option if still testing glance v1 APIs.
diff --git a/tempest/config.py b/tempest/config.py
index 810e7f4..e08ac4c 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -547,7 +547,7 @@
                                   'test v2 APIs only so this config option '
                                   'will be removed.'),
     cfg.BoolOpt('api_v1',
-                default=True,
+                default=False,
                 help="Is the v1 image API enabled",
                 deprecated_for_removal=True,
                 deprecated_reason='Glance v1 APIs are deprecated and v2 APIs '
diff --git a/tempest/tests/cmd/test_verify_tempest_config.py b/tempest/tests/cmd/test_verify_tempest_config.py
index c260343..023703e 100644
--- a/tempest/tests/cmd/test_verify_tempest_config.py
+++ b/tempest/tests/cmd/test_verify_tempest_config.py
@@ -234,8 +234,8 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
-                                           False, True)
+        print_mock.assert_called_with('api_v2', 'image-feature-enabled',
+                                      False, True)
 
     def test_verify_glance_version_no_v2_with_v1_0(self):
         # This test verifies that wrong config api_v2 = True is detected
@@ -250,8 +250,8 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v2', 'image-feature-enabled',
-                                           False, True)
+        print_mock.assert_called_with('api_v2', 'image-feature-enabled',
+                                      False, True)
 
     def test_verify_glance_version_no_v1(self):
         # This test verifies that wrong config api_v1 = True is detected
@@ -271,8 +271,7 @@
         with mock.patch.object(verify_tempest_config,
                                'print_and_or_update') as print_mock:
             verify_tempest_config.verify_glance_api_versions(fake_os, True)
-        print_mock.assert_called_once_with('api_v1', 'image-feature-enabled',
-                                           False, True)
+        print_mock.assert_not_called()
 
     def test_verify_glance_version_no_version(self):
         # This test verifies that wrong config api_v1 = True is detected