openstack.compute.v2.keypair

openstack.compute.v2.keypair

The Keypair Class

The Keypair class inherits from Resource.

class openstack.compute.v2.keypair.Keypair(_synchronized=False, **attrs)

The base resource

Parameters:_synchronized (bool) – This is not intended to be used directly. See new() and existing().
fingerprint = None

The short fingerprint associated with the public_key for this keypair.

id = None

The id identifying the keypair

name = None

A name identifying the keypair

private_key = None

The private key for the keypair

public_key = None

The SSH public key that is paired with the server.

classmethod list(session, paginated=False)

This method is a generator which yields resource objects.

This resource object list generator handles pagination and takes query params for response filtering.

Parameters:
  • session (Adapter) – The session to use for making this request.
  • paginated (bool) – True if a GET to this resource returns a paginated series of responses, or False if a GET returns only one page of data. When paginated is False only one page of data will be returned regardless of the API’s support of pagination.
  • params (dict) – These keyword arguments are passed through the _transpose() method to find if any of them match expected query parameters to be sent in the params argument to get(). They are additionally checked against the base_path format string to see if any path fragments need to be filled in by the contents of this argument.
Returns:

A generator of Resource objects.

Raises:

MethodNotSupported if Resource.allow_list is not set to True.

Raises:

InvalidResourceQuery if query contains invalid params.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.