lint fixes

This commit is contained in:
Anthony Shaw 2017-04-30 21:49:54 +10:00
parent 4fce227190
commit 7ec1d6ba83
No known key found for this signature in database
GPG Key ID: AB4A19AE1CE85744
2 changed files with 7 additions and 7 deletions

View File

@ -608,7 +608,7 @@ def copy_image(source_region, image_id, name, profile, description=None, **libcl
conn = _get_driver(profile=profile)
libcloud_kwargs = clean_kwargs(**libcloud_kwargs)
image = conn.get_image(image_id, **libcloud_kwargs)
new_image = conn.copy_image(source_region, image, name,
new_image = conn.copy_image(source_region, image, name,
description=description, **libcloud_kwargs)
return _simple_image(new_image)
@ -717,12 +717,12 @@ def import_key_pair(name, key, profile, key_type=None, **libcloud_kwargs):
conn = _get_driver(profile=profile)
libcloud_kwargs = clean_kwargs(**libcloud_kwargs)
if os.path.exists(key) or key_type == 'FILE':
return _simple_key_pair(conn.import_key_pair_from_file(name,
key,
return _simple_key_pair(conn.import_key_pair_from_file(name,
key,
**libcloud_kwargs))
else:
return _simple_key_pair(conn.import_key_pair_from_string(name,
key,
return _simple_key_pair(conn.import_key_pair_from_string(name,
key,
**libcloud_kwargs))

View File

@ -76,7 +76,7 @@ class MockComputeDriver(BaseDriver):
'ex_key': 'ex_value'
}
)
def list_nodes(self):
return [self._TEST_NODE]
@ -301,7 +301,7 @@ class LibcloudComputeModuleTestCase(TestCase, LoaderModuleMockMixin):
def test_create_volume(self):
volume = libcloud_compute.create_volume(9000, 'test_new_volume', 'test')
self._validate_volume(volume)
def test_create_volume_in_location(self):
volume = libcloud_compute.create_volume(9000, 'test_new_volume', 'test', location_id='test_location')
self._validate_volume(volume)