pycloudlib.key module

Base Key Class.

class pycloudlib.key.KeyPair(public_key_path, private_key_path=None, name=None)[source]

Bases: object

Key Class.

__init__(public_key_path, private_key_path=None, name=None)[source]

Initialize key class to generate key or reuse existing key.

The public key path is given then the key is stored and the private key is assumed to be named the same minus ‘.pub’ otherwise the user should also specify the private key path.

Parameters:
  • public_key_path – Path to public key
  • private_key_path – Path to private key
  • name – Name to reference key by in clouds
public_key_content

Read the contents of the public key.

Returns:output of public key