def power_action(id, action, type=:vapp)
        target = "#{type}-#{id}"

        params = {
          'method' => :post,
          'command' => "/vApp/#{target}/power/action/#{action}"
        }

        response, headers = send_request(params)
        task_id = headers[:location].gsub(/.*\/task\//, "")
        task_id
      end
def power_action(id, action, type=:vapp)
        target = "#{type}-#{id}"

        params = {
          'method' => :post,
          'command' => "/vApp/#{target}/power/action/#{action}"
        }

        response, headers = send_request(params)
        task_id = headers[:location].gsub(/.*\/task\//, "")
        task_id
      end
Generic method to send power actions to vApp/VM

 i.e., 'suspend', 'powerOn'