Class: VCloudSdk::Xml::Task

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/cloud/vcloud/xml/wrapper_classes/task.rb

Instance Method Summary collapse

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



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

#detailsObject



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

#operationObject

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_nameObject

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

#progressObject

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

#statusObject



9
10
11
# File 'lib/cloud/vcloud/xml/wrapper_classes/task.rb', line 9

def status
  self["status"]
end