diff --git a/manila_ui/api/manila.py b/manila_ui/api/manila.py index a24d0e68..a40e1dde 100644 --- a/manila_ui/api/manila.py +++ b/manila_ui/api/manila.py @@ -397,11 +397,10 @@ def share_type_get(request, share_type_id): def share_type_create(request, name, spec_driver_handles_share_servers, - spec_snapshot_support=True, is_public=True): + is_public=True): return manilaclient(request).share_types.create( name=name, spec_driver_handles_share_servers=spec_driver_handles_share_servers, - spec_snapshot_support=spec_snapshot_support, is_public=is_public) diff --git a/manila_ui/tests/api/test_manila.py b/manila_ui/tests/api/test_manila.py index f8839f9d..e78c21bb 100644 --- a/manila_ui/tests/api/test_manila.py +++ b/manila_ui/tests/api/test_manila.py @@ -124,31 +124,25 @@ class ManilaApiTests(base.APITestCase): self.manilaclient.share_types.create.assert_called_once_with( name=name, spec_driver_handles_share_servers=dhss, - spec_snapshot_support=True, is_public=True) @ddt.data( - (True, True, True), - (True, True, False), - (True, False, True), - (False, True, True), - (True, False, False), - (False, False, True), - (False, True, False), - (True, True, True), + (True, True), + (False, True), + (True, False), + (False, False), ) @ddt.unpack def test_share_type_create_with_custom_values( - self, dhss, snapshot_support, is_public): + self, dhss, is_public): name = 'fake_share_type_name' api.share_type_create( - self.request, name, dhss, snapshot_support, is_public) + self.request, name, dhss, is_public) self.manilaclient.share_types.create.assert_called_once_with( name=name, spec_driver_handles_share_servers=dhss, - spec_snapshot_support=snapshot_support, is_public=is_public) def test_share_type_set_extra_specs(self): diff --git a/manila_ui/tests/dashboards/admin/share_types/test_forms.py b/manila_ui/tests/dashboards/admin/share_types/test_forms.py index 49509892..7ba760a0 100644 --- a/manila_ui/tests/dashboards/admin/share_types/test_forms.py +++ b/manila_ui/tests/dashboards/admin/share_types/test_forms.py @@ -188,7 +188,6 @@ class ManilaDashboardsAdminSharesCreateShareTypeFormTests(base.APITestCase): self.manilaclient.share_types.create.assert_called_once_with( name=data['name'], spec_driver_handles_share_servers='true', - spec_snapshot_support=True, is_public=data["is_public"]) mock_horizon_messages_success.assert_called_once_with( self.request, mock.ANY) @@ -212,7 +211,6 @@ class ManilaDashboardsAdminSharesCreateShareTypeFormTests(base.APITestCase): self.manilaclient.share_types.create.assert_called_once_with( name=data['name'], spec_driver_handles_share_servers='true', - spec_snapshot_support=True, is_public=data["is_public"]) mock_horizon_messages_success.assert_called_once_with( self.request, mock.ANY) @@ -248,7 +246,6 @@ class ManilaDashboardsAdminSharesCreateShareTypeFormTests(base.APITestCase): self.manilaclient.share_types.create.assert_called_once_with( name=data['name'], spec_driver_handles_share_servers='true', - spec_snapshot_support=True, is_public=enable_public_share_type_creation) mock_horizon_messages_success.assert_called_once_with( self.request, mock.ANY) diff --git a/releasenotes/notes/bug-1685655-drop-snapshot-support-param-a4e7c7ee068c8bc9.yaml b/releasenotes/notes/bug-1685655-drop-snapshot-support-param-a4e7c7ee068c8bc9.yaml new file mode 100644 index 00000000..d233934c --- /dev/null +++ b/releasenotes/notes/bug-1685655-drop-snapshot-support-param-a4e7c7ee068c8bc9.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + "snapshot_support" is no longer automatically included as an extra-spec + in share types created via manila-ui. If the share type has to match backends + that support snapshots, explicitly specify "snapshot_support" in the + "Extra specs" field while creating share types. + This change does not modify pre-existing share types.