block_device: introduce helper function to check swap or ephemeral device
and move generic function, mappings_prepend_dev() from ec2utils to block_device
This commit is contained in:
@@ -187,7 +187,7 @@ class Ec2utilsTestCase(test.TestCase):
|
|||||||
'device': '/dev/sdc1'},
|
'device': '/dev/sdc1'},
|
||||||
{'virtual': 'ephemeral1',
|
{'virtual': 'ephemeral1',
|
||||||
'device': '/dev/sdc1'}]
|
'device': '/dev/sdc1'}]
|
||||||
self.assertDictListMatch(ec2utils.mappings_prepend_dev(mappings),
|
self.assertDictListMatch(block_device.mappings_prepend_dev(mappings),
|
||||||
expected_result)
|
expected_result)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user