def import_keypair(kwargs=None, call=None):
 with salt.utils.fopen(kwargs['file'], 'r') as public_key_filename:
  public_key_content = public_key_filename.read()
 digital_ocean_kwargs = {'name': kwargs['keyname'], 'public_key': public_key_content}
 created_result = create_key(digital_ocean_kwargs, call=call)
 return created_result

def import_keypair ( kwargs = None , call = None ) : with salt . utils . fopen ( kwargs [ 'file' ] , 'r' ) as public_key_filename : public_key_content = public_key_filename . read ( ) digital_ocean_kwargs = { 'name' : kwargs [ 'keyname' ] , 'public_key' : public_key_content } created_result = create_key ( digital_ocean_kwargs , call = call ) return created_result
import an ssh public key .