vCloud API Programming Guide
52
VMware, Inc.
Example 4-18.
Move a vAppTemplate
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVAppTemplate
Content-Type: application/vnd.vmware.vcloud.cloneVAppTemplatxml
<CloneVAppTemplateParams name="Ubuntu Copy" xmlns="http://www.vmware.com/vcloud/v1">
<Source href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-111"/>
<IsSourceDelete>true</IsSourceDelete>
</CloneVAppTemplateParams>
Response:
201 Created
Content-Type: application/vnd.vmware.vcloud.vAppTxml
...
<VAppTemplate ovfDescriptorUploaded="true" status="0" name="Ubuntu Copy"
href="http://vcloud.example.com/api/v1.0/vAppTemplate/vappTemplate-302"
type="application/vnd.vmware.vcloud.vAppTxml" ...>
<Link rel="up" type="application/vnd.vmware.vcloud.vdc+xml"
href="http://vcloud.example.com/api/v1.0/vdc/5"/>
...
<Tasks>
<Task ... operation="Busy Virtual Application Template Ubuntu Copy (382)" ...>
...
</Task>
</Tasks>
</VAppTemplate>
Copy or Move a vApp
The
cloneVApp
request
makes
a
copy
of
the
vApp
referenced
in
the
Source
element
of
the
request
body.
The
request
specifies
a
new
name
and,
optionally,
a
new
description
for
the
copy.
The
request
can
optionally
include
an
IsSourceDelete
element
whose
value
specifies
whether
the
source
vApp
is
deleted
after
the
copy
is
complete.
If
IsSourceDelete
is
missing
from
the
request
body
or
present
with
a
value
of
false
,
the
source
object
remains
in
place
after
the
copy
is
complete.
Setting
IsSourceDelete
to
true
effectively
moves
the
vApp.
You
cannot
copy
or
move
a
vApp
that
is
deployed.
Example 4
‐
19
copies
the
vApp
referenced
by
http://vcloud.example.com/api/v1.0/vApp/vApp
‐
201
to
the
vDC
referenced
by
http://vcloud.example.com/api/v1.0/vdc/5
and
provides
a
new
name
and
description
for
the
copy.
Because
the
IsSourceDelete
element
in
the
request
body
contains
a
value
of
false,
the
source
vApp
is
unaffected
by
the
copy
operation.
(The
default
value
of
IsSourceDelete
is
false
.
The
example
includes
it
for
illustrative
purposes
only.)
The
response
is
a
Task
element
owned
by
the
copy.
Example 4-19.
Copy a vApp
Request:
POST http://vcloud.example.com/api/v1.0/vdc/5/action/cloneVApp
Content-Type: application/vnd.vmware.vcloud.cloneVApxml
<CloneVAppParams name="New Linux Server" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Cloned from Ubuntu FTP Server</Description>
<Source href=”http://vcloud.example.com/api/v1.0/vApp/vApp-201”/>
<IsSourceDelete>false</IsSourceDelete>
</CloneVAppParams>
Содержание 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...