Class: VCloudSdk::Xml::HardDiskItemWrapper
- Inherits:
-
Item
- Object
- Wrapper
- Item
- VCloudSdk::Xml::HardDiskItemWrapper
show all
- Defined in:
- lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb
Instance Method Summary
collapse
Methods inherited from Item
#add_rasd, #get_rasd, #get_rasd_content, #set_rasd
Methods inherited from Wrapper
#==, #[], #[]=, #add_child, #attribute, #content, #content=, #create_child, #create_qualified_name, #create_xpath_query, #doc_namespaces, #edit_link, #get_nodes, #href, #href=, #href_id, #name, #name=, #power_off_link, #power_on_link, #remove_link, #running_tasks, #to_s, #type, #type=, #undeploy_link, #urn, #xpath
Constructor Details
Returns a new instance of HardDiskItemWrapper.
13
14
15
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 13
def initialize(item)
super(item.node, item.namespace, item.namespace_definitions)
end
|
Instance Method Details
#bus_sub_type ⇒ Object
29
30
31
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 29
def bus_sub_type
host_resource[HOST_RESOURCE_ATTRIBUTE[:BUS_SUB_TYPE]]
end
|
#bus_type ⇒ Object
33
34
35
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 33
def bus_type
host_resource[HOST_RESOURCE_ATTRIBUTE[:BUS_TYPE]]
end
|
#capacity_mb ⇒ Object
17
18
19
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 17
def capacity_mb
host_resource[HOST_RESOURCE_ATTRIBUTE[:CAPACITY]]
end
|
#disk_id ⇒ Object
21
22
23
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 21
def disk_id
get_rasd_content(RASD_TYPES[:ADDRESS_ON_PARENT])
end
|
#element_name ⇒ Object
41
42
43
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 41
def element_name
get_rasd_content(RASD_TYPES[:ELEMENT_NAME])
end
|
#eql?(other) ⇒ Boolean
8
9
10
11
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 8
def eql?(other)
disk_id == other.disk_id && instance_id == other.instance_id &&
bus_type == other.bus_type && bus_sub_type == other.bus_sub_type
end
|
#hash ⇒ Object
4
5
6
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 4
def hash
[disk_id, instance_id, bus_type, bus_sub_type].hash
end
|
#host_resource ⇒ Object
45
46
47
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 45
def host_resource
get_rasd(RASD_TYPES[:HOST_RESOURCE])
end
|
#instance_id ⇒ Object
25
26
27
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 25
def instance_id
get_rasd_content(RASD_TYPES[:INSTANCE_ID])
end
|
#parent_instance_id ⇒ Object
37
38
39
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/hard_disk_item_wrapper.rb', line 37
def parent_instance_id
get_rasd_content(RASD_TYPES[:PARENT])
end
|