The novaclient.v2.keypairs Module

The novaclient.v2.keypairs Module

Keypair interface

class novaclient.v2.keypairs.Keypair(manager, info, loaded=False, resp=None)

Bases: novaclient.base.Resource

A keypair is a ssh key that can be injected into a server on launch.

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
  • resp – Response or list of Response objects
delete()

Delete this keypair.

Returns:An instance of novaclient.base.TupleWithMeta
id
class novaclient.v2.keypairs.KeypairManager(api)

Bases: novaclient.base.ManagerWithFind

create(*args, **kwargs)

Create a keypair

Parameters:
  • name – name for the keypair to create
  • public_key – existing public key to import
  • key_type – keypair type to create
  • user_id – user to add.
delete(*args, **kwargs)

Delete a keypair

Parameters:
  • key – The Keypair (or its ID) to delete.
  • user_id – Id of key-pair owner (Admin only).
Returns:

An instance of novaclient.base.TupleWithMeta

get(*args, **kwargs)

Get a keypair.

Parameters:
  • keypair – The ID of the keypair to get.
  • user_id – Id of key-pair owner (Admin only).
Return type:

Keypair

is_alphanum_id_allowed = True
keypair_prefix = 'os-keypairs'
list(*args, **kwargs)

Get a list of keypairs.

Parameters:
  • user_id – Id of key-pairs owner (Admin only).
  • marker – Begin returning keypairs that appear later in the keypair list than that represented by this keypair name (optional).
  • limit – maximum number of keypairs to return (optional).
resource_class

alias of Keypair

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.