Class: DeltacloudVM::Client::Key
- Defined in:
- lib/deltacloud_vm/client/models/key.rb
Instance Attribute Summary collapse
-
#fingerprint ⇒ Object
readonly
Returns the value of attribute fingerprint.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#public_key ⇒ Object
readonly
Returns the value of attribute public_key.
-
#state ⇒ Object
readonly
Custom attributes:.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Attributes inherited from Base
#description, #name, #obj_id, #url
Class Method Summary collapse
-
.parse(xml_body) ⇒ Object
Parse the Key entity from XML body.
Instance Method Summary collapse
- #destroy! ⇒ Object
-
#pem ⇒ Object
Key model methods.
Methods inherited from Base
#client, #connection, convert, #entrypoint, from_collection, #id, #initialize, #original_body, #to_s, #update_instance_variables!, validate_attrs!
Methods included from Helpers::XmlHelper
Methods included from Methods::Api
#api_uri, #current_driver, #current_provider, #feature?, #features, #must_support!, #path, #support?, #supported_collections, #version
Methods included from Helpers::Model
#error, #from_collection, #from_resource, #model
Constructor Details
This class inherits a constructor from DeltacloudVM::Client::Base
Instance Attribute Details
#fingerprint ⇒ Object (readonly)
Returns the value of attribute fingerprint.
27 28 29 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 27 def fingerprint @fingerprint end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
25 26 27 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 25 def password @password end |
#public_key ⇒ Object (readonly)
Returns the value of attribute public_key.
26 27 28 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 26 def public_key @public_key end |
#state ⇒ Object (readonly)
Custom attributes:
23 24 25 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 23 def state @state end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
24 25 26 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 24 def username @username end |
Class Method Details
.parse(xml_body) ⇒ Object
Parse the Key entity from XML body
-
xml_body -> DeltacloudVM API XML representation of the key
42 43 44 45 46 47 48 49 50 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 42 def self.parse(xml_body) { :state => xml_body.text_at(:state), :username => xml_body.text_at(:username), :password => xml_body.text_at(:password), :fingerprint => xml_body.text_at(:fingerprint), :public_key => xml_body.text_at(:pem) } end |
Instance Method Details
#destroy! ⇒ Object
34 35 36 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 34 def destroy! destroy_key(_id) end |
#pem ⇒ Object
Key model methods
30 31 32 |
# File 'lib/deltacloud_vm/client/models/key.rb', line 30 def pem @public_key end |