Class: VCloudSdk::Xml::Task
- Defined in:
- lib/cloud/vcloud/xml/wrapper_classes/task.rb
Instance Method Summary collapse
- #cancel_link ⇒ Object
- #details ⇒ Object
-
#operation ⇒ Object
Friendly description of the task.
-
#operation_name ⇒ Object
Short form name of the operation.
-
#progress ⇒ Object
Not all tasks will have progress.
- #status ⇒ Object
Methods inherited from Wrapper
#==, #[], #[]=, #add_child, #attribute_with_ns, #content, #content=, #create_child, #create_qualified_name, #create_xpath_query, #doc_namespaces, #error, #get_nodes, #href, #href_id, #initialize, #name, #name=, #to_s, #type, #urn, #xpath
Constructor Details
This class inherits a constructor from VCloudSdk::Xml::Wrapper
Instance Method Details
#cancel_link ⇒ Object
5 6 7 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 5 def cancel_link get_nodes("Link", {"rel" => "task:cancel"}).first end |
#details ⇒ Object
18 19 20 21 22 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 18 def details details = get_nodes("Details") return nil if details.nil? return details.collect {|d| d.content}.join end |
#operation ⇒ Object
Friendly description of the task
14 15 16 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 14 def operation self["operation"] end |
#operation_name ⇒ Object
Short form name of the operation
25 26 27 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 25 def operation_name self["operationName"] end |
#progress ⇒ Object
Not all tasks will have progress
30 31 32 33 34 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 30 def progress task_progress = get_nodes("Progress").first return task_progress.content unless task_progress.nil? nil end |
#status ⇒ Object
9 10 11 |
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 9 def status self["status"] end |