Add run tests as thin provisioning

Some vendors might not have enough available space for testing features
that require creating huge volumes. So, this patch adds a new tempest
CONF `capability_thin_provisioned` that could be used to create volumes
as thin provisioned during the test execution.

Change-Id: I646f782c3e2be5ac799254f08a248a22cb9e0358
diff --git a/manila_tempest_tests/config.py b/manila_tempest_tests/config.py
index 5a9087c..bb35558 100644
--- a/manila_tempest_tests/config.py
+++ b/manila_tempest_tests/config.py
@@ -131,6 +131,16 @@
                help="Backend capability to create consistent snapshots of "
                     "share group members. Will be used with creation "
                     "of new share group types as group spec."),
+    cfg.BoolOpt("capability_thin_provisioned",
+                default=False,
+                help="Defines whether to create shares as thin provisioned, "
+                     "adding the extra spec 'thin_provisioning' as 'True' for "
+                     "setting up the custom share types. It may be useful to "
+                     "run tempest with  back end storage systems without much "
+                     "space. Take care enabling it, the manila scheduler "
+                     "capability filter will request this capability in all "
+                     "share types and the the capacity filter will allow "
+                     "oversubscription."),
     cfg.StrOpt("share_network_id",
                default="",
                help="Some backend drivers requires share network "
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 0e875c2..dd25062 100755
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -1081,6 +1081,8 @@
         extra_specs_dict = {"driver_handles_share_servers": dhss}
         if extra_specs:
             extra_specs_dict.update(extra_specs)
+        if CONF.share.capability_thin_provisioned:
+            extra_specs_dict['thin_provisioning'] = 'True'
         return extra_specs_dict
 
     @classmethod