vCloud API Programming Guide
88
VMware, Inc.
Get a Request for User Input
In
Example 5
‐
34
,
the
client
uses
the
vmPendingQuestion
link
returned
in
Example 5
‐
33
to
get
a
VmPendingQuestion
document
that
includes
the
question
and
the
set
of
choices
allowed
in
the
response.
Example 5-34.
Get a Vm Pending Question
Request:
GET http://vcloud.example.com/api/v1.0/vApp/vm-5/question
Response:
200 OK
Content-type: application/vnd.vmware.vcloud.vmPendingQxml ...
<VmPendingQuestion xmlns="http://www.vmware.com/vcloud/v1" ... >
<Link type="application/vnd.vmware.vcloud.vmPendinxml"
href="http://vcloud.example.com/api/v1.0/vApp/vm-5/question/action/answer"/>
<Question>msg.parallel.file.open:Parallel port output file
"/vmfs/volumes/d6162a46-58e50cab/linuxftp/vm-mgi.log" already exists. Do you
want to replace it with any newly created content, or append new content to
the end of the file?
</Question>
<QuestionId>50</QuestionId>
<Choices>
<Id>0</Id>
<Text>Append</Text>
</Choices>
<Choices>
<Id>1</Id>
<Text>Replace</Text>
</Choices>
<Choices>
<Id>2</Id>
<Text>Cancel</Text>
</Choices>
</VmPendingQuestion>
Provide Requested User Input
Example 5
‐
35
shows
the
a
response,
delivered
by
a
POST
to
the
question/answer
link
of
the
Vm
.
Example 5-35.
Answer a Vm Pending Question
Request:
POST http://vcloud.example.com/api/v1.0/vApp/vm-5/question/action/answer
Content-type: application/vnd.vmware.vcloud.vmPendinxml
...
<VmQuestionAnswer xmlns="http://www.vmware.com/vcloud/v1">
<ChoiceId>2</ChoiceId>
<QuestionId>50</QuestionId>
</VmQuestionAnswer>
Response:
204 No Content
Содержание VCLOUD API 1.0 - TECHNICAL NOTE
Страница 10: ...vCloud API Programming Guide 10 VMware Inc...
Страница 20: ...vCloud API Programming Guide 20 VMware Inc...
Страница 32: ...vCloud API Programming Guide 32 VMware Inc...
Страница 90: ...vCloud API Programming Guide 90 VMware Inc...
Страница 150: ...vCloud API Programming Guide 150 VMware Inc...
Страница 170: ...vCloud API Programming Guide 170 VMware Inc...
Страница 202: ...vCloud API Programming Guide 202 VMware Inc...
Страница 212: ...vCloud API Programming Guide 212 VMware Inc...