Merge "Skip setting volume_size if not given"

This commit is contained in:
Jenkins 2013-07-23 01:01:32 +00:00 committed by Gerrit Code Review
commit 58d436ed88
2 changed files with 2 additions and 2 deletions
novaclient
tests/v1_1
v1_1

@ -275,7 +275,6 @@ class ShellTest(utils.TestCase):
'name': 'some-server',
'block_device_mapping': [
{
'volume_size': '',
'volume_id': 'blah',
'delete_on_termination': '0',
'device_name': 'vda'

@ -139,7 +139,8 @@ class BootingManagerWithFind(base.ManagerWithFind):
else:
bdm_dict['volume_id'] = id
if len(mapping_parts) > 2:
bdm_dict['volume_size'] = mapping_parts[2]
if mapping_parts[2]:
bdm_dict['volume_size'] = str(int(mapping_parts[2]))
if len(mapping_parts) > 3:
bdm_dict['delete_on_termination'] = mapping_parts[3]
bdm.append(bdm_dict)