Add create_share_from_snapshot_support extra spec

The snapshot_support extra spec has always meant two
things: a driver can take snapshots and create shares
from snapshots. As we add alternate snapshot semantics,
it is likely that some drivers will want to support
snapshots and some of the new semantics while being
unable to create new shares from snapshots.

This work adds a new extra spec,
create_share_from_snapshot_support, that removes the
overloading on snapshot_support. It also makes the
existing snapshot_support extra spec optional,
allowing admins to create types without setting
snapshot_support; shares created with such types
will not support snapshots.

APIImpact
DocImpact

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>
Implements: blueprint add-create-share-from-snapshot-extra-spec
Change-Id: Ib0ad5fbfdf6297665c208149b08c8d21b3c232be
diff --git a/manila_tempest_tests/tests/api/base.py b/manila_tempest_tests/tests/api/base.py
index 7bb727d..dcf0bed 100644
--- a/manila_tempest_tests/tests/api/base.py
+++ b/manila_tempest_tests/tests/api/base.py
@@ -727,17 +727,30 @@
         return share_type
 
     @staticmethod
-    def add_required_extra_specs_to_dict(extra_specs=None):
+    def add_extra_specs_to_dict(extra_specs=None):
+        """Add any required extra-specs to share type dictionary"""
         dhss = six.text_type(CONF.share.multitenancy_enabled)
         snapshot_support = six.text_type(
             CONF.share.capability_snapshot_support)
-        required = {
+        create_from_snapshot_support = six.text_type(
+            CONF.share.capability_create_share_from_snapshot_support)
+
+        extra_specs_dict = {
             "driver_handles_share_servers": dhss,
-            "snapshot_support": snapshot_support,
         }
+
+        optional = {
+            "snapshot_support": snapshot_support,
+            "create_share_from_snapshot_support": create_from_snapshot_support,
+        }
+        # NOTE(gouthamr): In micro-versions < 2.24, snapshot_support is a
+        # required extra-spec
+        extra_specs_dict.update(optional)
+
         if extra_specs:
-            required.update(extra_specs)
-        return required
+            extra_specs_dict.update(extra_specs)
+
+        return extra_specs_dict
 
     @classmethod
     def clear_isolated_creds(cls, creds=None):