Class: OpenStack::Nova::Compute::KeyPair

Inherits:
Base show all
Defined in:
lib/open_stack/nova/compute/key_pair.rb

Overview

An OpenStack KeyPair

Attributes

  • name - Bridge name for this network

  • public_key - Public key

  • private_key - Private key (write only)

  • fingerprint - The fingerprint for this keypair

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

site, site=

Methods inherited from Common

collection_path, custom_method_collection_url, element_path

Methods inherited from Base

headers

Methods inherited from ActiveResource::Base

#load

Class Method Details

.find_all_by_name(name) ⇒ Object

The list of keypair with a given name

Attributes

  • name - A keypairs name



48
49
50
# File 'lib/open_stack/nova/compute/key_pair.rb', line 48

def self.find_all_by_name(name)
  all.reject! { |key_pair| key_pair.name != name }
end

.find_by_name(name) ⇒ Object

The first keypair with a given name

Attributes

  • name - A keypair name



56
57
58
# File 'lib/open_stack/nova/compute/key_pair.rb', line 56

def self.find_by_name(name)
  all.detect { |key_pair| key_pair.name == name }
end

Instance Method Details

#idObject

:nodoc:



40
41
42
# File 'lib/open_stack/nova/compute/key_pair.rb', line 40

def id # :nodoc:
  name
end