coraid: fix snapshot deletion
Currently, a request to ESM API for a snapshot deletion looks this way: {'addr': 'cms', 'data': { 'repoName': repository_name, 'lvName': snapshot_name}, 'op': 'orchStrLunMods', 'args': 'delClSnap'} This is correct, however, some versions of the ESM API have a bug that prevents it from validation this valid request and it fails with: Must define the new LV name to be assigned to the clone/clSnap. As a workaround for this bug, provide an 'newLvName' property with a 'noop' value to make the validation pass even on buggy versions. Fixes bug #1365417 Change-Id: I3fd7f3c6a64cac992735b098368b52b9ab21d85c
This commit is contained in:
parent
eb01ccba28
commit
b39446b46b
|
@ -489,7 +489,8 @@ class CoraidDriverIntegrationalTestCase(CoraidDriverLoginSuccessTestCase):
|
||||||
delete_snapshot_request = {'addr': 'cms',
|
delete_snapshot_request = {'addr': 'cms',
|
||||||
'data': {
|
'data': {
|
||||||
'repoName': fake_repository_name,
|
'repoName': fake_repository_name,
|
||||||
'lvName': fake_snapshot_name},
|
'lvName': fake_snapshot_name,
|
||||||
|
'newLvName': 'noop'},
|
||||||
'op': 'orchStrLunMods',
|
'op': 'orchStrLunMods',
|
||||||
'args': 'delClSnap'}
|
'args': 'delClSnap'}
|
||||||
pack_data(delete_snapshot_request)
|
pack_data(delete_snapshot_request)
|
||||||
|
|
|
@ -353,7 +353,12 @@ class CoraidAppliance(object):
|
||||||
request = {'addr': 'cms',
|
request = {'addr': 'cms',
|
||||||
'data': {
|
'data': {
|
||||||
'repoName': repository_name,
|
'repoName': repository_name,
|
||||||
'lvName': snapshot_name},
|
'lvName': snapshot_name,
|
||||||
|
# NOTE(novel): technically, the 'newLvName' is not
|
||||||
|
# required for 'delClSnap' command. However, some
|
||||||
|
# versions of ESM have a bug that fails validation
|
||||||
|
# if we don't specify that. Hence, this fake value.
|
||||||
|
'newLvName': "noop"},
|
||||||
'op': 'orchStrLunMods',
|
'op': 'orchStrLunMods',
|
||||||
'args': 'delClSnap'}
|
'args': 'delClSnap'}
|
||||||
esm_result = self.esm_command(request)
|
esm_result = self.esm_command(request)
|
||||||
|
|
Loading…
Reference in New Issue