Browse Source

Merge "Fix fallback share group snapshot implementation" into stable/train

changes/92/744092/1
Zuul 5 days ago
committed by Gerrit Code Review
parent
commit
d81a8b2802
3 changed files with 34 additions and 0 deletions
  1. +8
    -0
      manila/share/driver.py
  2. +20
    -0
      manila/tests/share/test_driver.py
  3. +6
    -0
      releasenotes/notes/bug-1888905-fix-group-snapshot-create-delete-0595f9d7a4c0c343.yaml

+ 8
- 0
manila/share/driver.py View File

@@ -1477,6 +1477,8 @@ class ShareDriver(object):
'share': <models.Share>,
'updated_at': datetime.datetime(2015, 8, 10, 0, 5, 58),
'share_proto': 'NFS',
'share_name': 'share_some_fake_uuid',
'name': 'share-snapshot-some_fake_uuid',
'project_id': '13c0be6290934bd98596cfa004650049',
'share_group_snapshot_id': 'some_fake_uuid',
'deleted_at': None,
@@ -1519,6 +1521,8 @@ class ShareDriver(object):
'share_instance_id': member['share']['id'],
'id': member['id'],
'share': member['share'],
'share_name': member['share_name'],
'name': member['name'],
'size': member['share']['size'],
'share_size': member['share']['size'],
'share_proto': member['share']['share_proto'],
@@ -1581,6 +1585,8 @@ class ShareDriver(object):
'share': <models.Share>,
'updated_at': datetime.datetime(2015, 8, 10, 0, 5, 58),
'share_proto': 'NFS',
'share_name':'share_some_fake_uuid',
'name': 'share-snapshot-some_fake_uuid',
'project_id': '13c0be6290934bd98596cfa004650049',
'share_group_snapshot_id': 'some_fake_uuid',
'deleted_at': None,
@@ -1608,6 +1614,8 @@ class ShareDriver(object):
'id': member['id'],
'share': member['share'],
'size': member['share']['size'],
'share_name': member['share_name'],
'name': member['name'],
'share_size': member['share']['size'],
'share_proto': member['share']['share_proto'],
'provider_location': member['provider_location'],


+ 20
- 0
manila/tests/share/test_driver.py View File

@@ -809,6 +809,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_1',
'provider_location': 'should_not_be_used_1',
'share_name': 'share_fake_share_instance_id_1',
'name': 'share-snapshot-6813e06b-a8f5-4784-b17d-f3e91afa370e',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': 3,
@@ -821,6 +823,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_2',
'provider_location': 'should_not_be_used_2',
'share_name': 'share_fake_share_instance_id_2',
'name': 'share-snapshot-1e010dfe-545b-432d-ab95-4ef03cd82f89',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': '2',
@@ -859,6 +863,8 @@ class ShareDriverTestCase(test.TestCase):
'share_instance_id': member['share']['id'],
'id': member['id'],
'share': member['share'],
'share_name': member['share_name'],
'name': member['name'],
'size': member['share']['size'],
'share_size': member['share']['size'],
'share_proto': member['share']['share_proto'],
@@ -881,6 +887,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_1',
'provider_location': 'should_not_be_used_1',
'share_name': 'share_fake_share_instance_id_1',
'name': 'share-snapshot-6813e06b-a8f5-4784-b17d-f3e91afa370e',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': 3,
@@ -893,6 +901,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_2',
'provider_location': 'should_not_be_used_2',
'share_name': 'share_fake_share_instance_id_2',
'name': 'share-snapshot-1e010dfe-545b-432d-ab95-4ef03cd82f89',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': '2',
@@ -932,6 +942,8 @@ class ShareDriverTestCase(test.TestCase):
'share_instance_id': fake_snap_member_1['share']['id'],
'id': fake_snap_member_1['id'],
'share': fake_snap_member_1['share'],
'share_name': fake_snap_member_1['share_name'],
'name': fake_snap_member_1['name'],
'size': fake_snap_member_1['share']['size'],
'share_size': fake_snap_member_1['share']['size'],
'share_proto': fake_snap_member_1['share']['share_proto'],
@@ -945,6 +957,8 @@ class ShareDriverTestCase(test.TestCase):
'share_instance_id': member['share']['id'],
'id': member['id'],
'share': member['share'],
'share_name': member['share_name'],
'name': member['name'],
'size': member['share']['size'],
'share_size': member['share']['size'],
'share_proto': member['share']['share_proto'],
@@ -1020,6 +1034,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_1',
'provider_location': 'fake_provider_location_2',
'share_name': 'share_fake_share_instance_id_1',
'name': 'share-snapshot-6813e06b-a8f5-4784-b17d-f3e91afa370e',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': 3,
@@ -1032,6 +1048,8 @@ class ShareDriverTestCase(test.TestCase):
'share_group_snapshot_id': 'fake_share_group_snapshot_id',
'share_instance_id': 'fake_share_instance_id_2',
'provider_location': 'fake_provider_location_2',
'share_name': 'share_fake_provider_location_2',
'name': 'share-snapshot-1e010dfe-545b-432d-ab95-4ef03cd82f89',
'share': {
'id': '420f978b-dbf6-4b3c-92fe-f5b17a0bb5e2',
'size': '2',
@@ -1070,6 +1088,8 @@ class ShareDriverTestCase(test.TestCase):
'share': member['share'],
'size': member['share']['size'],
'share_size': member['share']['size'],
'share_name': member['share_name'],
'name': member['name'],
'share_proto': member['share']['share_proto'],
'provider_location': member['provider_location']},
share_server=None)


+ 6
- 0
releasenotes/notes/bug-1888905-fix-group-snapshot-create-delete-0595f9d7a4c0c343.yaml View File

@@ -0,0 +1,6 @@
---
fixes:
- |
An error with share group snapshot creation and deletion due to missing
attributes has been fixed. See `Launchpad bug 1888905
<https://launchpad.net/bugs/1888905>`_ for more information.

Loading…
Cancel
Save