Class: VCloudSdk::Xml::Media
- Inherits:
-
Wrapper
- Object
- Wrapper
- VCloudSdk::Xml::Media
show all
- Defined in:
- lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb
Instance Method Summary
collapse
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, #initialize, #name, #name=, #power_off_link, #power_on_link, #remove_link, #running_tasks, #to_s, #type, #type=, #undeploy_link, #urn, #xpath
Instance Method Details
#files ⇒ Object
24
25
26
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 24
def files
get_nodes("File")
end
|
#image_type ⇒ Object
12
13
14
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 12
def image_type
@root["imageType"]
end
|
#image_type=(image_type) ⇒ Object
16
17
18
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 16
def image_type=(image_type)
@root["imageType"] = image_type.to_s
end
|
#incomplete_files ⇒ Object
Files that haven“t finished transferring
29
30
31
32
33
34
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 29
def incomplete_files
files.select do |f|
f["size"].to_i < 0 ||
(f["size"].to_i > f["bytesTransferred"].to_i)
end
end
|
#size ⇒ Object
4
5
6
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 4
def size
@root["size"]
end
|
#size=(size) ⇒ Object
8
9
10
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 8
def size=(size)
@root["size"] = size.to_s
end
|
#storage_profile=(storage_profile) ⇒ Object
20
21
22
|
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/media.rb', line 20
def storage_profile=(storage_profile)
add_child(storage_profile) unless storage_profile.nil?
end
|