Class: OpenStack::Nova::Compute::KeyPair
- Inherits:
-
Base
- Object
- ActiveResource::Base
- Base
- Common
- Base
- OpenStack::Nova::Compute::KeyPair
- 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
-
.find_all_by_name(name) ⇒ Object
The list of keypair with a given name.
-
.find_by_name(name) ⇒ Object
The first keypair with a given name.
Instance Method Summary collapse
-
#id ⇒ Object
:nodoc:.
Methods inherited from Base
Methods inherited from Common
collection_path, custom_method_collection_url, element_path
Methods inherited from Base
Methods inherited from ActiveResource::Base
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
#id ⇒ Object
:nodoc:
40 41 42 |
# File 'lib/open_stack/nova/compute/key_pair.rb', line 40 def id # :nodoc: name end |