VMware, Inc.
95
Chapter 6 Administrative Operations
Create an Organization
To
create
an
organization,
a
system
administrator
POSTs
an
AdminOrg
body
to
the
vCloud’s
orgs
URL,
as
shown
in
Example 6
‐
3
.
The
response
echoes
the
request,
with
several
important
additions:
It
includes
both
the
administrative
and
user
URLs
for
the
new
organization.
The
administrative
URL
is
the
value
of
the
href
element
of
the
AdminOrg
body,
and
the
user
URL
is
the
value
of
the
Link
where
rel="alternate"
.
It
includes
links
that
an
administrator
can
use
to
modify
or
remove
the
new
organization.
For
example,
an
administrator
could
use
this
Link
to
add
a
catalog.
<Link rel="add" type="application/vnd.vmware.admin.xml"
href="http://vcloud.example.com/api/v1.0/admin/org/26/catalogs"/>
Example 6-3.
Create an Organization
Request:
POST http://vcloud.example.com/api/v1.0/admin/orgs
Content-Type: application/vnd.vmware.admin.organxml
...
<AdminOrg xmlns="http://www.vmware.com/vcloud/v1" name="ExampleFinance"
type="application/vnd.vmware.admin.organxml">
<Description>Example Corporation’s Finance Organization</Description>
<FullName>Finance</FullName>
<Settings>
<CanPublishCatalogs>true</CanPublishCatalogs>
<DeployedVMQuota>0</DeployedVMQuota>
<StoredVmQuota>0</StoredVmQuota>
<OrgLeaseSettings>
<DeleteOnStorageLeaseExpiration>false</DeleteOnStorageLeaseExpiration>
<DeploymentLeaseSeconds>604800</DeploymentLeaseSeconds>
<StorageLeaseSeconds>2592000</StorageLeaseSeconds>
</OrgLeaseSettings>
<OrgLdapMode>SYSTEM</OrgLdapMode>
<OrgEmailSettings>
<IsDefaultSmtpServer>true</IsDefaultSmtpServer>
<IsDefaultOrgEmail>true</IsDefaultOrgEmail>
<FromEmailAddress>[email protected]</FromEmailAddress>
<DefaultSubjectPrefix>Attention</DefaultSubjectPrefix>
<IsAlertEmailToAllAdmins>true</IsAlertEmailToAllAdmins>
<SmtpServerSettings>
<IsUseAuthentication>true</IsUseAuthentication>
<Host>smtp.example.com</Host>
<Username>[email protected]</Username>
</SmtpServerSettings>
</OrgEmailSettings>
</Settings>
</AdminOrg>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.organxml
...
<AdminOrg xmlns="http://www.vmware.com/vcloud/v1"
href="http://vcloud.example.com/api/v1.0/admin/org/26" name="ExampleFinance"
type="application/vnd.vmware.admin.organxml">
<Link rel="down" type="application/vnd.vmware.vcloud.taxml"
href="http://vcloud.example.com/api/v1.0/tasksList/26"/>
<Link rel="add" type="application/vnd.vmware.admin.xml"
href="http://vcloud.example.com/api/v1.0/admin/org/26/catalogs"/>
<Link rel="add" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/org/26/users"/>
<Link rel="add" type="application/vnd.vmware.admin.group+xml"
href="http://vcloud.example.com/api/v1.0/admin/org/26/groups"/>
Содержание 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...