VMware, Inc.
101
Chapter 6 Administrative Operations
<ParentNetwork type="application/vnd.vmware.admin.xml" name="ExternalNetwork-VC1"
href="http://vcloud.example.com/api/v1.0/admin/network/7"/>
<FenceMode>bridged</FenceMode>
</Configuration>
</OrgNetwork>
The
response
echoes
the
request,
and
contains
some
additional
elements:
A
Task
that
tracks
creation
of
the
network.
Additional
members
of
the
Configuration
element
that
are
inherited
from
the
organization’s
defaults,
because
they
were
not
specified
in
the
request.
The
same
request
with
a
different
value
for
FenceMode
contents
would
create
a
network
with
a
different
type
of
connection
to
the
parent.
For
more
information,
see
“FenceMode”
on
page 155.
Get an Administrative View of an Organization Network
To
see
an
administrative
view
of
an
organization
network,
an
administrator
can
make
a
GET
request
to
the
network’s
admin
URL
(the
href
element
of
the
OrgNetwork
body),
as
shown
in
Example 6
‐
11
.
The
response,
most
of
which
is
not
shown
here,
would
be
identical
to
the
one
shown
in
Example 6
‐
10
,
but
without
the
Tasks
element.
Example 6-11.
Get an Administrative View of an Organization Network
Request:
GET http://vcloud.example.com/api/v1.0/admin/network/54
Response:
200 OK
Content-Type: application/vnd.vmware.admin.xm
...
<OrgNetwork xmlns="http://www.vmware.com/vcloud/v1" name="Internet"
type="application/vnd.vmware.admin.xml"
ref="http://vcloud.example.com/api/v1.0/admin/network/54" ...>
...
<Description>Bridged to the public Internet</Description>
...
</OrgNetwork>
Modify an Organization Network
An
administrator
can
use
the
rel="edit"
link
in
an
OrgNetwork
body
to
modify
the
network’s
name,
description,
or
configuration.
Example 6
‐
12
does
this
by
making
a
PUT
request
to
the
rel="edit"
link
returned
in
Example 6
‐
10
.
The
request
modifies
the
network’s
FenceMode
element
and
adds
elements
to
the
Configuration
to
define
the
NAT
service
being
added
to
the
network.
Example 6-12.
Modify a Network
Request:
PUT http://vcloud.example.com/api/v1.0/admin/network/54
Content-Type: application/vnd.vmware.admin.xml
...
<OrgNetwork name="Internet" xmlns="http://www.vmware.com/vcloud/v1">
<Description>NAT-ed to the public Internet</Description>
<Configuration>
<ParentNetwork type="application/vnd.vmware.admin.xml" name="ExternalNetwork-VC1"
href="http://vcloud.example.com/api/v1.0/admin/network/7"/>
<FenceMode>natRouted</FenceMode>
<Features>
<DhcpService>
Содержание 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...