Class: VCloudSdk::Xml::Task

Inherits:
Wrapper
  • Object
show all
Defined in:
lib/ruby_vcloud_sdk/xml/wrapper_classes/task.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

Constructor Details

This class inherits a constructor from VCloudSdk::Xml::Wrapper

Instance Method Details



5
6
7
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/task.rb', line 5

def cancel_link
  get_nodes(XML_TYPE[:LINK], { rel: "task:cancel" }).first
end

#operationObject

Friendly description of the task



14
15
16
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/task.rb', line 14

def operation
  self["operation"]
end

#operation_nameObject

Short form name of the operation



19
20
21
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/task.rb', line 19

def operation_name
  self["operationName"]
end

#progressObject

Not all tasks will have progress



24
25
26
27
28
# File 'lib/ruby_vcloud_sdk/xml/wrapper_classes/task.rb', line 24

def progress
  task_progress = get_nodes("Progress").first
  return task_progress.content unless task_progress.nil?
  nil
end

#statusObject



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

def status
  self["status"]
end