Class: DeltacloudVM::Client::HardwareProfile
- Includes:
- Helpers
- Defined in:
- lib/deltacloud_vm/client/models/hardware_profile.rb
Instance Attribute Summary collapse
-
#properties ⇒ Object
readonly
Returns the value of attribute properties.
Attributes inherited from Base
#description, #name, #obj_id, #url
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#client, #connection, convert, #entrypoint, from_collection, #id, #initialize, #original_body, #to_s, #update_instance_variables!, validate_attrs!
Methods included from DeltacloudVM::Client::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 DeltacloudVM::Client::Helpers::Model
#error, #from_collection, #from_resource, #model
Constructor Details
This class inherits a constructor from DeltacloudVM::Client::Base
Instance Attribute Details
#properties ⇒ Object (readonly)
Returns the value of attribute properties.
21 22 23 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 21 def properties @properties end |
Class Method Details
.parse(hwp) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 23 def self.parse(hwp) { :properties => hwp.xpath('property').map { |p| property_klass(p['kind']).parse(p) } } end |
Instance Method Details
#architecture ⇒ Object
39 40 41 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 39 def architecture property :architecture end |
#cpu ⇒ Object
31 32 33 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 31 def cpu property :cpu end |
#memory ⇒ Object
35 36 37 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 35 def memory property :memory end |
#opaque? ⇒ Boolean
47 48 49 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 47 def opaque? @properties.empty? && @name == 'opaque' end |
#storage ⇒ Object
43 44 45 |
# File 'lib/deltacloud_vm/client/models/hardware_profile.rb', line 43 def storage property :storage end |