Sha256: b992022db6c911ecaa4a9d1e194ac7c2caad5fb2791a1f6673dca4cdcfd270ff

Contents?: true

Size: 1.21 KB

Versions: 96

Compression:

Stored size: 1.21 KB

Contents

module Fog
  module Compute
    class VcloudDirector
      class Real
        # Answer a question being asked by a VM.
        #
        # @param [String] id Object identifier of the VM.
        # @param [Integer] choice_id Choice ID of this answer.
        # @param [String] question_id Question ID of the question.
        # @return [Excon::Response]
        #
        # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/POST-AnswerVmPendingQuestion.html
        # @since vCloud API version 0.9
        def post_answer_pending_vm_question(id, choice_id, question_id)
          body = Nokogiri::XML::Builder.new do
            attrs = {
              :xmlns => 'http://www.vmware.com/vcloud/v1.5'
            }
            VmAnswerQuestion(attrs) {
              ChoiceId choice_id
              QuestionId question_id
            }
          end.to_xml

          request(
            :body    => body,
            :expects => 204, # this might be wrong
            :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.vmPendingAnswer+xml'},
            :method  => 'POST',
            :path    => "vApp/#{id}/quesiton/action/answer"
          )
        end
      end
    end
  end
end

Version data entries

96 entries across 94 versions & 8 rubygems

Version Path
fog-2.3.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-ifeel-2.2.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-2.2.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-2.1.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-1.42.1 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.2.2 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.2.1 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.2.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.1.10 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.1.9 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-2.0.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-1.42.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-1.41.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-1.40.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-1.39.0 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.1.8 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb
fog-vcloud-director-0.1.7 lib/fog/vcloud_director/requests/compute/post_answer_vm_pending_question.rb