fix pylint complaints

This commit is contained in:
Brian McQueen 2017-12-04 22:47:37 -08:00
parent c38ff74261
commit c2018c9021
No known key found for this signature in database
GPG key ID: 73EBFE56A5D07E9D

View file

@ -88,8 +88,11 @@ def get_configured_provider():
)
return configured
def map_clonemode(vm_info):
def map_clonemode(vm_info):
"""
Convert the virtualbox config file values for clone_mode into the integers the API requires
"""
mode_map = {
'state': 0,
'child': 1,
@ -109,6 +112,7 @@ def map_clonemode(vm_info):
"Illegal clonemode for virtualbox profile. Legal values are: {}".format(','.join(mode_map.keys()))
)
def create(vm_info):
"""
Creates a virtual machine from the given VM information.
@ -160,7 +164,7 @@ def create(vm_info):
)
clone_mode = map_clonemode(vm_info)
wait_for_pattern = vm_info['waitforpattern'] if 'waitforpattern' in vm_info.keys() else None
interface_index = vm_info['interfaceindex'] if 'interfaceindex' in vm_info.keys() else 0
interface_index = vm_info['interfaceindex'] if 'interfaceindex' in vm_info.keys() else 0
log.debug("Going to fire event: starting create")
__utils__['cloud.fire_event'](