mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
lint fixes
This commit is contained in:
parent
4fce227190
commit
7ec1d6ba83
@ -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))
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user