Docu52074 ViPR 1.1 Controller REST API Developer Guide
Docu52074 ViPR 1.1 Controller REST API Developer Guide
Version 1.1.0
EMC believes the information in this publication is accurate as of its publication date. The information is subject to change
without notice.
The information in this publication is provided as is. EMC Corporation makes no representations or warranties of any kind with
respect to the information in this publication, and specifically disclaims implied warranties of merchantability or fitness for a
particular purpose. Use, copying, and distribution of any EMC software described in this publication requires an applicable
software license.
EMC, EMC, and the EMC logo are registered trademarks or trademarks of EMC Corporation in the United States and other
countries. All other trademarks used herein are the property of their respective owners.
For the most up-to-date regulatory document for your product line, go to EMC Online Support (https://support.emc.com). For
documentation on EMC Data Domain products, go to the EMC Data Domain Support Portal (https://my.datadomain.com).
EMC Corporation
Hopkinton, Massachusetts 01748-9103
1-508-435-1000 In North America 1-866-464-7381
www.EMC.com
Chapter 3 Authorization 25
Authorization overview..................................................................................26
Virtual data center roles................................................................................ 26
Tenant roles.................................................................................................. 28
ACLs..............................................................................................................29
Virtual array and virtual pool ACLs................................................................. 29
Examples: Virtual array and virtual pool ACL APIs............................. 30
Project ACLs.................................................................................................. 31
Examples: Project ACL APIs.............................................................. 32
Examples: Changing a project's owner............................................. 33
Response
HTTP 200
{
"name": "Provider Tenant",
"id": "urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:",
"link": {
"rel": "self",
"href": "/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
}
}
u <ViPR_VIP> is the IP address or fully qualified domain name (FQDN) of the public
virtual IP address of your ViPR vApp.
u Port 4443 is the HTTP port used for REST client access to many services on the ViPR
virtual appliance. Other REST services are accessed through port 443. (See API
Ports on page 8.)
To issue POST, PUT, and DELETE HTTP requests from a web browser, you need browser
plugins, such as Internet Explorer's httpAnalyzer. Most major browsers, such as Firefox
and Chrome, have a poster plugin that will allow you to call HTTP commands directly from
your browser.
You can also access the REST API using scripting platforms such as curl and perl. EMC
also provides a Java client that wraps the ViPR Controller REST API calls in a set of Java
classes.
API Ports
The ViPR Controller REST API uses two different ports.
The following table show the services available on each of the two ports used by the ViPR
REST API.
ViPR UI Services API 443 (HTTPS) Send ViPR REST API calls to port 443 to manage
the following resources:
l Approvals
l Asset options
l Catalog
l Execution window
l Orders
l Schema
Identifying resources
Each ViPR managed storage resource is uniquely identified by an ID that is generated by
ViPR when it is created. A URN is a Uniform Resource Name.
The URN for a resource is a unique identifier for the resource and cannot be changed.
To find the URN of a particular resource, you can use the GET {resource_URL}/bulk
API call, which gives you a list of all the URNs of a given resource class. Then you can use
the URNs obtained from this GET call and use them in the payload of the POST
{resource_URL}/bulk call to obtain more detailed information about the specified
resources.
See Bulk Operations on page 60 for more information on how to retrieve URNs and
details associated with a given resource URN.
Identifying resources 9
Getting Started with the ViPR Controller REST API
Request
GET https://<ViPR_VIP>:4443/login?using-cookies
Response
ViPR challenges the user with a dialog box. Enter the name of the user in the User Name
field, and the password of the user in the Password field.
The ViPR API is always accessed over secure sockets, so use HTTPS instead of HTTP.
ViPR_VIP is the IP address or Fully Qualified Domain Name(FQDN) of the virtual IP of the
ViPR vApp.
Use port 4443 for logging in to ViPR with the API.
With some application development platforms, you can pass in user credentials without
interacting with the ViPR login dialog box. For example, this curl command allows you
to log in as the root user with a password of ChangeThis:
curl <ViPR_VIP>:4443/login -u "root:ChangeThis" -k
Note
>
< HTTP/1.1 200 OK
< Date: Tue, 26 Nov 2013 22:18:25 GMT
< Content-Type: application/xml
< Content-Length: 93
< Connection: keep-alive
< X-SDS-AUTH-TOKEN:
BAAcQ0xOd3g0MjRCUG4zT3NJdnNuMlAvQTFYblNrPQMAUAQADTEzODU0OTQ4NzYzNTICAA
EABQA5dXJu
OnN0b3JhZ2VvczpUb2tlbjo2MjIxOTcyZS01NGUyLTRmNWQtYWZjOC1kMGE3ZDJmZDU3Mm
U6AgAC0A8=
<
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<loggedIn>
<user>root</user>
</loggedIn>
* Connection #0 to host 10.247.100.247 left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
This executes a GET on the /login resource. The -u option indicates the user of basic
authentication header. The user designation must be included in the request. Upon
successful authentication, a HTTP 200 code is returned as well as the X-SDS-AUTH-TOKEN
header containing the encoded token.
The token can then be passed back in the next API call. You can copy the X-SDS-AUTH-
TOKEN contents and pass it to the next request through curl's -H switch.
curl https://10.247.100.247:4443/tenant
-k
-H "X-SDS-AUTH-TOKEN:
BAAcOHZLaGF4MTl3eFhpY0czZ0tWUGhJV2xreUE4PQMAUAQADTEzODU0OTQ4NzYzNTICAA
EABQA5dXJu
OnN0b3JhZ2VvczpUb2tlbjpkYzc3ODU3Mi04NWRmLTQ2YjMtYjgwZi05YTdlNDFkY2QwZD
g6AgAC0A8="
Authentication redirects
If you try to access a ViPR REST resource without a valid token, ViPR will issue an HTTP
302 redirect code.
An HTTP 302 redirect code includes the URL of the authentication resource, appended
with a service= parameter that indicates where to be redirected after successful
authentication. It also includes a signature parameter to prevent forgery on the
service= parameter.
Response
GET /tenants HTTP/1.1
User-Agent: curl/7.24.0 (i386-pc-win32) libcurl/7.24.0 OpenSSL/
0.9.8t zlib/1.2.5
Host: 10.247.100.247:4443
Accept: */*
Response
HTTP/1.1 401 Unauthorized
On successful authentication, you see another 302 code, this time redirecting you to
the original service. The authentication token is also in the HTTP header or cookie
(depending on whether ?using-cookies=true appeared in the original request).
Response
GET /login?service={LocationString} HTTP/1.1
> Authorization: Basic cm9vdDpDaGFuZ2VNZQ==
> User-Agent: curl/7.24.0 (i386-pc-win32) libcurl/7.24.0 OpenSSL/
0.9.8t zlib/1.2.5
> Host: 10.247.100.247:4443
> Accept: */*
>
< HTTP/1.1 302 Found
Authentication redirects 13
Getting Started with the ViPR Controller REST API
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tenant_info>
<name>Provider Tenant</name>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:</
id>
</tenant_info>
Response
HTTP 302
In this example, curl's -L option indicates that we want to follow redirects.
Response Body
HTTP/1.1 200 OK
Date: Wed, 27 Nov 2013 18:57:12 GMT
Content-Type: application/xml
Content-Length: 276
Connection: keep-alive
Logout
The logout API ends a session.
A given user is allowed a maximum of 100 concurrent authentication tokens. Past this
limit, the system refuses any new connection for this user until tokens free up. They can
free up by expiring naturally, or by explicitly calling this URI:
https://<ViPR_VIP>:4443/logout
If you have multiple sessions running simultaneously, this URI forces the termination of
all tokens related to the current user.
GET <ViPR_VIP>:4443/logout?force=true
GET: <ViPR_VIP>:4443/logout
X-SDS-AUTH-TOKEN:{Auth_Token}
Whoami
A ViPR user can view their own user name, tenant association, and roles using the
whoami API call.
Request
GET <ViPR_VIP>:4443/user/whoami
Response
HTTP 200
GET /user/whoami
<user>
<common_name>root</common_name>
<distinguished_name>root</distinguished_name>
<roles>
<role>SYSTEM_AUDITOR</role>
<role>SECURITY_ADMIN</role>
<role>SYSTEM_ADMIN</role>
<role>SYSTEM_MONITOR</role>
<role>TENANT_ADMIN</role>
</roles>
<subtenant_roles/>
<tenant>
urn:storageos:TenantOrg:7985d438-9980-41df-bba1-29d6a873f811:
</tenant>
</user>
This example shows the whoami output for the Root user. Root is associated with the
tenant indicated in the <tenant> field. Root has the roles listed in the <roles> field.
Logout 15
Getting Started with the ViPR Controller REST API
Proxyuser
Because standard ViPR security tokens expire after 8 hours, ViPR provides a special user
ID that can run a Controller REST API script on a schedule without having to repeatedly log
in. For example, you might set up a script to check particular file services every 12 hours,
and take appropriate action in the presence of certain conditions.
The proxy token feature allows a user to retrieve a persistent security token from ViPR,
then pass that token to a special user called proxyuser, who runs the script. The
proxyuser is a built-in user in ViPR. This user has the PROXY_USER role, and is the only
ViPR user that can have that role.
The proxyuser cannot perform any security-related operations. For example, a proxy user
cannot register an authentication provider, or do role assignments for a user. The
proxyuser is best used for monitoring and provisioning operations.
Note
Procedure
1. Log in to ViPR.
curl -k <ViPR_VIP>:4443/login?using-cookies -c cookie2 -u
"myUser@MyCompany.com:ChangeThis"
ViPR delivers a standard ViPR authentication token. (This token has an 8 hour
timeout.)
2. Retrieve your users proxy token. Each ViPR user has one and only one proxy
token.
curl -k <ViPR_VIP>:4443/proxytoken -b cookie2 -v
HTTP/1.1 200 OK
Date: Wed, 27 Nov 2013 20:05:02 GMT
Content-Type: application/xml
Content-Length: 0
Connection: keep-alive
X-SDS-AUTH-PROXY-TOKEN: {Token_Text}
4. Pass the proxy token - X-SDS-AUTH-PROXY-TOKEN - for your user to the proxyuser.
How you do this is specific to your application. One method is to save the token to a
file that is accessible by the proxyuser.
5. The proxyuser logs in, and uses the LDAP users proxy token to run the scheduled
script as that user. For example, if vipr_user passes a proxy token to proxyuser,
proxyuser can run vipr_users script as vipr_user using vipr_users proxy token. The
proxy token does not age out. The script can run repeatedly for an indefinite period of
time.
HTTP/1.1 200 OK
Date: Wed, 27 Nov 2013 20:49:06 GMT
Content-Type: application/xml
Content-Length: 95
Connection: keep-alive
Procedure
1. Login to ViPR as the root user and obtain an authentication token that can then be
used in subsequent ViPR API calls.
Request
GET <ViPR_VIP>:4443/login?using-cookies
Response
HTTP 200
X-SDS-AUTH-TOKEN:{Token_Text}
<loggedIn>
<user>root</user>
</loggedIn>
2. POST an authentication provider for the mycompany.com domain.
Request
POST <ViPR_VIP>:4443/vdc/admin/authnproviders
{'Content-Type': 'application/xml',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/xml'}
<authnprovider_create>
<server_urls>
<server_url>ldap://10.247.100.165</server_url>
</server_urls>
<domains>
<domain>sanity.local</domain>
</domains>
<group_whitelist_values>
<group_whitelist_value>*Admin*</group_whitelist_value>
<group_whitelist_value>*Test*</group_whitelist_value>
</group_whitelist_values>
<mode>ad</mode>
<name>ad configuration2</name>
<description>ad configuration2</description>
<disable>no</disable>
<manager_dn>CN=Administrator,CN=Users,DC=mycompany,DC=com</
manager_dn>
<manager_password>P@ssw0rd</manager_password>
<search_base>CN=Users,DC=mycompany,DC=com</search_base>
<search_filter>userPrincipalName=%u</search_filter>
<search_scope>SUBTREE</search_scope>
<group_attribute>CN</group_attribute>
</authnprovider_create>
The ViPR Installation and Configuration Guide has more information about the
meaning of each authentication provider parameter.
Response
HTTP 200
<authnprovider>
<creation_time>1386017748095</creation_time>
<id>urn:storageos:AuthnProvider:0555dc65-598f-4dea-951a-
d9f5b2b61c5e:</id>
<inactive>false</inactive>
<link href="/vdc/admin/authnproviders/
urn:storageos:AuthnProvider:0555dc65-598f-4dea-951a-d9f5b2b61c5e:"
rel="self"/>
<name>ad configuration2</name>
<tags/>
<description>ad configuration2</description>
<disable>false</disable>
<domains>
<domain>mycompany.com</domain>
</domains>
<group_attribute>CN</group_attribute>
<group_whitelist_values>
<group_whitelist_value>*Admin*</group_whitelist_value>
<group_whitelist_value>*Test*</group_whitelist_value>
</group_whitelist_values>
<manager_dn>CN=Administrator,CN=Users,DC=mycompany,DC=com</
manager_dn>
<mode>ad</mode>
<search_base>CN=Users,DC=mycompany,DC=com</search_base>
<search_filter>userPrincipalName=%u</search_filter>
<search_scope>SUBTREE</search_scope>
<server_urls>
<server_url>ldap://192.247.100.165</server_url>
</server_urls>
</authnprovider>
where {tenant_urn} is the URN ID of the tenant. In this example, you authenticate as root
and are modifying the provider tenant.
Procedure
1. Obtain the URN ID of the provider tenant. The following API call returns the current
user's tenant. The current user is root.
Request
GET <ViPR_VIP>:4443/tenant
Response
HTTP 200
GET /tenant
<tenant_info>
<name>Provider Tenant</name>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</id>
</tenant_info>
2. Use that URN ID to access the provider tenant and modify it, adding the desired user
mapping.
Request
PUT <ViPR_VIP>:4443/tenants/{Tenant_URN}
<tenant_update>
<name>Provider Tenant</name>
<user_mapping_changes>
<add>
<user_mapping>
<domain>mycompany.com</domain>
<groups>
<group>TestUsers</group>
<group>AdminUsers</group>
</groups>
</user_mapping>
</add>
</user_mapping_changes>
</tenant_update>
Response
HTTP 200
<tenant>
<creation_time>1383585703830</creation_time>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</id>
<inactive>false</inactive>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
<name>Provider Tenant</name>
<tags/>
<description>Root Provider Tenant</description>
<user_mappings>
<user_mapping>
<attributes/>
<domain>mycompany.com</domain>
<groups>
<group>TestUsers</group>
<group>AdminUsers</group>
</groups>
</user_mapping>
</user_mappings>
</tenant>
For the mapping to be valid, AdminUsers and TestUsers need to be available to ViPR
through the white list parameter of the authentication provider that this tenant uses.
The *Admin* and *Test* expressions (see Adding an authentication provider on page
20) make this possible.
{
"add": [{"subject_id": "tenantadmin@mycompany.com", "role":
["TENANT_ADMIN"]}]
}
where tenant_URN is the ID of the ViPR tenant to which you are applying the role
assignment. The following API returns the URIs of all tenants known to ViPR.
GET <ViPR_URL>:4443/tenants/bulk
Response
HTTP 200
{
"link":{"rel":"self","href":"/tenants/{tenant_URN}/role-
assignments"},
"role_assignments":
[
{"role":
["TENANT_ADMIN"],"subject_id":"tenantadmin@mycompany.com"},
{"role":["TENANT_ADMIN"],"subject_id":"root"}
]
}
2. To test out that tenantadmin@mycompany.com has TENANT_ADMIN privileges in this
tenant, login with that user and request role assignment information for the provider
tenant.
Request
GET <ViPR url>:4443/login.json -u
tenantadmin@mycompany.com:password
Response
HTTP 200
X-SDS-AUTH-TOKEN:{Token_text}
{
"user":"tenantadmin@mycompany.com"
}
Request
GET <ViPR_URL>:4443/tenants/{Privider_Tenant_URI}/role-
assignments.json
X-SDS-AUTH-TOKEN:{Token_text}
Response
HTTP 200
{
"link":{"rel":"self","href":"/tenants/
urn:storageos:TenantOrg:d082a5b2-3201-4faf-9e62-ae1c989f1995:/role-
assignments"},
"role_assignments":
[
{"role":
["TENANT_ADMIN"],"subject_id":"tenantadmin@mycompany.com"},
{"role":["TENANT_ADMIN"],"subject_id":"root"}
]
}
u Authorization overview..........................................................................................26
u Virtual data center roles........................................................................................ 26
u Tenant roles.......................................................................................................... 28
u ACLs......................................................................................................................29
u Virtual array and virtual pool ACLs......................................................................... 29
u Project ACLs.......................................................................................................... 31
Authorization 25
Authorization
Authorization overview
Authorization in ViPR is controlled by roles and Access Control Lists (ACLs). There are two
types of roles (virtual data center roles and tenant level roles), and different types of
ACLs.
Request body
<role_assignment_change>
<add>
<role>SECURITY_ADMIN</role>
<subject_id>username@mycompany.com</subject_id>
</add>
</role_assignment_change>
Response
HTTP 200
<role_assignments_create>
<role_assignment>
<role>SYSTEM_ADMIN</role>
<subject_id>username@mycompany.com</subject_id>
</role_assignment>
<role_assignment>
<role>SYSTEM_AUDITOR</role>
<role>SECURITY_ADMIN</role>
<role>SYSTEM_MONITOR</role>
<role>SYSTEM_ADMIN</role>
<subject_id>username@mycompany.com</subject_id>
</role_assignment>
<link href="/vdc/role-assignments" rel="self"/>
</role_assignments_create>
The following table lists the authorized actions for each ViPR virtual data center level role.
System Administrator l Sets up the physical storage infrastructure of the ViPR virtual data
center and carves the physical storage into two types of virtual
resources: virtual arrays and virtual pools. Authorized actions
include:
l Adding physical storage resources into ViPR such as arrays,
ports, pools, switches, and networks.
l Creating virtual pools; defining storage capabilities and
assigning physical storage pools to virtual pools.
l Creating virtual arrays; partitioning storage into discrete pods of
compute, network, and storage resources to control file system/
volume/object pathing through SAN/IP networks.
l Sets up object storage in the ViPR virtual data center; this includes
creating the object virtual pool and data stores, assigning an IP
network to the Object Data Service, and assigning an object
namespace to the tenant.
l Configures Access Control Lists (ACLs) for virtual arrays and virtual
pools to control which tenants may use them.
l Manages the ViPR virtual data center resources that are not
managed by tenants.
l Retrieves ViPR virtual data center status and health information.
l Retrieves bulk event and statistical records for the ViPR virtual data
center.
System Monitor l Has read-only access to all resources in the ViPR virtual data center.
l Retrieves bulk event and statistical records for the ViPR virtual data
center.
l Does not have visibility into security-related resources, such as
authentication providers, ACLs, and role assignments.
l Retrieves ViPR virtual data center status and health information.
System Auditor Has read-only access to the ViPR virtual data center audit logs.
Tenant roles
Tenant roles are scoped to the tenant in which the assignment is made. Tenant
Administrator, Tenant Approver, and Project Administrator are tenant-level roles.
Tenant roles can be assigned to users/groups from the corresponding tenant. These roles
define what the user can do at the tenant level. The tenant level roles are:
u Tenant Administrator
u Tenant Approver
u Project Administrator
A user with a Security Admin or Tenant Admin role can assign roles to users within a
tenant. The URL indicates the tenant. In the following example, a Security or Tenant
Administrator with access to the tenant assigns a Tenant Administrator role to a user with
a subject ID of user@mycompany.com.
PUT: <ViPR url>:4443/tenants/<tenant urn>/role-assignments.json
Request body:
{
"add": [{"subject_id": "user@mycompany.com", "role":
["TENANT_ADMIN"]}]
}
Response:
HTTP 200
The following table lists the authorized actions for each ViPR tenant-level role.
Project Administrator l Creates projects in their tenant, getting an OWN ACL on the created
project.
ACLs
An Access Control List (ACL) is a list of permissions attached to a ViPR resource that
specifies which tenants are authorized to access that resource as well as what operations
are allowed on that resource.
ACLs can be assigned to the following ViPR resources:
u Block virtual pool
u File virtual pool
u Projects
u Virtual arrays
Note
Only Project ACLs are managed through the ViPR user interface. Other ACLs must be
managed using the API.
For each virtual array, virtual pool, or project resource, there is a limit of 100 ACLs. In
other words, there is a maximum of 100 user/group assignments for projects and 100
tenant assignments for a virtual array or virtual pool.
API Description
- -
GET /block/vpools/{id}/acl Show ACL assignment for block store virtual pool .
PUT /block/vpools/{id}/acl Add or remove block store virtual pool ACL entries.
PUT /file/vpools/{id}/acl Add or remove ACL entries from file store VirtualPool.
ACLs 29
Authorization
API Description
- -
PUT /vdc/varrays/{id}/acl Add or remove ACL for VirtualArray Virtual Array.
PUT https://<ViPR_VIP>:4443/vdc/varrays/
urn:storageos:VirtualArray:f49f6e36-0fe5-4181-9622-49d116204d86:/acl
<acl_assignment_changes>
<add>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</tenant>
</add>
</acl_assignment_changes>
Response:
HTTP 200
<acl_assignments>
<acl_assignment>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</tenant>
</acl_assignment>
</acl_assignments>
PUT https://<ViPR_VIP>:4443/vdc/varrays/
urn:storageos:VirtualArray:f49f6e36-0fe5-4181-9622-49d116204d86:/acl
<acl_assignment_changes>
<remove>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</tenant>
</remove>
</acl_assignment_changes>
Response:
HTTP 200
<acl_assignments/>
Request
PUT <ViPR_VIP>/file/vpools/urn:storageos:VirtualPool:4394653f-
cf2e-4301-8f11-9e8d3e7e7fa9:/acl
<acl_assignment_changes>
<add>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</tenant>
</add>
</acl_assignment_changes>
Response:
HTTP 200
<acl_assignments>
<acl_assignment>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</tenant>
</acl_assignment>
</acl_assignments>
Project ACLs
A Tenant Administrator can access all projects for their tenant. Project Administrators can
only access projects that they own.
The ACL permissions associated with projects are listed in the following table.
The project ACLs can be created or modified by a Tenant Administrator, a Security
Administrator, or a project owner. Project owners are assigned the OWN ACL. The user
that creates the project is the owner of that project unless they, or a tenant administrator,
transfers ownership of that project to another user.
The default ACL behavior of a project is different from the default ACL behavior of a Virtual
Array or Virtual Pool. Whereas, the default ACL for a Virtual Array or Virtual Pool enables
anyone to use them, the default ACL for the Project prevents all but the Tenant Admin,
Security Admin, or Project owner from using it. For other users or groups to use a project,
that user or group must be explicitly added to the ACL for that project.
Project ACL Description
- -
ALL The user can perform create, read, update, and delete (CRUD) operations
on file systems, volumes, snapshots, exports, and buckets within the
project.
BACKUP The user has read-only access to volumes, file systems and buckets in
the project. The user can create, delete, and export snapshots for
volumes and file systems in the project.
OWN The user with the OWN ACL is the project owner. A project owner can do
all of the following:
l Perform CRUD operations on project resources.
l Set ACLs on the project.
l Transfer ownership of the project to another user.
l Delete the project.
l Set project properties, such as the project name and owner.
Project ACLs 31
Authorization
Newly created projects will have an empty ACL. The Tenant Administrator or the project
owner is responsible for managing the ACL.
Response
<acl_assignments>
<acl_assignment>
<privilege>ALL</privilege>
<subject_id>jordab@sanity.local</subject_id>
</acl_assignment>
<acl_assignment>
<privilege>BACKUP</privilege>
<subject_id>jordab2@sanity.local</subject_id>
</acl_assignment>
</acl_assignments>
<acl_assignment_changes>
<add>
<privilege>ALL</privilege>
<subject_id>jordab2@sanity.local</subject_id>
</add>
</acl_assignment_changes>
Response
HTTP 200
<acl_assignments>
<acl_assignment>
<privilege>ALL</privilege>
<subject_id>jordab@sanity.local</subject_id>
</acl_assignment>
<acl_assignment>
<privilege>ALL</privilege>
<privilege>BACKUP</privilege>
<subject_id>jordab2@sanity.local</subject_id>
</acl_assignment>
</acl_assignments>
<project>
<creation_time>1384272649906</creation_time>
<id>urn:storageos:Project:2c4d5503-a935-405d-9795-3a08e4bd3ee3:</id>
<inactive>false</inactive>
<link href="/projects/urn:storageos:Project:2c4d5503-
a935-405d-9795-3a08e4bd3ee3:" rel="self"/>
<name>project1</name>
<tags/>
<owner>jordab@sanity.local</owner>
<tenant>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</id>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
</tenant>
</project>
<project_update>
<owner>jordab2@sanity.local</owner>
</project_update>
Response
HTTP 200
File services ViPR supports file storage on VNX file, GET /file/filesystems/{id}
NetApp and other arrays. The
POST /file/filesystems
following ViPR resources are
managed using File Service API calls. GET /file/snapshots/{id}
l File systems
l File system snapshots
l User Info
l Monitoring
l Metering
l Workflow
System resources
System resources are the physical and virtual data center resources managed by a user
with a System Administrator role.
Physical storage resources are only visible to and managed by the System Administrator.
These resources include:
u Physical storage systems (EMC VNX, VMAX, VPLEX, Isilon, and NetApp arrays).
u Storage Pools and Storage Ports that are discovered through SMI-S providers.
u Switches from Brocade and Cisco. (Switches are called Network-Systems in the ViPR
API.
u Auto-tiering policies such as Fully Automated Storage Tiering (FAST).
u IP and fibre channel network connectivity. Networks are ViPR resources that include
switches, host ports, and array ports.
The System Administrator is also responsible for setting up two types of virtual resources:
virtual arrays and virtual pools.
POST /vdc/varrays/{id}/ Create a network for a virtual array. This call is needed to create an IP
networks network. Fibre Channel networks are created by registering a network-
system.
GET /vdc/varrays/{id}/ Get a list of physical storage pools that have been assigned to the
storage-pools virtual array. This call displays pools explicitly assigned to the virtual
array through this API:
PUT /vdc/storage-pools/{id}
If no pools have been explicitly assigned to the virtual array,
GET /vdc/varrays/{id}/storage-pools returns all
storage pools allocated on arrays whose endpoints are included in
networks assigned to your virtual array.
Response
<block_vpool>
<creation_time>1382552786501</creation_time>
<id>urn:storageos:VirtualPool:2eaacbc2-
a3a2-4491-9ddd-9d4c4c4c9ae2:</id>
<inactive>false</inactive>
<link href="/block/vpools/urn:storageos:VirtualPool:2eaacbc2-
a3a2-4491-9ddd-9d4c4c4c9ae2:" rel="self"/>
<name>Pauls_virtual_pool thin block symm 1185</name>
<tags/>
<assigned_storage_pools>
<storage_pool>
<id>urn:storageos:StoragePool:a8e049d4-491a-4de2-
ba2f-2f2be502601b:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
54c9a969-b8ba-4a68-862c-ac214f0453a9:/storage-pools/
urn:storageos:StoragePool:a8e049d4-491a-4de2-ba2f-2f2be502601b:"
rel="self"/>
</storage_pool>
</assigned_storage_pools>
<description>Pauls_virtual_pool</description>
<invalid_matched_pools>
<storage_pool>
<id>urn:storageos:StoragePool:fc9ae4f6-e32b-4503-97b6-
fcbafe6eb4c3:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
6b23e681-b3da-4a7f-a4f0-4da6bf50cad9:/storage-pools/
urn:storageos:StoragePool:fc9ae4f6-e32b-4503-97b6-fcbafe6eb4c3:"
rel="self"/>
</storage_pool>
<!-- More Storage Pools -->
</invalid_matched_pools>
<matched_storage_pools/>
<num_paths>1</num_paths>
<num_resources>0</num_resources>
<protocols>
<protocol>FC</protocol>
</protocols>
<provisioning_type>Thin</provisioning_type>
<system_type>NONE</system_type>
<type>block</type>
<use_matched_pools>false</use_matched_pools>
<varrays>
<varray>
<id>urn:storageos:VirtualArray:339a534e-f69b-495b-87b2-
c95a4a8f71c9:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:339a534e-
f69b-495b-87b2-c95a4a8f71c9:" rel="self"/>
</varray>
</varrays>
<drive_type>NONE</drive_type>
<expandable>true</expandable>
<multi_volume_consistency>false</multi_volume_consistency>
<protection>
<snapshots>
<max_native_snapshots>0</max_native_snapshots>
</snapshots>
<continuous_copies>
<max_native_continuous_copies>0</max_native_continuous_copies>
</continuous_copies>
</protection>
<raid_levels/>
<unique_auto_tier_policy_names>false</unique_auto_tier_policy_names>
</block_vpool>
The following table shows some commonly used calls for file, block, and object virtual
pools.
One network maps to each VSAN/fabric discovered on a switch with its collection of
endpoints; that is, the storage system ports and host ports (initiator ports on a host ESX
server) to which the switch is connected.
Note
<network>
<creation_time>1382128881407</creation_time>
<id>urn:storageos:Network:9afa585c-8411-43e8-9abc-8d1eb80d03e5:</id>
<inactive>false</inactive>
<link href="/vdc/networks/urn:storageos:Network:
9afa585c-8411-43e8-9abc-8d1eb80d03e5:" rel="self"/>
<name>FABRIC_losbe175</name>
<tags/>
<native_guid>FC+BROCADE+10:00:00:05:1E:35:C0:30</native_guid>
<discovered>true</discovered>
<endpoints>
<endpoint>21:00:00:1B:32:08:74:1F</endpoint>
<endpoint>10:00:00:00:C9:62:CB:10</endpoint>
<endpoint>50:06:01:60:47:20:26:1A</endpoint>
<endpoint>50:01:24:82:67:64:A0:C7</endpoint>
</endpoints>
<endpoints_discovered>
<endpoint_discovered>
<name>21:00:00:1B:32:08:74:1F</name>
<value>true</value>
</endpoint_discovered>
<endpoint_discovered>
<name>10:00:00:00:C9:62:CB:10</name>
<value>true</value>
</endpoint_discovered>
<endpoint_discovered>
<name>50:06:01:60:47:20:26:1A</name>
<value>true</value>
</endpoint_discovered>
<endpoint_discovered>
<name>50:01:24:82:67:64:A0:C7</name>
<value>true</value>
</endpoint_discovered>
</endpoints_discovered>
<fabric_id>losbe175</fabric_id>
<network_systems>
<network_system>urn:storageos:NetworkSystem:
76adbd2a-6827-405d-870d-79606342807b:</network_system>
</network_systems>
<registration_status>REGISTERED</registration_status>
<transport_type>FC</transport_type>
<varray>
<id>urn:storageos:VirtualArray:339a534e-f69b-495b-87b2-
c95a4a8f71c9:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:339a534e-
f69b-495b-87b2-c95a4a8f71c9:" rel="self"/>
</varray>
</network>
The following APIs allow the ViPR system administrator to create IP networks and add
them to a virtual storage array. Note that IP networks must be explicitly created and
populated - they cannot be discovered like fibre channel networks.
GET /compute/hosts/{id} Get information about a host. The id provided here is the URN
of a host. This returns an IP Interface for the host.
PUT /vdc/networks/{id}/ Add storage ports and host ports to the IP network.
endpoints
<network>
<creation_time>1384888781885</creation_time>
<id>urn:storageos:Network:7e92077c-cd55-4264-ae79-7b51cd1f35dc:</id>
<inactive>false</inactive>
<link href="/vdc/networks/urn:storageos:Network:7e92077c-cd55-4264-
ae79-7b51cd1f35dc:" rel="self"/>
<name>bobs ip</name>
<tags/>
<native_guid/>
<discovered>false</discovered>
<endpoints>
<endpoint>10.247.166.180</endpoint>
</endpoints>
<endpoints_discovered>
<endpoint_discovered>
<name>10.247.166.180</name>
<value>false</value>
</endpoint_discovered>
</endpoints_discovered>
<registration_status>REGISTERED</registration_status>
<transport_type>IP</transport_type>
<varray>
<id>urn:storageos:VirtualArray:b60def12-
a703-4be6-9505-369af471f6e7:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:b60def12-
a703-4be6-9505-369af471f6e7:" rel="self"/>
</varray>
</network>
Example: <ViPR_URL>/vdc/network-systems
In this example, the Brocade CMCNE host based management software is installed on a
Windows host in the data center. This API call returns a list of network-systems. In this
example, ViPR has only one network-system resource discovered.
Request
Get <ViPR_VIP>/vdc/network-systems
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<network_systems>
<network_system>
<id>urn:storageos:NetworkSystem:8ef79865-c829-48c6-84d1-
b184e63025c6:</id>
<link href="/vdc/network-systems/urn:storageos:NetworkSystem:
8ef79865-c829-48c6-84d1-b184e63025c6:" rel="self"/>
<name>CMCNE 10.247.71.183</name>
</network_system>
</network_systems>
Example: <ViPR_URL>/vdc/network-systems/{network-system_URN}
This example shows the information returned for a single network-system resource.
Request
Get <VIPR_VIP>/vdc/network-systems/{network-system_URN}
Response
<network_system>
<creation_time>1384377287345</creation_time>
<id>urn:storageos:NetworkSystem:8ef79865-c829-48c6-84d1-
b184e63025c6:</id>
<inactive>false</inactive>
<link href="/vdc/network-systems/urn:storageos:NetworkSystem:
8ef79865-c829-48c6-84d1-b184e63025c6:" rel="self"/>
<name>CMCNE 10.247.71.183</name>
<tags/>
<native_guid>BROCADE+10.247.71.183+5989</native_guid>
<compatibility_status>COMPATIBLE</compatibility_status>
<job_discovery_status>COMPLETE</job_discovery_status>
<last_discovery_run_time>1384542614578</last_discovery_run_time>
Response
<varrays>
<varray>
<id>urn:storageos:VirtualArray:339a534e-f69b-495b-87b2-
c95a4a8f71c9:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:339a534e-
f69b-495b-87b2-c95a4a8f71c9:" rel="self"/>
<name>pauls_virtual_array</name>
</varray>
<varray>
<id>urn:storageos:VirtualArray:b60def12-
a703-4be6-9505-369af471f6e7:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:b60def12-
a703-4be6-9505-369af471f6e7:" rel="self"/>
<name>new test</name>
</varray>
</varrays>
Use the ID of a listed virtual array to create an IP network resource in the next step.
2. Build a new IP network.
Request
POST /vdc/varrays/{id}/networks
<network_create>
<name>NewIPNetwork</name>
<transport_type>IP</transport_type>
</network_create>
Response
<network>
<creation_time>1385067752563</creation_time>
<id>urn:storageos:Network:26f3efbf-9afd-4a23-b828-ae5aba0d3a81:</
id>
<inactive>false</inactive>
<link href="/vdc/networks/urn:storageos:Network:
26f3efbf-9afd-4a23-b828-ae5aba0d3a81:" rel="self"/>
<name>NewIPNetwork</name>
<tags/>
<native_guid/>
<discovered>false</discovered>
<endpoints/>
<endpoints_discovered/>
<registration_status>REGISTERED</registration_status>
<transport_type>IP</transport_type>
<varray>
<id>urn:storageos:VirtualArray:339a534e-f69b-495b-87b2-
c95a4a8f71c9:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:339a534e-
f69b-495b-87b2-c95a4a8f71c9:" rel="self"/>
</varray>
</network>
3. Get a list of hosts.
Request
GET /compute/hosts/bulk
Response
<ids>
<id>urn:storageos:Host:44295238-9d8e-44ad-940d-0272483b772e:</id>
<id>urn:storageos:Host:4f8ccf42-f9fb-4088-a46f-791ed7afc110:</id>
<id>urn:storageos:Host:62d77c0b-83e5-4fa8-a6e9-10b0291c1bad:</id>
<id>urn:storageos:Host:71c0513f-38fe-45d8-a07e-55856965f53a:</id>
<id>urn:storageos:Host:8bb9081b-94cf-4694-8952-f4f8f6739c1d:</id>
<id>urn:storageos:Host:cc7d6de2-05cc-485a-b9ba-7196ddf060c1:</id>
<id>urn:storageos:Host:d683a9bf-358b-40ad-89e3-db22acef1e50:</id>
<id>urn:storageos:Host:ed2b0a9a-f3a3-4d4d-9e9d-3b6449513995:</id>
<id>urn:storageos:Host:f06a2acc-2d9f-4105-8804-a0f4019bc6e5:</id>
<id>urn:storageos:Host:f6ad7311-10eb-4f3b-8b00-7becff73b84d:</id>
</ids>
4. Choose a host from the list, and retrieve the IP interfaces for that host.
Request
GET /compute/hosts/{Host_URN}/ip-interfaces
Response
<ip_interfaces>
<ip_interface>
<id>urn:storageos:IpInterface:
4f518e6e-8e0d-4a4c-84ee-95a683f923f1:</id>
<link href="/compute/ip-interfaces/urn:storageos:IpInterface:
4f518e6e-8e0d-4a4c-84ee-95a683f923f1:" rel="self"/>
<name>10.247.71.11</name>
</ip_interface>
</ip_interfaces>
Response
<ip_interface>
<creation_time>1382128965902</creation_time>
<id>urn:storageos:IpInterface:
4f518e6e-8e0d-4a4c-84ee-95a683f923f1:</id>
<inactive>false</inactive>
<link href="/compute/ip-interfaces/urn:storageos:IpInterface:
4f518e6e-8e0d-4a4c-84ee-95a683f923f1:" rel="self"/>
<name>7/ipv4</name>
<tags/>
<host>
<id>urn:storageos:Host:f6ad7311-10eb-4f3b-8b00-7becff73b84d:</
id>
<link href="/compute/hosts/
urn:storageos:Host:f6ad7311-10eb-4f3b-8b00-7becff73b84d:"
rel="self"/>
</host>
<protocol>IPV4</protocol>
<ip_address>10.247.71.11</ip_address>
<netmask>255.255.255.0</netmask>
</ip_interface>
The <ip_address> field has information you need to add a host endpoint to the IP
network.
6. Get a list of storage systems.
Request
GET /vdc/storage-systems
Response
<storage_systems>
<storage_system>
<id>urn:storageos:StorageSystem:ab79974d-2097-4666-
bebe-25a299d8211b:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:ab79974d-2097-4666-bebe-25a299d8211b:"
rel="self"/>
<name>SYMMETRIX+999024668923</name>
</storage_system>
</storage_systems>
7. Get a list of storage ports for that storage system.
Request
GET /vdc/storage-systems/{StorageSystem_URN}/storage-ports
Response
<storage_ports>
<storage_port>
<id>urn:storageos:StoragePort:00c2a754-b67a-4b1c-
b7e2-8e0b583e408c:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:d53ee95e-ee7f-4f8a-bd1c-923bd6ec840a:/
storage-ports/urn:storageos:StoragePort:00c2a754-b67a-4b1c-
b7e2-8e0b583e408c:" rel="self"/>
<name>SYMMETRIX+000195700932+PORT+50:00:09:73:00:0E:91:5D</
name>
</storage_port>
<storage_port>
<id>urn:storageos:StoragePort:241b767f-afd7-4c4c-8136-
b1d59dd61ea1:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:d53ee95e-ee7f-4f8a-bd1c-923bd6ec840a:/
storage-ports/urn:storageos:StoragePort:241b767f-afd7-4c4c-8136-
b1d59dd61ea1:" rel="self"/>
<name>SYMMETRIX+000195700932+PORT+iqn.1992-04.com.emc:
50000973000e91e0</name>
</storage_port>
</storage_ports>
8. Get information for a storage port in the list.
Request
GET /vdc/storage-ports/{StoragePort_urn}
Response
<storage_port>
<creation_time>1384185364056</creation_time>
<id>urn:storageos:StoragePort:00c2a754-b67a-4b1c-
b7e2-8e0b583e408c:</id>
<inactive>false</inactive>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:d53ee95e-ee7f-4f8a-bd1c-923bd6ec840a:/
storage-ports/urn:storageos:StoragePort:00c2a754-b67a-4b1c-
b7e2-8e0b583e408c:" rel="self"/>
<name>SYMMETRIX+000195700932+PORT+50:00:09:73:00:0E:91:5D</name>
<tags/>
<native_guid>SYMMETRIX+000195700932+PORT+50:00:09:73:00:0E:
91:5D</native_guid>
<operational_status>OK</operational_status>
<port_group>FA-8F</port_group>
<port_name>FA-8F:1</port_name>
<port_network_id>50:00:09:73:00:0E:91:5D</port_network_id>
<port_speed_gbps>8</port_speed_gbps>
<port_type>frontend</port_type>
<registration_status>REGISTERED</registration_status>
<storage_system>
<id>urn:storageos:StorageSystem:d53ee95e-ee7f-4f8a-
bd1c-923bd6ec840a:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:d53ee95e-ee7f-4f8a-bd1c-923bd6ec840a:"
rel="self"/>
</storage_system>
<transport_type>FC</transport_type>
</storage_port>
The <port_network_id> holds the information for the endpoint you want to add to the IP
network.
9. Add the host and array ports to the IP network.
Request
PUT /vdc/networks/{id}/endpoints
<network_endpoints>
<endpoints>
<endpoint>10.247.71.11</endpoint>
<endpoint>50:00:09:73:00:0E:91:5D</endpoint>
<!--...more "endpoint" elements...-->
</endpoints>
<op>add</op>
</network_endpoints>
<network_update>
<name>NewIPNetwork</name>
<varrays>
<varray>pauls_virtual_array</varray>
</varrays>
</network_update>
The following table shows some calls used to manage storage pools and storage ports.
Typically, storage pools and storage ports are automatically discovered when the storage
system discovery is successful, but ViPR administrators may want to add or delete the
storage pools or ports discovered. These calls allow you to do that.
ViPR REST API Call Description
- -
GET /vdc/storage-systems/{id}/ Get information about the storage pools on a specific
storage-pools array.
ViPR also discovers the Fully Automated Storage Tiering (FAST) policies (called auto tier
policies in ViPR) and the storage tiers associated with the physical storage pools on
VPLEX, VMAX, and VNX block arrays.
Request
POST /vdc/admin/authnproviders
<authnprovider_create>
<mode>ad</mode>
<domains>
<domain>yourco.com</domain>
<domain>domain2.yourco.com</domain>
<domain>domain3.yourco.com</domain>
</domains>
<name>multi-domain forest</name>
<server_urls>
<server_url>ldaps://MyLDAPServer.yourco.com:3269</
server_url>
</server_urls>
<server_cert>my_server_certificate</server_cert>
<manager_dn>CN=manager_bind,OU=Test1,OU=Test,DC=yourco,DC=com</
manager_dn>
<manager_password>Password</manager_password>
<group_attribute>CN</group_attribute>
<search_base>DC=yourco,DC=com</search_base>
<search_filter>userPrincipalName=%u</search_filter>
<search_attribute_key>userPrincipalName</
search_attribute_key>
<group_whitelist_values></group_whitelist_values>
<search_scope>SUBTREE</search_scope>
</authnprovider_create>
3. Get the urn ID of the root provider tenant.
You must have the Tenant Administrator role to perform this operation.
Request
GET /tenant
Response
<tenant_info>
<id>urn:storageos:TenantOrg:e5013f5e-41d7-4cf9-
b1fd-4fecfad0c18c:</id>
<name>Provider Tenant</name>
<link href="/tenants/
urn:storageos:TenantOrg:e5013f5e-41d7-4cf9-b1fd-4fecfad0c18c:"
rel="self"/>
</tenant_info>
Use this urn as the parent when creating a new tenant in the following step.
4. Create a new tenant and map users to it through a domain that is included in the
authentication provider.
Note
The set of LDAP users assigned to a subtenant is always a subset of the users mapped
to the Provider Tenant.
In this example, the users in the domain domain2.yourco.com are mapped into
the tenant called EMC tenant. You must have the Tenant Administrator role for the
parent tenant to perform this operation. The {id} variable is the URN of the provider
tenant.
Request
POST /tenants/{id}/subtenants
<tenant_create>
<name>EMC_tenant</name>
<user_mappings>
<user_mapping>
<domain>domain2.yourco.com</domain>
</user_mapping>
</user_mappings>
</tenant_create>
You can control the users mapped into a tenant by specifying attributes. For example,
if you only want users assigned to a specific department in AD to be mapped into the
tenant, you can set key/value attributes. For example:
<user_mapping>
<domain>domain2.yourco.com</domain>
<attributes>
<attribute>
<key>department</key>
<value>development</value>
</attribute>
<attributes>
</user_mapping>
Alternatively, you can map users into the tenant based on their AD group. The
following user mapping maps members of the "lab users" group into the tenant:
<user_mapping>
<domain>domain2.yourco.com</domain>
<groups>
<group>lab users</group>
</groups>
</user_mapping>
You can include more than one <user_mapping> to enable users to be mapped from
any of the specified mappings.
If you included more than one group in a <user_mapping>, the user must belong to all
groups. In the example below, users must belong to both "lab users" and "lab
administrators" groups to be mapped into the tenant.
<user_mapping>
<domain>domain2.yourco.com</domain>
<groups>
<group>lab users</group>
<group>lab administrators</group>
</groups>
</user_mapping>
Response
<tenant>
<creation_time>1378919846777</creation_time>
<id>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</id>
<inactive>false</inactive>
<link href="/tenants/urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:" rel="self"/>
<name>EMC tenant</name>
<tags/>
<parent_tenant>
<id>urn:storageos:TenantOrg:e5013f5e-41d7-4cf9-
b1fd-4fecfad0c18c:</id>
<link href="/tenants/
urn:storageos:TenantOrg:e5013f5e-41d7-4cf9-b1fd-4fecfad0c18c:"
rel="self"/>
</parent_tenant>
<user_mappings>
<user_mapping>
<attributes/>
<domain>domain2.yourco.com</domain>
<groups/>
</user_mapping>
</user_mappings>
</tenant>
5. If you want to assign access to a virtual array to the newly created tenant you can use
the following steps.
By default, the access control list (ACL) for a virtual array is wide open and all tenants
have access. Once you assign a tenant to the ACL for a virtual array, only that tenant
will have access unless you assign other tenants to the ACL.
a. Get a list of virtual arrays.
Request
GET /vdc/varrays
Response
<varrays>
<varray>
<id>urn:storageos:VirtualArray:1b86bbe1-c939-49d3-
b0ae-027dc95b1ccc:</id>
<link href="/vdc/varrays/urn:storageos:VirtualArray:
1b86bbe1-c939-49d3-b0ae-027dc95b1ccc:" rel="self"/>
<name>VSA</name>
</varray>
</varrays>
Use one of the virtual array IDs for the next step. This example shows the following
ID:
<id>urn:storageos:VirtualArray:1b86bbe1-c939-49d3-
b0ae-027dc95b1ccc:</id>
b. Assign the new tenant access to a virtual array by adding this tenant to the ACL for
the virtual array.
You must be authenticated as a user with the System Administrator or Security
Administrator role to perform this operation.
Request
PUT /vdc/varrays/urn:storageos:VirtualArray:1b86bbe1-c939-49d3-
b0ae-027dc95b1ccc:/acl
<acl_assignment_changes>
<add>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</tenant>
</add>
</acl_assignment_changes>
Response
<acl_assignments>
<acl_assignment>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</tenant>
</acl_assignment>
</acl_assignments>
6. If you want to a assign access to a virtual pool to the new tenant you can use the
following steps.
By default, the access control list (ACL) for a virtual pool is wide open and all tenants
have access. Once you assign a tenant to the ACL for a virtual pool, only that tenant
will have access unless you assign other tenants to the ACL.
a. Get a list of virtual pools. In the example below, file virtual pools have been listed.
Request
GET /file/vpools
Response
<vpool_list>
<virtualpool>
<id>urn:storageos:VirtualPool:58406f8b-5a0e-41c0-
a91b-5a8c59ac3a02:</id>
<link href="/file/vpools/urn:storageos:VirtualPool:
58406f8b-5a0e-41c0-a91b-5a8c59ac3a02:" rel="self"/>
<name>vsp1</name>
<vpool_type>file</vpool_type>
</virtualpool>
</vpool_list>
b. Retrieve the urn of a virtual pool and add the tenant to the ACL for that pool.
You must be authenticated as a user with the System Administrator or Security
Administrator role to perform this operation.
Request
PUT /file/vpools/urn:storageos:VirtualPool:58406f8b-5a0e-41c0-
a91b-5a8c59ac3a02:/acl
<acl_assignment_changes>
<add>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</tenant>
</add>
</acl_assignment_changes>
Response
<acl_assignments>
<acl_assignment>
<privilege>USE</privilege>
<tenant>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</tenant>
</acl_assignment>
</acl_assignments>
7. To perform any tenant-specific administration, you need to have a Tenant
Administrator for the tenant. You can create a Tenant Administrator using the /
tenants/{id}/role-assignments path, as shown below:
Request
PUT /tenants/urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:/role-assignments
<role_assignment_change>
<add>
<role>TENANT_ADMIN</role>
<subject_id>fjones@domain2.yourco.com</subject_id>
</add>
</role_assignment_change>
8. For users to provision file or block storage, or to access object storage, the user must
be assigned to a project. To create projects for the tenant, you can use /tenants/
{id}/projects. For example:
Request
POST /tenants/urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:/projects
<project_create>
<name>marketing_project</name>
</project_create>
Response
<tenant_project>
<id>urn:storageos:Project:
60a3069e-74cc-4e79-9857-1c121ce1635a:</id>
<link href="/projects/urn:storageos:Project:
60a3069e-74cc-4e79-9857-1c121ce1635a:" rel="self"/>
<name>marketing_project</name>
</tenant_project>
If you have assigned a user to the Tenant Administrator role for the tenant, they will
automatically have access to the project.
You can use the projects/{id}/acl path to assign permissions to a user for the
project. For example:
Request
PUT projects/ urn:storageos:Project:
60a3069e-74cc-4e79-9857-1c121ce1635a:/acl
<acl_assignment_changes>
<add>
<privilege>USE</privilege>
<subject_id>bsmith@domain2.yourco.com</subject_id>
</add>
</acl_assignment_changes>
9. If you want to use Data Services, you need to assign a namespace to the tenant and
assign a default data services virtual pool. You can also assign a default project. You
must be authenticated as a user with the System Administrator role to perform this
operation.
Request
POST /object/namespaces/namespace
<namespace_create>
<namespace>namespace1</namespace>
<vdcs>
<tenant>urn:storageos:TenantOrg:4edc456c-
c7f5-4c54-84b2-29715cc8f504:</tenant>
</vdcs>
</namespace_create>
Response
<namespace>
<id>namespace1</id>
<inactive>false</inactive>
<link href="/object/namespaces/namespace/namespace1"
rel="self"/>
<tags/>
<vdcs/>
</namespace>
u Bulk operations.....................................................................................................60
u Searching API resources........................................................................................ 61
u Tagging API resources........................................................................................... 62
u Tracking asynchronous operations........................................................................ 62
u Deactivating, or decommissioning, resources........................................................63
Common Operations 59
Common Operations
Bulk operations
Each ViPR storage resource class has a pair of /bulk APIs - a GET and a POST call.
These calls do the following:
u GET {resource_URN}/bulk returns a list of all resource names (URNs) of the
given resource class.
u POST {resource_URN}/bulk returns all available detail information for each
resource in the given resource class.
The following GET example returns a list of storage system URNs in the ViPR virtual data
center.
Request
GET <ViPR_VIP>/vdc/storage-systems/bulk
Response
<ids>
<id>urn:storageos:StorageSystem:0e0f247c-7fde-41e2-
b704-15acd21ae311:</id>
<id>urn:storageos:StorageSystem:164749e2-e5c5-4f05-
b315-1ff6ab2e496f:</id>
<id>urn:storageos:StorageSystem:1bc24c32-
e3f0-41ca-925e-410187258236:</id>
</ids>
The following POST example using the same storage system resource class returns
detailed information for each storage system URN listed in the POST request payload. The
POST request payload is usually a subset of the resource URNs returned by the GET
request. In the example below, three storage system URNs returned by the GET call are
included in the payload for the PUT request. Only information pertaining to those
resources is returned.
Request
POST <ViPR_VIP>/vdc/storage-systems/bulk
Request body
<ids>
<id>urn:storageos:StorageSystem:0e0f247c-7fde-41e2-
b704-15acd21ae311:</id>
<id>urn:storageos:StorageSystem:164749e2-e5c5-4f05-
b315-1ff6ab2e496f:</id>
<id>urn:storageos:StorageSystem:1bc24c32-
e3f0-41ca-925e-410187258236:</id>
</ids>
Response
<bulk_storage_systems>
<storage_system>
<creation_time>1379347335171</creation_time>
<id>urn:storageos:StorageSystem:164749e2-e5c5-4f05-
b315-1ff6ab2e496f:</id>
<inactive>false</inactive>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
164749e2-e5c5-4f05-b315-1ff6ab2e496f:" rel="self"/>
<name>SYMMETRIX+999316031302</name>
<...>
</storage_system>
<storage_system>
<creation_time>1379347335171</creation_time>
<id>urn:storageos:StorageSystem:0e0f247c-7fde-41e2-
b704-15acd21ae311:</id>
<inactive>false</inactive>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
0e0f247c-7fde-41e2-b704-15acd21ae311:" rel="self"/>
<name>CLARIION+APM12381623880</name>
<...>
</storage_system>
<storage_system>
<creation_time>1379347335171</creation_time>
<id>urn:storageos:StorageSystem:1bc24c32-
e3f0-41ca-925e-410187258236:</id>
<inactive>false</inactive>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
1bc24c32-e3f0-41ca-925e-410187258236:" rel="self"/>
<name>SYMMETRIX+999000414197</name>
<...>
</storage_system>
</bulk_storage_systems>
Note
This example URL only returns resources that the user is authorized to see. The user must
have an ACL privilege to the project in which the file systems reside in order to get a valid
search result.
This URL returns a list of volumes tagged with VNX in XML format.
<volumes>
<volume>
<id>urn:storageos:Volume:
60d64226-7c11-49b4-8233-90fc352eedb6:</id>
<link href="/block/volumes/urn:storageos:Volume:
60d64226-7c11-49b4-8233-90fc352eedb6:" rel="self" />
<tag>VNX30Sept</tag>
</volume>
</volumes>
URL Description
- -
GET <ViPR_VIP>/{resource_URL}/tags Get tags for a specific storage
resource.
POST <ViPR_VIP>/{resource_URL}/tags Add or remove tag(s) to/from a
specific storage resource.
Note
Request body
<volume_create>
<name>Sample_Volume</name>
<size>1073741824</size>
<count>1</count>
<vpool>{vpool_id}</vpool>
<varray>{varray_id}</varray>
<project>{project_id}</project>
</volume_create>
Response
202
Response body
<tasks>
<task>
<resource>
<name>Sample_Volume</name>
<id>urn:storageos:Volume:5ba5b8d8-a0ca-4827-84f9-
c1fef57733f5:</id>
<link rel="self" href="/block/volumes/urn:storageos:Volume:
5ba5b8d8-a0ca-4827-84f9-c1fef57733f5:" />
</resource>
<state>pending</state>
<start_time>1379398608574</start_time>
<op_id>265cf333-76a1-4129-903e-fac63f9b4adc</op_id>
<link rel="self" href="/block/volumes/urn:storageos:Volume:
5ba5b8d8-a0ca-4827-84f9-c1fef57733f5:/tasks/265cf333-76a1-4129-903e-
fac63f9b4adc" />
</task>
</tasks>
The garbage collection process collects all resources that have been inactive for more
than 10 minutes and removes them from the database if no related resources exist in the
database. Thus, a resource is mostly likely to be garbage collected within 20 minutes
after it was made inactive.
Most (but not all) API requests return resources that might be inactive. For example, bulk
search APIs do not filter out inactive resources. Inactive resources are not appropriate for
any operations as they can disappear from the database at any moment. It is the
responsibility of the API developer to determine if a resource is active before engaging it
in further processing. You can check the state of the resource by checking the inactive
property of that resource.
Adding storage systems to ViPR can only be performed by a user with a System
Administrator role. When storage systems are added, ViPR automatically discovers the
storage pools and ports on each storage system and adds them into the ViPR virtual data
center.
ViPR supports the following types of storage systems:
u EMC VPLEX, VMAX, VNX, Isilon, and NetApp storage systems for block and file storage
provisioning.
u VNX file, Isilon, and NetApp filers for object storage.
Add your storage system, using one of the following procedures:
u Registering and discovering physical storage systems in VNX Block and VMAX on
page 138
u Registering and discovering an Isilon storage system on page 140
{
"network_system_create": {
"name": "Brocade1",
"ip_address": "192.168.0.100",
"port_number": "5989",
"smis_provider_ip": "192.168.0.0",
"smis_user_name": "Administrator",
"smis_password": "password",
"smis_use_ssl": "true",
"smis_port_number": "5989",
"system_type": "brocade"
}
}
Response
HTTP 202 Accepted
{
"task": {
"op_id": "e97d0f47-bc42-4095-830a-b8c0fa4df71e",
"resource": {
"id": "urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:",
"link": {
"-href": "/vdc/network-systems/urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:",
"-rel": "self"
},
"name": "Brocade1"
},
"link": {
"-href": "/vdc/network-systems/urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:/tasks/e97d0f47-
bc42-4095-830a-b8c0fa4df71e",
"-rel": "self"
},
"start_time": "1386950209819",
"state": "pending"
}
}
2. Query the discover network system task URI until the message attribute of the task is
Operation completed successfully .
Request
GET https://<ViPR_VIP>:4443/vdc/network-systems/
urn:storageos:NetworkSystem:241cd3d2-825a-44f1-86de-2c0d23417b1e:/
tasks/e97d0f47-bc42-4095-830a-b8c0fa4df71e
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 200 OK
{
"task": {
"end_time": "1386950212551",
"message": "Operation completed successfully",
"op_id": "e97d0f47-bc42-4095-830a-b8c0fa4df71e",
"resource": {
"id": "urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:",
"link": {
"-href": "/vdc/network-systems/urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:",
"-rel": "self"
},
"name": "Brocade1"
},
"link": {
"-href": "/vdc/network-systems/urn:storageos:NetworkSystem:
241cd3d2-825a-44f1-86de-2c0d23417b1e:/tasks/e97d0f47-
bc42-4095-830a-b8c0fa4df71e",
"-rel": "self"
},
"start_time": "1386950209819",
"state": "ready"
}
}
u The username and password for connecting to the protection system device
management port. The credentials must be for an account that has the RecoverPoint
admin role to access the RecoverPoint site.
u The management port number of the protection system device. The default port to
communicate with RecoverPoint is 7225.
Procedure
1. Register the protection system by sending a POST <ViPR_VIP>:4443/ vdc/
protection-systems request.
The request returns a task whose URI can be queried to determine the status of the
task such as completion, any failures, time of task request, and time of task
completion.
Request
POST https://<ViPR_VIP>:4443/vdc/protection-systems
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
{
"ip_address": "192.168.0.10",
"name": "RP_DEV_MET",
"password": "admin",
"port_number": "7225",
"system_type": "rp",
"user_name": "admin"
}
Response
202 Accepted
{
"task": {
"op_id": "f39b188a-472f-4e2c-8079-01cf0f0a48b2",
"resource": {
"id": "urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:",
"link": {
"-href": "/vdc/protection-systems/
urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:",
"-rel": "self"
},
"name": "RP_DEV_MET"
},
"link": {
"-href": "/vdc/protection-systems/
urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:/tasks/
f39b188a-472f-4e2c-8079-01cf0f0a48b2",
"-rel": "self"
},
"start_time": "1386302068992",
"state": "pending"
}
}
2. Repeat the query of the protection system registration task, using the task URI from
the response body of the POST request, until the message attribute of the task is
Operation completed successfully.
Request
GET https://<ViPR_VIP>:4443/vdc/protection-systems/
urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:/tasks/
f39b188a-472f-4e2c-8079-01cf0f0a48b2
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
200 OK
{
"task": {
"end_time": "1386302069431",
"message": "Operation completed successfully",
"op_id": "f39b188a-472f-4e2c-8079-01cf0f0a48b2",
"resource": {
"id": "urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:",
"link": {
"-href": "/vdc/protection-systems/
urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:",
"-rel": "self"
},
"name": "RP_DEV_MET"
},
"link": {
"-href": "/vdc/protection-systems/
urn:storageos:ProtectionSystem:
70f63a68-5d69-4fe4-9934-847f23a9db5a:/tasks/
f39b188a-472f-4e2c-8079-01cf0f0a48b2",
"-rel": "self"
},
"start_time": "1386302068992",
"state": "error"
}
Host
Hosts are computers that use software including Windows, Linux, and VMware for their
operating system. In ViPR, hosts are tenant resources like volumes, file systems, and
buckets. Unlike those resources, however, hosts are imported and discovered rather than
provisioned by ViPR.
Hosts must be imported into ViPR by the Tenant Administrator before storage may be
exported and attached to them. By default, hosts are not assigned to a project which
means only the Tenant Administrator may see them and export/attach storage to them. If
further delegation is required, the Tenant Administrator may assign a host to a project.
Anyone who has privileges to manage resources in that project may then see and export/
attach storage to that host.
Hosts are not explicitly associated with virtual arrays. The host-to-virtual array
association is implied based on network connectivity.
PUT https://<ViPR_VIP>:4443/tenants/urn:storageos:TenantOrg:
757053b7-b952-41b9-83e1-44204b67a368:/hosts
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
{
"host_name": "myhost",
"name": "myhost",
"os_version": "1.0",
"password": "password",
"port_number": "8111",
"type": "Windows",
"use_ssl": null,
"user_name": "user"
}
Response
{
"link": {
"href": "/compute/hosts/{Host_URN}",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "674689c2-74fd-45f8-a13a-8ee48525ffe3",
"resource": {
"id": "urn:storageos:Host:037aeb4e-
c6e4-4fa3-8a67-6db94a93a6c5:",
"link": {
"href": "/compute/hosts/urn:storageos:Host:037aeb4e-
c6e4-4fa3-8a67-6db94a93a6c5:",
"rel": "self"
},
"name": "myhost"
},
"start_time": 1379202603051,
"state": "ready"
}
3. Register an initiator associated with the host by calling the following POST.
Request
POST https://<ViPR_VIP>:4443/compute/hosts/{Host_URN}/initiators
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
{
"initiator_node": "20:99:59:52:95:00:92:BE",
"initiator_port": "10:13:27:65:60:38:68:BE",
"protocol": "FC"
}
Response
HTTP 200 OK
{
"creation_time": 1379202603661,
"host": {
"id": "urn:storageos:Host:037aeb4e-
c6e4-4fa3-8a67-6db94a93a6c5:",
"link": {
"href": "/compute/hosts/urn:storageos:Host:037aeb4e-
c6e4-4fa3-8a67-6db94a93a6c5:",
"rel": "self"
}
},
"hostname": "myhost",
"id": "urn:storageos:Initiator:07b2e71d-
cb4c-49c9-94fe-1feab7878d35:",
"inactive": false,
"initiator_node": "20:99:59:52:95:00:92:BE",
"initiator_port": "10:13:27:65:60:38:68:BE",
"link": {
"href": "/compute/initiators/urn:storageos:Initiator:
07b2e71d-cb4c-49c9-94fe-1feab7878d35:",
"rel": "self"
},
"protocol": "FC",
"tags": []
}
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"auto_san_zoning": "true",
"name": "Freemont"
}
Response
HTTP 200 OK
{
"auto_san_zoning": true,
"creation_time": 1379202577579,
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"inactive": false,
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
},
"name": "Freemont",
"tags": []
}
2. Create an ACL for the varray and assign the tenant user to the ACL by sending a
PUT /vdc/varrays/{identifier}/acl request.
The request returns the representation of the new ACL.
Request
PUT https://<ViPR_VIP>:4443/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:/
acl
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"add": [
{
"privilege": [
"USE"
],
"tenant": "urn:storageos:TenantOrg:757053b7-
b952-41b9-83e1-44204b67a368:"
}
]
}
Response
HTTP 200 OK
{
"acl": [
{
"privilege": [
"USE"
],
"tenant": "urn:storageos:TenantOrg:757053b7-
b952-41b9-83e1-44204b67a368:"
}
]
}
3. Get the ID of the physical storage array, on which the storage pools were created, by
sending a POST request to /vdc/storage-systems.
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"storage_system": [
{
"id": "urn:storageos:StorageSystem:56d8aa7e-45fe-4383-
b49a-fec72e9927d3:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"rel": "self"
},
"name": "CLARIION+APM00121500018"
}
]
}
4. Use the storage array ID to get detailed information about the storage array by
sending a GET/vdc/storage-systems/{identifier} request.
The request returns the representation of the storage array.
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"active_provider_uri": {
"id": "urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-
c7b225f413d5:",
"link": {
"href": "/vdc/smis-providers/
urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:",
"rel": "self"
}
},
"assocociated_systems": [],
"async_actions": [
"CreateGroupReplica",
"CreateElementReplica"
],
"compatibility_status": "COMPATIBLE",
"creation_time": 1379202543258,
"export_masks": [],
"firmware_version": "05.32.000.5.207",
"id": "urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-
fec72e9927d3:",
"inactive": false,
"ip_address": "10.247.99.27",
"job_discovery_status": "COMPLETE",
"job_metering_status": "CREATED",
"last_discovery_run_time": 1379202575496,
"last_discovery_status_message": "Discovery completed
successfully for Storage System: urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"last_metering_run_time": 0,
"link": {
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"rel": "self"
},
"max_resources": -1,
"model": "Rack Mounted VNX5500",
"name": "CLARIION+APM00121500018",
"native_guid": "CLARIION+APM00121500018",
"next_discovery_run_time": 1379206145976,
"next_metering_run_time": 0,
"num_resources": 0,
"protocols": [],
"reachable": true,
"registration_status": "REGISTERED",
"secondary_ips": [],
"serial_number": "APM00121500018",
"smis_port_number": 5988,
"smis_provider_ip": "10.247.99.27",
"smis_providers": [
{
"id":
"urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:",
"link": {
"href": "/vdc/smis-providers/
urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:",
"rel": "self"
}
}
],
"smis_use_ssl": false,
"smis_user_name": "admin",
"supported_provisioning_type": "THIN_AND_THICK",
"system_type": "vnxblock",
"tags": []
}
5. Get the list of virtual arrays by sending a GET /vdc/varrays request.
GET https://<ViPR_VIP>:4443/vdc/varrays
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"varray": [
{
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
},
"name": "Freemont"
}
]
}
6. Use the virtual array ID to get detailed information about the virtual array by sending a
GET /vdc/varrays/{identifier} request.
GET https://<ViPR_VIP>:4443/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"auto_san_zoning": true,
"creation_time": 1379202577579,
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"inactive": false,
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
},
"name": "Freemont",
"tags": []
}
7. Get the list of storage pools on the physical storage array by sending a GET /vdc/
storage-systems/{identifier}/storage-pools request.
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"storage_pool": [
{
"id": "urn:storageos:StoragePool:
0d3c05e3-40f6-4044-89c6-5067e87d24c4:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:
0d3c05e3-40f6-4044-89c6-5067e87d24c4:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+C+0008"
},
{
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+U+Pool 2"
},
{
"id": "urn:storageos:StoragePool:7537a16d-0901-4ded-
af7b-fbb9a9ec6ac9:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:7537a16d-0901-4ded-af7b-
fbb9a9ec6ac9:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+C+0000"
},
{
"id": "urn:storageos:StoragePool:78caaf4a-673e-4580-
ae41-a545a45e5e28:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+U+Pool 1"
},
{
"id": "urn:storageos:StoragePool:
84f2d5f0-4e7c-4914-903c-c6abb7015229:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:84f2d5f0-4e7c-4914-903c-
c6abb7015229:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+C+0002"
},
{
"id": "urn:storageos:StoragePool:
9ae020ba-544b-4ce3-88b7-f1019cd7a9eb:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:9ae020ba-544b-4ce3-88b7-
f1019cd7a9eb:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+C+0001"
},
{
"id": "urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"rel": "self"
},
"name": "CLARIION+APM00121500018+POOL+U+Pool 0"
}
]
}
8. Get the detailed information of the storage pool to add to the virtual array by sending
a GET /vdc/storage-systems/{identifier}/storage-pools/
{pool_id} request.
In this example the detailed information of two different storage pools is being
obtained.
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:
0d3c05e3-40f6-4044-89c6-5067e87d24c4:
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"assigned_varrays": [],
"connected_varrays": [],
"controller_params": [],
"copy_types": [
"UNSYNC_UNASSOC",
"SYNC",
"UNSYNC_ASSOC"
],
"creation_time": 1379202572346,
"drive_types": [
"SAS"
],
"free_gb": 0,
"id": "urn:storageos:StoragePool:
0d3c05e3-40f6-4044-89c6-5067e87d24c4:",
"inactive": false,
"link": {
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:0d3c05e3-40f6-4044-89c6-5067e87d24c4:",
"rel": "self"
},
"max_pool_utilization_percentage": 75,
"max_resources": -1,
"maximum_thick_volume_size_gb": 0,
"maximum_thin_volume_size_gb": 0,
"minimum_thick_volume_size_gb": 0,
"minimum_thin_volume_size_gb": 0,
"name": "CLARIION+APM00121500018+POOL+C+0008",
"native_guid": "CLARIION+APM00121500018+POOL+C+0008",
"operational_status": "READY",
"percent_subscribed": 101,
"percent_used": 100,
"pool_name": "0008",
"pool_service_type": "block",
"protocols": [
"iSCSI",
"FC"
],
"raid_levels": [
"RAID5"
],
"registration_status": "REGISTERED",
"storage_system": {
"id": "urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-
fec72e9927d3:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"rel": "self"
}
},
"subscribed_gb": 1606,
"supported_resource_types": "THICK_ONLY",
"tagged_varrays": [],
"tags": [],
"thin_volume_preallocation_supported": false,
"tier_utilization_percentages": [],
"usable_gb": 1605,
"used_gb": 1605
}
Response
HTTP 200 OK
{
"assigned_varrays": [],
"connected_varrays": [],
"controller_params": [],
"copy_types": [
"UNSYNC_UNASSOC",
"SYNC",
"UNSYNC_ASSOC"
],
"creation_time": 1379202572346,
"drive_types": [
"SAS"
],
"free_gb": 294,
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"inactive": false,
"link": {
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
},
"max_pool_utilization_percentage": 75,
"max_resources": -1,
"max_thin_pool_subscription_percentage": 300,
"maximum_thick_volume_size_gb": 285,
"maximum_thin_volume_size_gb": 16384,
"minimum_thick_volume_size_gb": 0,
"minimum_thin_volume_size_gb": 0,
"name": "CLARIION+APM00121500018+POOL+U+Pool 2",
"native_guid": "CLARIION+APM00121500018+POOL+U+Pool 2",
"operational_status": "READY",
"percent_subscribed": 108,
"percent_used": 45,
"pool_name": "Pool 2",
"pool_service_type": "block",
"protocols": [
"iSCSI",
"FC"
],
"raid_levels": [
"RAID10"
],
"registration_status": "REGISTERED",
"storage_system": {
"id": "urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-
fec72e9927d3:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"rel": "self"
}
},
"subscribed_gb": 568,
"supported_resource_types": "THIN_AND_THICK",
"tagged_varrays": [],
"tags": [],
"thin_volume_preallocation_supported": false,
"tier_utilization_percentages": [
{
"name": "SATA",
"value": "100"
}
],
"usable_gb": 528,
"used_gb": 234
}
9. Assign a storage pool to the virtual array by sending a PUT /vdc/storage-
pools/{identifier} request.
PUT https://<ViPR_VIP>:4443/vdc/storage-pools/
urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"varray_assignment_changes": {
"add": {
"varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
]
}
}
}
Response
HTTP 200 OK
{
"assigned_varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
],
"connected_varrays": [],
"controller_params": [],
"copy_types": [
"UNSYNC_UNASSOC",
"SYNC",
"UNSYNC_ASSOC"
],
"creation_time": 1379202572346,
"drive_types": [
"SAS"
],
"free_gb": 294,
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"inactive": false,
"link": {
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
},
"max_pool_utilization_percentage": 75,
"max_resources": -1,
"max_thin_pool_subscription_percentage": 300,
"maximum_thick_volume_size_gb": 285,
"maximum_thin_volume_size_gb": 16384,
"minimum_thick_volume_size_gb": 0,
"minimum_thin_volume_size_gb": 0,
"name": "CLARIION+APM00121500018+POOL+U+Pool 2",
"native_guid": "CLARIION+APM00121500018+POOL+U+Pool 2",
"operational_status": "READY",
"percent_subscribed": 108,
"percent_used": 45,
"pool_name": "Pool 2",
"pool_service_type": "block",
"protocols": [
"iSCSI",
"FC"
],
"raid_levels": [
"RAID10"
],
"registration_status": "REGISTERED",
"storage_system": {
"id": "urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-
fec72e9927d3:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:",
"rel": "self"
}
},
"subscribed_gb": 568,
"supported_resource_types": "THIN_AND_THICK",
"tagged_varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
],
"tags": [],
"thin_volume_preallocation_supported": false,
"tier_utilization_percentages": [
{
"name": "SATA",
"value": "100"
}
],
"usable_gb": 528,
"used_gb": 234
}
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"network": [
{
"id": "urn:storageos:Network:
416c286c-3bbd-4923-840d-07945db2705b:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
416c286c-3bbd-4923-840d-07945db2705b:",
"rel": "self"
},
"name": "FABRIC_losam082-fabric"
},
{
"id": "urn:storageos:Network:
7bc25e2b-2221-48f9-9234-087096d71520:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
7bc25e2b-2221-48f9-9234-087096d71520:",
"rel": "self"
},
"name": "FABRIC_VPLEX_WAN_lglw9208/lglw9209"
},
{
"id": "urn:storageos:Network:1253ec15-3ef9-4c73-
a9e1-785904d17ff1:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
1253ec15-3ef9-4c73-a9e1-785904d17ff1:",
"rel": "self"
},
"name": "FABRIC_fake array fabric"
},
{
"id": "urn:storageos:Network:6e7069ed-ba69-4342-90d4-
ffdaed89aff8:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
6e7069ed-ba69-4342-90d4-ffdaed89aff8:",
"rel": "self"
},
"name": "FABRIC_lglah043_11-10:00:00:05:1e:9b:49:9a"
},
{
"id": "urn:storageos:Network:
22a50b48-1cb6-4948-96f3-57c546724333:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
22a50b48-1cb6-4948-96f3-57c546724333:",
"rel": "self"
},
"name":
"FABRIC_VPlex_LGL6220_FID_30-10:00:00:27:f8:58:f6:c1"
},
{
"id":
"urn:storageos:Network:ef704425-95b4-4f7a-9fce-91f4ddb322c6:",
"link": {
"href": "/vdc/networks/
urn:storageos:Network:ef704425-95b4-4f7a-9fce-91f4ddb322c6:",
"rel": "self"
},
"name": "FABRIC_VPlex_Meta_Fid_20"
},
{
"id": "urn:storageos:Network:d9abe55b-7b0c-43a5-
aaa6-5ddeb769f32f:",
"link": {
"href": "/vdc/networks/
urn:storageos:Network:d9abe55b-7b0c-43a5-aaa6-5ddeb769f32f:",
"rel": "self"
},
"name": "FABRIC_VPlex_LGL6221_FID_40"
},
{
"id": "urn:storageos:Network:c11db7cd-3f26-42a4-894c-
f476d06c7f36:",
"link": {
"href": "/vdc/networks/
urn:storageos:Network:c11db7cd-3f26-42a4-894c-f476d06c7f36:",
"rel": "self"
},
"name": "FABRIC_vplex154nbr2"
},
{
"id": "urn:storageos:Network:2973cd79-
b9c1-4a20-9466-95ad06d5f192:",
"link": {
"href": "/vdc/networks/urn:storageos:Network:
2973cd79-b9c1-4a20-9466-95ad06d5f192:",
"rel": "self"
},
"name": "FABRIC_Vplex_WAN-10:00:00:27:f8:58:f6:bc"
}
]
}
12.Assign the VSAN to the virtual array (endpoints trimmed) by sending a PUT /vdc/
networks/{identifier} request.
PUT https://<ViPR_VIP>:4443/vdc/networks/urn:storageos:Network:
416c286c-3bbd-4923-840d-07945db2705b:
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
]
}
Response
HTTP 200 OK
{
"creation_time": 1379202583924,
"discovered": true,
"endpoints": [
"10:00:00:90:FA:13:83:97",
"10:00:00:00:C9:47:25:9E"
],
"endpoints_discovered": [
{
"name": "10:00:00:00:C9:47:25:9E",
"value": "true"
},
{
"name": "10:00:00:90:FA:13:83:97",
"value": "true"
}
],
"fabric_id": "losam082-fabric",
"id": "urn:storageos:Network:
416c286c-3bbd-4923-840d-07945db2705b:",
"inactive": false,
"link": {
"href": "/vdc/networks/urn:storageos:Network:
416c286c-3bbd-4923-840d-07945db2705b:",
"rel": "self"
},
"name": "FABRIC_losam082-fabric",
"native_guid": "FC+BROCADE+10:00:00:27:F8:49:E8:7C",
"network_systems": [
"urn:storageos:NetworkSystem:518f41d0-ab22-4267-
b558-0d366e4ffc42:"
],
"registration_status": "REGISTERED",
"tags": [],
"transport_type": "FC",
"varray": {
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
}
}
}
u The URN of the tenant to be assigned as the ACL to the virtual pool.
u A valid authentication token.
This example shows how to create a virtual pool, find storage pools that match your
required properties, and then assign those storage pools to the virtual pool. The final
step applies an ACL to the virtual pool.
Procedure
1. Create a virtual pool by sending a POST request to /block/vpools.
The representation of the new virtual pool is returned.
Request
POST https://<ViPR_VIP>:4443/block/vpools
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"description": "Basic Virtual Pool for Block Provisioning",
"name": "basic_vpool",
"num_paths": "1",
"protection": {
"snapshots": {
"max_native_snapshots": "10"
}
},
"protocols": [
"FC"
],
"provisioning_type": "Thin",
"use_matched_pools": "true",
"varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
]
}
Response
HTTP 200 OK
{
"assigned_storage_pools": [],
"creation_time": 1379202604198,
"description": "Basic Virtual Pool for Block Provisioning",
"expandable": true,
"id": "urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-
a26797d0a268:",
"inactive": false,
"invalid_matched_pools": [],
"link": {
"href": "/block/vpools/urn:storageos:VirtualPool:
6cd9f843-1b41-4b9f-8eb1-a26797d0a268:",
"rel": "self"
},
"matched_storage_pools": [
{
"id": "urn:storageos:StoragePool:78caaf4a-673e-4580-
ae41-a545a45e5e28:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
}
}
],
"name": "basic_vpool",
"num_paths": 1,
"protection": {
"continuous_copies": {
"max_native_continuous_copies": 0
},
"snapshots": {
"max_native_snapshots": 10
}
},
"protocols": [
"FC"
],
"provisioning_type": "Thin",
"raid_levels": [],
"tags": [],
"type": "block",
"unique_auto_tier_policy_names": false,
"use_matched_pools": true,
"varrays": [
{
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
}
}
]
}
2. Find the list of storage pools that match the properties of the virtual pool that was just
created by sending a POST /block/vpools/matching-pools request.
Note
Request
POST https://<ViPR_VIP>:4443/block/vpools/matching-pools
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"num_paths": "1",
"protection": {
"snapshots": {
"max_native_snapshots": "10"
}
},
"protocols": [
"FC"
],
"provisioning_type": "Thin",
"use_matched_pools": "true",
"varrays": [
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:"
]
}
Response
200 OK
{
"storage_pool": [
{
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"name": "SYMMETRIX+000198700420+POOL+TP+3R5-A",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:"
}
},
{
"id": "urn:storageos:StoragePool:9e551963-d596-48ae-
b208-1b870126d195:",
"name": "SYMMETRIX+000198700420+POOL+TP+M3",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:9e551963-d596-48ae-b208-1b870126d195:"
}
},
{
"id": "urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"name": "SYMMETRIX+000198700420+POOL+TP+M2",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:"
}
},
{
"id": "urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"name": "SYMMETRIX+000198700420+POOL+TP+data",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:"
}
},
{
"id": "urn:storageos:StoragePool:38e2a0c2-89c9-4ec7-
ad9b-29420e464012:",
"name": "SYMMETRIX+000198700420+POOL+TP+t3",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:38e2a0c2-89c9-4ec7-ad9b-29420e464012:"
}
},
{
"id": "urn:storageos:StoragePool:dbdcd42a-
b0a4-49b4-8a6e-204a09b8b1ef:",
"name": "SYMMETRIX+000198700420+POOL+TP+3R5-B",
"link": {
"rel": "self",
"href": "/vdc/storage-systems/urn:storageos:StorageSystem:
56d8aa7e-45fe-4383-b49a-fec72e9927d3:/storage-pools/
urn:storageos:StoragePool:dbdcd42a-b0a4-49b4-8a6e-204a09b8b1ef:"
}
}
]
}
3. Using the URN returned for the new virtual pool returned from the POST /block/
vpools request, assign one or more of the storage pools that match the properties of
the virtual pool by sending a PUT/block/vpools/{identifier}/assign-
matched-pools request. The representation of the updated virtual pool is returned.
Request
PUT https://<ViPR_VIP>:4443/block/vpools/urn:storageos:VirtualPool:
6cd9f843-1b41-4b9f-8eb1-a26797d0a268:/assign-matched-pools
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
{
"assigned_pool_changes": {
"add": {
"storage_pool": [
"urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:"
]
}
}
}
Response
HTTP 200 OK
{
"assigned_storage_pools": [
{
"id": "urn:storageos:StoragePool:78caaf4a-673e-4580-
ae41-a545a45e5e28:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
}
}
],
"creation_time": 1379202604198,
"description": "Basic Virtual Pool for Block Provisioning",
"expandable": true,
"id": "urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-
a26797d0a268:",
"inactive": false,
"invalid_matched_pools": [],
"link": {
"href": "/block/vpools/urn:storageos:VirtualPool:
6cd9f843-1b41-4b9f-8eb1-a26797d0a268:",
"rel": "self"
},
"matched_storage_pools": [
{
"id": "urn:storageos:StoragePool:78caaf4a-673e-4580-
ae41-a545a45e5e28:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-
a545a45e5e28:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-
a859-6c9e59a28251:",
"rel": "self"
}
},
{
"id": "urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"link": {
"href": "/vdc/storage-systems/
urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:/
storage-pools/urn:storageos:StoragePool:62d2e40d-
ced0-4114-8bb7-8d333e7ef878:",
"rel": "self"
}
}
],
"name": "basic_vpool",
"num_paths": 1,
"protection": {
"continuous_copies": {
"max_native_continuous_copies": 0
},
"snapshots": {
"max_native_snapshots": 10
}
},
"protocols": [
"FC"
],
"provisioning_type": "Thin",
"raid_levels": [],
"tags": [],
"type": "block",
"unique_auto_tier_policy_names": false,
"use_matched_pools": true,
"varrays": [
{
"id":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"link": {
"href": "/vdc/varrays/
urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"rel": "self"
}
}
]
}
4. Apply an ACL to the virtual pool by sending a PUT request to /block/vpools/
{vpool_urn}/acl. The updated ACL is returned.
Request
PUT https://<ViPR_VIP>:4443/block/vpools/urn:storageos:VirtualPool:
6cd9f843-1b41-4b9f-8eb1-a26797d0a268:/acl
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
{
"add": [
{
"privilege": [
"USE"
],
"tenant": "urn:storageos:TenantOrg:757053b7-
b952-41b9-83e1-44204b67a368:"
}
]
}
Response
HTTP 200 OK
{
"acl": [
{
"privilege": [
"USE"
],
"tenant": "urn:storageos:TenantOrg:757053b7-
b952-41b9-83e1-44204b67a368:"
}
]
}
{
"name": "myproject"
}
Response
HTTP 200
{
"id":
"urn:storageos:Project:cdb26784-9d70-413a-998c-8e6b7cd95719:",
"link": {
"href": "/projects/
urn:storageos:Project:cdb26784-9d70-413a-998c-8e6b7cd95719:",
"rel": "self"
},
"name": "myproject"
}
u File system............................................................................................................ 92
u Creating a file system............................................................................................ 92
u Expanding a file share........................................................................................... 94
u Exporting a file system.......................................................................................... 96
u Unexporting a file share........................................................................................ 97
u Deleting a file system export................................................................................. 99
u Deleting a file system.......................................................................................... 101
u Snapshot............................................................................................................ 102
u Creating a file system snapshot...........................................................................102
u Exporting a file system snapshot......................................................................... 104
u Restoring a file system snapshot......................................................................... 106
u Unexporting a file system snapshot.....................................................................107
u Deleting a file system snapshot...........................................................................109
File system
A file system is a unit of file storage capacity that has been allocated by a user to a
project.
File system provisioning operations are performed after the System Administrator has set
up the ViPR virtual data center. File systems are provisioned within the context of a
project by users who meet one of the following criteria:
u have a Tenant Administrator role.
u are a project owner.
u have an ALL access control list (ACL) permission on the project.
When a file system is created, the user must select the project and virtual array in which
the file system will reside, and the virtual pool that will define the file system's storage
performance characteristics. Once the file system is created, it can be exported to
multiple hosts. In this way, a host cluster can be provisioned with shared file storage.
Unlike block volumes, there is no virtual array restriction when exporting file systems. File
systems can be exported from any virtual array specified by the user. If no virtual array is
selected for the file system export, the ViPR file store will pick the virtual array.
"name": "fs-cosnetappf-00:50:56:91:58:91",
"size": "20MB",
"varray": "urn:storageos:VirtualArray:69df596a-34b3-4d23-
aaea-1da667593b74:",
"vpool": "urn:storageos:VirtualPool:0d5f110f-af0d-4af8-bd71-
a04635eba8be:"
}
Response
202 Accepted
{
"description": "Filesystem create",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/252396af-e4e5-4ee0-
a6b5-6606aeeaaf55",
"rel": "self"
},
"op_id": "252396af-e4e5-4ee0-a6b5-6606aeeaaf55",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958410262,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
tasks/252396af-e4e5-4ee0-a6b5-6606aeeaaf55
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN':{token_text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"description": "Filesystem create",
"end_time": 1379958413504,
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/252396af-e4e5-4ee0-
a6b5-6606aeeaaf55",
"rel": "self"
},
"resource":
{
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958410262,
"state": "ready"
}
{
"new_size": "26214400"
}
Response
202 Accepted
{
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/2f108ca5-6cb0-44c0-
b4bb-f6aed1324520",
"rel": "self"
},
"op_id": "2f108ca5-6cb0-44c0-b4bb-f6aed1324520",
"resource":
{
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958417856,
"state": "pending"
}
{
'op_id': '2f108ca5-6cb0-44c0-b4bb-f6aed1324520',
'link': {
'href':'/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/2f108ca5-6cb0-44c0-
b4bb-f6aed1324520',
'rel': 'self'
},
'state': 'pending',
'resource': {
'link':
{'href': '/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:', 'rel': 'self'},
'name': 'fs-cosnetappf-00:50:56:91:58:91',
'id': 'urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:'
},
'start_time': 1379958417856
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
tasks/2f108ca5-6cb0-44c0-b4bb-f6aed1324520
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {token_text},
'ACCEPT': 'application/json'}
Response
200 OK
{
"end_time": 1379958418794,
"link":
{
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/2f108ca5-6cb0-44c0-
b4bb-f6aed1324520",
"rel": "self"
},
"start_time": 1379958417856,
"state": "ready"
}
Response
202 Accepted
{
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/7770ff2a-433b-480c-
aef6-8c64e924339b",
"rel": "self"
},
"op_id": "7770ff2a-433b-480c-aef6-8c64e924339b",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958422465,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
tasks/7770ff2a-433b-480c-aef6-8c64e924339b
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_text}
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958422816,
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/7770ff2a-433b-480c-
aef6-8c64e924339b",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "7770ff2a-433b-480c-aef6-8c64e924339b",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958422465,
"state": "ready"
}
Requirement Description
- -
{secType} security type of the file system export
Note
The permission, security, or root user mapping of an existing export may not be changed.
In order to change one of these attributes, you must first delete the export and then
create an export with the new value.
Procedure
1. Unexport the file system by removing the required endpoint.
In this example, www.ford.com is being removed as an endpoint. In addition, NFS is
the protocol of the endpoint, sys is the security type of the export, rw is export
permissions, and nobody is the root user for the export.
Request
PUT https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
exports/NFS,sys,rw,nobody
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
{
"add": [
"www.kia.com"
],
"remove": [
"www.ford.com"
]
}
Response
202 Accepted
{
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/
74465c92-4cfa-4a1c-88f0-b63a53fdbe46",
"rel": "self"
},
"op_id": "74465c92-4cfa-4a1c-88f0-b63a53fdbe46",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958426981,
"state": "pending"
}
2. Send a GET request to the task URN that was returned by the PUT request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
tasks/74465c92-4cfa-4a1c-88f0-b63a53fdbe46
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958427315,
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/
74465c92-4cfa-4a1c-88f0-b63a53fdbe46",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "74465c92-4cfa-4a1c-88f0-b63a53fdbe46",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958426981,
"state": "ready"
}
Procedure
1. Delete the file system export. .
The request returns a task whose URI can be queried to determine the status of the
task
Request
DELETE https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
exports/NFS,sys,rw,nobody
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_text}
'ACCEPT': 'application/json'
}
Response
202 Accepted
{
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/
008f5d02-689d-4953-8b3e-0bd009b0616e",
"rel": "self"
},
"op_id": "008f5d02-689d-4953-8b3e-0bd009b0616e",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958434711,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the DELETE request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:840d01a9-8836-4c53-a95a-c6efedc81fc3:/
tasks/008f5d02-689d-4953-8b3e-0bd009b0616e
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958435051,
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:/tasks/
008f5d02-689d-4953-8b3e-0bd009b0616e",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "008f5d02-689d-4953-8b3e-0bd009b0616e",
"resource": {
"id": "urn:storageos:FileShare:840d01a9-8836-4c53-a95a-
c6efedc81fc3:",
"link": {
"href": "/file/filesystems/urn:storageos:FileShare:
840d01a9-8836-4c53-a95a-c6efedc81fc3:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91"
},
"start_time": 1379958434711,
"state": "ready"
}
Response
202 Accepted
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<associated_resources/>
<op_id>6a8b1c38-f60f-4470-a200-3efca9231d4b</op_id>
<resource>
<id>urn:storageos:FileShare:2105a51d-c867-4f2c-
a779-68ae0c282d03:</id>
<link href="/file/filesystems/urn:storageos:FileShare:
2105a51d-c867-4f2c-a779-68ae0c282d03:" rel="self"/>
<name>prov_NetApp_UnexportFilesystemWithInvalidPermissions_39</
name>
</resource>
<link href="/file/filesystems/urn:storageos:FileShare:
2105a51d-c867-4f2c-a779-68ae0c282d03:/tasks/6a8b1c38-f60f-4470-
a200-3efca9231d4b" rel="self"/>
<start_time>1388787072029</start_time>
<state>pending</state>
</task>
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/filesystems/
urn:storageos:FileShare:2105a51d-c867-4f2c-a779-68ae0c282d03:/
tasks/6a8b1c38-f60f-4470-a200-3efca9231d4b
Response
200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<task>
<associated_resources/>
<end_time>1388787074391</end_time>
<message>Operation completed successfully</message>
<op_id>6a8b1c38-f60f-4470-a200-3efca9231d4b</op_id>
<resource>
<id>urn:storageos:FileShare:2105a51d-c867-4f2c-
a779-68ae0c282d03:</id>
<link href="/file/filesystems/urn:storageos:FileShare:
2105a51d-c867-4f2c-a779-68ae0c282d03:" rel="self"/>
<name>prov_NetApp_UnexportFilesystemWithInvalidPermissions_39</
name>
</resource>
<link href="/file/filesystems/urn:storageos:FileShare:
2105a51d-c867-4f2c-a779-68ae0c282d03:/tasks/6a8b1c38-f60f-4470-
a200-3efca9231d4b" rel="self"/>
<start_time>1388787072029</start_time>
<state>ready</state>
</task>
Snapshot
A snapshot is a point-in-time copy of a volume or a file system. Snapshots are intended
for short-term operational recovery.
Snapshots have the following properties:
u A snapshot can be exported/unexported to a host, and you can delete it.
u A snapshots lifetime is tied to the original volume/file system: when the original
volume/file system is deleted, all of its snapshots will also be deleted.
u A volume/file system may be restored in place based on a snapshot.
u A snapshot is associated with the same project as the original volume/file system.
u A new volume/file system may be created using a snapshot as a template.
u Multi-volume consistent snapshots can be used to snapshot multiple volumes at
once.
{
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
}
Response
202 Accepted
{
"description": "Filesystem snapshot create",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/8eb0bfc0-c147-4a59-
bdcd-3b4294b5e02e",
"rel": "self"
},
"op_id": "8eb0bfc0-c147-4a59-bdcd-3b4294b5e02e",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958438617,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/8eb0bfc0-c147-4a59-
bdcd-3b4294b5e02e
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"description": "Filesystem snapshot create",
"end_time": 1379958439009,
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/8eb0bfc0-c147-4a59-
bdcd-3b4294b5e02e",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "8eb0bfc0-c147-4a59-bdcd-3b4294b5e02e",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958438617,
"state": "ready"
}
Response
202 Accepted
{
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/aac817fa-72d1-4b8c-
ae73-5b02e6553242",
"rel": "self"
},
"op_id": "aac817fa-72d1-4b8c-ae73-5b02e6553242",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958442647,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return the
status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/aac817fa-72d1-4b8c-
ae73-5b02e6553242
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958443025,
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/aac817fa-72d1-4b8c-
ae73-5b02e6553242",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "aac817fa-72d1-4b8c-ae73-5b02e6553242",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958442647,
"state": "ready"
}
Response
202 Accepted
{
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/6fcfd9ba-772b-4dc0-
a5c6-76f93a5919ef",
"rel": "self"
},
"op_id": "6fcfd9ba-772b-4dc0-a5c6-76f93a5919ef",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958447488,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/6fcfd9ba-772b-4dc0-
a5c6-76f93a5919ef
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/6fcfd9ba-772b-4dc0-
a5c6-76f93a5919ef",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "6fcfd9ba-772b-4dc0-a5c6-76f93a5919ef",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"state": "ready"
}
Procedure
1. Remove the file system snapshot export.
The request returns a task whose URI can be queried to determine the status of the
task.
Request
DELETE https://<ViPR_VIP>:4443/file/snapshots/
urn:storageos:Snapshot:24c83321-55a4-40d3-8a8f-2f6edbd18d49:/
exports/NFS,sys,ro,nobody
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
202 Accepted
{
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/e2c8382b-
c5e4-43ac-93dd-549e06ee97cf",
"rel": "self"
},
"op_id": "e2c8382b-c5e4-43ac-93dd-549e06ee97cf",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958451444,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the DELETE request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/e2c8382b-
c5e4-43ac-93dd-549e06ee97cf
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958451797,
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/e2c8382b-
c5e4-43ac-93dd-549e06ee97cf",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "e2c8382b-c5e4-43ac-93dd-549e06ee97cf",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958451444,
"state": "ready"
}
Response
202 Accepted
{
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/116cccf9-3cd1-4f77-
bb44-08d09ea7e772",
"rel": "self"
},
"op_id": "116cccf9-3cd1-4f77-bb44-08d09ea7e772",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958455395,
"state": "pending"
}
2. Send a GET request to the task URI that was returned by the POST request to return
the status of the task.
When the task completes successfully, the message attribute is set to Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/116cccf9-3cd1-4f77-
bb44-08d09ea7e772
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': {Token_Text},
'ACCEPT': 'application/json'
}
Response
200 OK
{
"end_time": 1379958455916,
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:/tasks/116cccf9-3cd1-4f77-
bb44-08d09ea7e772",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "116cccf9-3cd1-4f77-bb44-08d09ea7e772",
"resource": {
"id": "urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"link": {
"href": "/file/snapshots/urn:storageos:Snapshot:
24c83321-55a4-40d3-8a8f-2f6edbd18d49:",
"rel": "self"
},
"name": "fs-cosnetappf-00:50:56:91:58:91-092313174649-2"
},
"start_time": 1379958455395,
"state": "ready"
}
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text'}
'ACCEPT': 'application/json'
}
{
"count": 1,
"name": "myvolume",
"project":
"urn:storageos:Project:cdb26784-9d70-413a-998c-8e6b7cd95719:",
"size": "1GB",
"varray":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"vpool": "urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-
a26797d0a268:"
}
Response
{
"task": [
{
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/ac441447-3c88-4b62-
b8e3-a38fcae4767a",
"rel": "self"
},
"op_id": "ac441447-3c88-4b62-b8e3-a38fcae4767a",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202606192,
"state": "pending"
}
]
}
RESP = {
'task': [{'op_id': 'ac441447-3c88-4b62-b8e3-a38fcae4767a',
'link': {
'href': '/block/volumes/{Volume_URN}/tasks/ac441447-3c88-4b62-
b8e3-a38fcae4767a',
'rel': 'self'},
'state': 'pending', 'resource': {'link': {'href': '/block/
volumes/{Volume_URN}',
'rel': 'self'}, 'name': 'myvolume', 'id': '{Volume_URN}':
1379202606192}]}
[{'op_id': 'ac441447-3c88-4b62-b8e3-a38fcae4767a',
'link': {'href': '/block/volumes/{Volume_URN}/tasks/
ac441447-3c88-4b62-b8e3-a38fcae4767a',
'rel': 'self'}, 'state': 'pending', 'resource': {'link':
{'href': '/block/volumes/{Volume_URN}',
'rel': 'self'}, 'name': 'myvolume', 'id': '{Volume_URN}':
1379202606192}]
2. Monitor the task to see when the volume create operation is complete. To do this,
issue a GET on the task ID returned from the Volume Create API call.
Request
GET https://<ViPR_VIP>:4443/block/volumes/{Volume_ID}/tasks/
{Task_ID}
Headers:
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_ID}',
'ACCEPT': 'application/json'
}
Response
HTTP 200
{
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/ac441447-3c88-4b62-
b8e3-a38fcae4767a",
"rel": "self"
},
"op_id": "ac441447-3c88-4b62-b8e3-a38fcae4767a",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202606192,
"state": "pending"
}
3. Call the URL in step 2 periodically.
The task is complete when the message is Operation completed
successfully.
Response
{
"end_time": 1379202631981,
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/ac441447-3c88-4b62-
b8e3-a38fcae4767a",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "ac441447-3c88-4b62-b8e3-a38fcae4767a",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202606192,
"state": "ready"
}
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
{
"hosts": [
"urn:storageos:Host:037aeb4e-c6e4-4fa3-8a67-6db94a93a6c5:"
],
"name": "myhost-exports",
"project":
"urn:storageos:Project:cdb26784-9d70-413a-998c-8e6b7cd95719:",
"type": "Host",
"varray":
"urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:",
"volumes": [
{
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:"
}
]
}
Response
HTTP 202 Accepted
{
"description": "create export",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/
1cd9d4c4-8f5a-49a6-91c4-c93c3c058327",
"rel": "self"
},
"message": "create export",
"op_id": "1cd9d4c4-8f5a-49a6-91c4-c93c3c058327",
"resource": {
"id": "urn:storageos:ExportGroup:3074f7bd-4c6d-4259-9dc5-
ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202635022,
"state": "pending"
}
2. Check the status of the asynchronous task periodically.
The volume export is complete when the message is Operation completed
successfully.
Request
GET https://<ViPR_VIP>:4443/block/exports/{Export-Group_ID}/tasks/
1cd9d4c4-8f5a-49a6-91c4-c93c3c058327
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
200 OK
Response
{
"description": "create export",
"end_time": 1379202732747,
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/
1cd9d4c4-8f5a-49a6-91c4-c93c3c058327",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "1cd9d4c4-8f5a-49a6-91c4-c93c3c058327",
"resource": {
"id": "urn:storageos:ExportGroup:3074f7bd-4c6d-4259-9dc5-
ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202635022,
"state": "ready"
}
{
"create_inactive": null,
"name": "mysnapshot",
"type": null
}
Response
HTTP 202 Accepted
{
"task": [
{
"description": "Block snapshot create",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/29875573-5d2f-46f9-9522-609311786120",
"rel": "self"
},
"message": "Block snapshot create",
"op_id": "29875573-5d2f-46f9-9522-609311786120",
"resource": {
"id":
"urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202733863,
"state": "pending"
}
]
}
2. Call the following GET on the task ID to check the status of the create snapshot
operation.
GET https://<ViPR_VIP>:4443/block/snapshots/{Snapshot_URN}/tasks/
29875573-5d2f-46f9-9522-609311786120
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 200 OK
{
"description": "Block snapshot create",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/29875573-5d2f-46f9-9522-609311786120",
"rel": "self"
},
"message": "Block snapshot create",
"op_id": "29875573-5d2f-46f9-9522-609311786120",
"resource": {
"id": "urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202733863,
"state": "pending"
}
3. Check the status of the asynchronous task periodically.
The volume export is complete when the message is Operation completed
successfully.
GET https://<ViPR_VIP>:4443/block/snapshots/{Snapshot_URN}/tasks/
29875573-5d2f-46f9-9522-609311786120
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
200 OK
{
"description": "Block snapshot create",
"end_time": 1379202798024,
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/29875573-5d2f-46f9-9522-609311786120",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "29875573-5d2f-46f9-9522-609311786120",
"resource": {
"id": "urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202733863,
"state": "ready"
}
POST https://<ViPR_VIP>:4443/block/volumes/{Volume_URN}/protection/
snapshots/{snapshot_urn}/deactivate
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 202 Accepted
{
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/c04b87a6-7802-4d81-8081-eb57fce8317a",
"rel": "self"
},
"op_id": "c04b87a6-7802-4d81-8081-eb57fce8317a",
"resource": {
"id": "urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202799026,
"state": "pending"
}
2. Call the following GET to monitor the delete snapshot operation status.
Request
GET https://<ViPR_VIP>:4443/block/snapshots/{snapshot_urn}/tasks/
c04b87a6-7802-4d81-8081-eb57fce8317a
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
200 OK
{
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/c04b87a6-7802-4d81-8081-eb57fce8317a",
"rel": "self"
},
"op_id": "c04b87a6-7802-4d81-8081-eb57fce8317a",
"resource": {
"id": "urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202799026,
"state": "pending"
}
3. Call the GET described in step 2 periodically.
Snapshot deactivation is complete when message is Operation completed
successfully.
{
"end_time": 1379202843313,
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:/
tasks/c04b87a6-7802-4d81-8081-eb57fce8317a",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "c04b87a6-7802-4d81-8081-eb57fce8317a",
"resource": {
"id": "urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-
ac36-01468bf73975:",
"link": {
"href": "/block/snapshots/
urn:storageos:BlockSnapshot:e8b3170b-65c3-4d2f-ac36-01468bf73975:",
"rel": "self"
},
"name": "mysnapshot"
},
"start_time": 1379202799026,
"state": "ready"
}
4. Call the following POST to delete the export group that contains the snapshot.
POST https://<ViPR_VIP>:4443/block/exports/{exportgroup_urn}/
deactivate
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 200
{
"description": "delete export",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/8eecbaa2-b6b5-4075-
b723-9eea93d51e72",
"rel": "self"
},
"message": "delete export",
"op_id": "8eecbaa2-b6b5-4075-b723-9eea93d51e72",
"resource": {
"id": "urn:storageos:ExportGroup:3074f7bd-4c6d-4259-9dc5-
ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202845761,
"state": "pending"
}
6. Call the GET described in step 5 periodically.
The export group delete is complete when message is Operation completed
successfully.
{
{
"description": "delete export",
"end_time": 1379202949620,
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/8eecbaa2-b6b5-4075-
b723-9eea93d51e72",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "8eecbaa2-b6b5-4075-b723-9eea93d51e72",
"resource": {
"id": "urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202845761,
"state": "ready"
}
]
POST https://<ViPR_VIP>:4443/block/exports/{ExportGroup_URN}/
deactivate
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 202 Accepted
{
"description": "delete export",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/8eecbaa2-b6b5-4075-
b723-9eea93d51e72",
"rel": "self"
},
"message": "delete export",
"op_id": "8eecbaa2-b6b5-4075-b723-9eea93d51e72",
"resource": {
"id": "urn:storageos:ExportGroup:3074f7bd-4c6d-4259-9dc5-
ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202845761,
"state": "pending"
}
2. Monitor the deactivate export group operation by calling the following GET on the task
ID.
Request
GET https://<ViPR_VIP>:4443/block/exports/{Export_Group_URN}/tasks/
8eecbaa2-b6b5-4075-b723-9eea93d51e72
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 200 OK
{
"description": "delete export",
"link": {
"href": "/block/exports/{Export_Group_URN}/tasks/8eecbaa2-
b6b5-4075-b723-9eea93d51e72",
"rel": "self"
},
"message": "delete export",
"op_id": "8eecbaa2-b6b5-4075-b723-9eea93d51e72",
"resource": {
"id": "urn:storageos:ExportGroup:3074f7bd-4c6d-4259-9dc5-
ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202845761,
"state": "pending"
}
3. Call the GET request in step 2 periodically. The export group deactivation is complete
when the message is Operation completed successfully.
Response
HTTP 200
{
"description": "delete export",
"end_time": 1379202949620,
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:/tasks/8eecbaa2-b6b5-4075-
b723-9eea93d51e72",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "8eecbaa2-b6b5-4075-b723-9eea93d51e72",
"resource": {
"id": "urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"link": {
"href": "/block/exports/urn:storageos:ExportGroup:
3074f7bd-4c6d-4259-9dc5-ff63781049dc:",
"rel": "self"
},
"name": "myhost-exports"
},
"start_time": 1379202845761,
"state": "ready"
}
POST https://<ViPR_VIP>:4443/block/volumes/{Volume_URN}/deactivate
Headers:
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 202 Accepted
{
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/
4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"rel": "self"
},
"op_id": "4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202950804,
"state": "pending"
}
2. Monitor the volume delete operation by calling the following GET on the task ID.
Request
GET https://<ViPR_VIP>:4443/block/volumes/{Volume_URL}/tasks/
4c9b1cc6-47ce-4158-88df-2ee12322ef59
{
'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'
}
Response
HTTP 200 OK
{
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/
4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"rel": "self"
},
"op_id": "4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202950804,
"state": "pending"
}
3. Call the GET request in step 2 periodically. The volume delete is complete when the
message is Operation completed successfully.
Response
HTTP 200 OK
{
"end_time": 1379203014362,
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:/tasks/
4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "4c9b1cc6-47ce-4158-88df-2ee12322ef59",
"resource": {
"id": "urn:storageos:Volume:46a3f479-7bb0-446f-
b2b3-6ef77ea27d0d:",
"link": {
"href": "/block/volumes/urn:storageos:Volume:
46a3f479-7bb0-446f-b2b3-6ef77ea27d0d:",
"rel": "self"
},
"name": "myvolume"
},
"start_time": 1379202950804,
"state": "ready"
}
POST /admin/api/hosts/ Add a host to the discovery queue. Host discovery is performed
{{Host_URN}}/discover asynchronously. This call is directed to port 443.
GET /tenants/{Tenant_URN}/ List all clusters that belong to the specified tenant. Clusters, like
clusters hosts and vCenters, are tenant-level resources.
PUT /compute/hosts/{id} Add a host to a cluster. The payload for this call allows you to
specify a cluster name.
<host_update>
<type>Windows</type>
<host_name>myhost.corp.com</host_name>
<name>myHost</name>
<user_name>admin</user_name>
<password>password</password>
<cluster>vipr_cluster</cluster>
</host_update>
Note
Some of the API calls in the following procedure are sent to Port 4443, and others are
sent to port 443. The port number is included in th examples for clarity.
Procedure
1. Get your tenant's URN.
GET https://<ViPR_VIP>:4443/tenant
2. Use the tenant URN to create a host.
Request
POST https://<ViPR_VIP>:4443/tenants/{Tenant_URN}/hosts
<host_create>
<type>Windows</type>
<host_name>lglbc012.lss.emc.com</host_name>
<name>lglbc012</name>
<port_number>5985</port_number>
<user_name>Administrator</user_name>
<password>Dangerous01</password>
<use_ssl>No</use_ssl>
</host_create>
Response
HTTP 202 Accepted
<task>
<associated_resources/>
<message>Operation completed successfully</message>
<op_id>f50ca6c4-d66c-4ddf-868f-3703c2a092df</op_id>
<resource>
<id>urn:storageos:Host:e34e171a-97b7-4dc9-b3b7-c57fb9c3e45c:</
id>
<link href="/compute/hosts/
urn:storageos:Host:e34e171a-97b7-4dc9-b3b7-c57fb9c3e45c:"
rel="self"/>
<name>lglbc012</name>
</resource>
<link href="/compute/hosts/urn:storageos:Host:e34e171a-97b7-4dc9-
b3b7-c57fb9c3e45c:/tasks/f50ca6c4-d66c-4ddf-868f-3703c2a092df"
rel="self"/>
<start_time>1386365633873</start_time>
<state>ready</state>
</task>
3. Get the URN of the new host from the response to the host create call, and call the
following API to discover the host, and its initiator ports.
POST https://<ViPR_VIP>:443/admin/api/hosts/
urn:storageos:Host:e34e171a-97b7-4dc9-b3b7-c57fb9c3e45c:/discover
4. Check the user interface to see if the host has completed discovery, or check the host
resource. The host should contain the status shown in the following example.
Request
GET https://<ViPR_VIP>:4443/compute/hosts/
urn:storageos:Host:e34e171a-97b7-4dc9-b3b7-c57fb9c3e45c:
Response
HTTP 200 OK
<host>
<creation_time>1386365633865</creation_time>
<id>urn:storageos:Host:e34e171a-97b7-4dc9-b3b7-c57fb9c3e45c:</id>
<inactive>false</inactive>
<link href="/compute/hosts/urn:storageos:Host:e34e171a-97b7-4dc9-
b3b7-c57fb9c3e45c:" rel="self"/>
<name>lglbc012</name>
<tags/>
<native_guid/>
<compatibility_status>COMPATIBLE</compatibility_status>
<job_discovery_status>COMPLETE</job_discovery_status>
<last_discovery_run_time>1386366866868</last_discovery_run_time>
<last_discovery_status_message/>
<last_metering_run_time>0</last_metering_run_time>
<job_metering_status>CREATED</job_metering_status>
<next_discovery_run_time>0</next_discovery_run_time>
<next_metering_run_time>0</next_metering_run_time>
<registration_status>REGISTERED</registration_status>
<tenant>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</id>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
</tenant>
<host_name>lglbc012.lss.emc.com</host_name>
<os_version>6.2.9200 Microsoft Windows Server 2012 Standard</
os_version>
<port_number>5985</port_number>
<type>Windows</type>
<use_ssl>false</use_ssl>
<user_name>Administrator</user_name>
</host>
Windows clusters
When you discover a Windows host that is part of a windows cluster, that cluster is added
to ViPR. ViPR clusters allow you to allocate block storage to a group of hosts.
ViPR does not directly discover Windows clusters. Windows clusters are discovered when
you discover a host belonging to that cluster. Windows host resources specify the ID of
the cluster when the host belongs to a cluster.
<cluster>
<id>urn:storageos:Cluster:37dcbba9-2158-4976-b937-c167e8e738a2:</
id>
<link href="/compute/clusters/urn:storageos:Cluster:
37dcbba9-2158-4976-b937-c167e8e738a2:" rel="self"/>
</cluster>
If the host does not belong to a cluster, the cluster is omitted from the resource.
The following shows a Windows host that belongs to a cluster.
Request
GET https://<ViPR_VIP>:4443/compute/hosts/urn:storageos:Host:0f034ce7-
b830-4a47-8cc4-71b6b792589b:
Response
HTTP 200 OK
<host>
<creation_time>1386882454404</creation_time>
<id>urn:storageos:Host:0f034ce7-b830-4a47-8cc4-71b6b792589b:</id>
<inactive>false</inactive>
<link href="/compute/hosts/urn:storageos:Host:0f034ce7-
b830-4a47-8cc4-71b6b792589b:" rel="self"/>
<name>lglw7150.lss.emc.com</name>
<tags/>
<native_guid/>
<compatibility_status>COMPATIBLE</compatibility_status>
<job_discovery_status>COMPLETE</job_discovery_status>
<last_discovery_run_time>1386882462221</last_discovery_run_time>
<last_discovery_status_message/>
<last_metering_run_time>0</last_metering_run_time>
<job_metering_status>CREATED</job_metering_status>
<next_discovery_run_time>0</next_discovery_run_time>
<next_metering_run_time>0</next_metering_run_time>
<registration_status>REGISTERED</registration_status>
<success_discovery_time>0</success_discovery_time>
<success_metering_time>0</success_metering_time>
<tenant>
<id>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</id>
<link href="/tenants/urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:" rel="self"/>
</tenant>
<cluster>
<id>urn:storageos:Cluster:37dcbba9-2158-4976-b937-c167e8e738a2:</
id>
<link href="/compute/clusters/urn:storageos:Cluster:
37dcbba9-2158-4976-b937-c167e8e738a2:" rel="self"/>
</cluster>
<discoverable>true</discoverable>
<host_name>lglw7150.lss.emc.com</host_name>
<os_version>6.2.9200 Microsoft Windows Server 2012 Standard</
os_version>
<port_number>5985</port_number>
<type>Windows</type>
<use_ssl>false</use_ssl>
<user_name>administrator</user_name>
</host>
Response
HTTP 200 OK
<cluster>
<creation_time>1386882461075</creation_time>
<id>urn:storageos:Cluster:37dcbba9-2158-4976-b937-c167e8e738a2:</id>
<inactive>false</inactive>
<link href="/compute/clusters/urn:storageos:Cluster:
37dcbba9-2158-4976-b937-c167e8e738a2:" rel="self"/>
<name>VIPR-WINDOWS</name>
<tags/>
<tenant>
<id>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</id>
<link href="/tenants/urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:" rel="self"/>
</tenant>
</cluster>
Note
Some of the API calls in the following procedure are sent to port 4443, and others are
sent to port 443. The port number is included in the examples for clarity.
Procedure
1. Get your tenant's URN.
GET https://<ViPR_VIP>:4443/tenant
2. Use the tenant URN to create a host.
Request
POST https://<ViPR_VIP>:4443/tenants/{Tenant_URN}/hosts
<host_create>
<type>Linux</type>
<host_name>lglw7141.lss.emc.com</host_name>
<name>lglw7141</name>
<port_number>22</port_number>
<user_name>root</user_name>
<password>dangerous</password>
<use_ssl>No</use_ssl>
</host_create>
Response
HTTP 202 Accepted
<task>
<associated_resources/>
<message>Operation completed successfully</message>
<op_id>90827e3a-ce0f-42b3-9499-d43986dba44b</op_id>
<resource>
<id>urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:</
id>
<link href="/compute/hosts/
urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:"
rel="self"/>
<name>lglw7141</name>
</resource>
<link href="/compute/hosts/
urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:/tasks/
90827e3a-ce0f-42b3-9499-d43986dba44b" rel="self"/>
<start_time>1386618442169</start_time>
<state>ready</state>
</task>
Response
<host>
<creation_time>1386618442154</creation_time>
<id>urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:</id>
<inactive>false</inactive>
<link href="/compute/hosts/
urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:"
rel="self"/>
<name>lglw7141</name>
<tags/>
<native_guid/>
<compatibility_status>COMPATIBLE</compatibility_status>
<job_discovery_status>COMPLETE</job_discovery_status>
<last_discovery_run_time>1386619685871</last_discovery_run_time>
<last_discovery_status_message/>
<last_metering_run_time>0</last_metering_run_time>
<job_metering_status>CREATED</job_metering_status>
<next_discovery_run_time>0</next_discovery_run_time>
<next_metering_run_time>0</next_metering_run_time>
<registration_status>REGISTERED</registration_status>
<tenant>
<id>urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-
c40b6de2c72f:</id>
<link href="/tenants/
urn:storageos:TenantOrg:d61d9fa1-9886-40ef-85d3-c40b6de2c72f:"
rel="self"/>
</tenant>
<host_name>lglw7141.lss.emc.com</host_name>
<os_version>RHEL 5.9.0.2</os_version>
<port_number>22</port_number>
<type>Linux</type>
<use_ssl>false</use_ssl>
<user_name>root</user_name>
</host>
Note
Some of the API calls in the following procedure are sent to Port 4443, and others are
sent to port 443. The port number is included in the examples for clarity.
Procedure
1. Get your tenant's URN.
GET https://<ViPR_VIP>:4443/tenant
2. Use the tenant URN to create a host.
Request
POST https://<ViPR_VIP>:4443/tenants/{Tenant_URN}/vcenters
<vcenter_create>
<ip_address>myvcenter.corp.emc.com</ip_address>
<name>myvcenter.corp.emc.com</name>
<user_name>domain\username</user_name>
<password>pa$$words</password>
</vcenter_create>
Response
HTTP 202 Accepted
<task>
<associated_resources/>
<message>Operation completed successfully</message>
<op_id>1bbd3c99-5f59-4eef-9152-f149357e7acb</op_id>
<resource>
<id>urn:storageos:Vcenter:5bb76aae-1b75-4fca-89ec-
e463df0cba13:</id>
<link href="/compute/vcenters/urn:storageos:Vcenter:
5bb76aae-1b75-4fca-89ec-e463df0cba13:" rel="self"/>
<name>my_vcenter</name>
</resource>
<link href="/compute/vcenters/urn:storageos:Vcenter:
5bb76aae-1b75-4fca-89ec-e463df0cba13:/tasks/
1bbd3c99-5f59-4eef-9152-f149357e7acb" rel="self"/>
<start_time>1386705168500</start_time>
<state>ready</state>
</task>
Response
HTTP 200 OK
<vcenter>
<creation_time>1386860663431</creation_time>
<id>urn:storageos:Vcenter:5bb76aae-1b75-4fca-89ec-e463df0cba13:</
id>
<inactive>false</inactive>
<link href="/compute/vcenters/urn:storageos:Vcenter:
5bb76aae-1b75-4fca-89ec-e463df0cba13:" rel="self"/>
<name>Lglba041</name>
<tags/>
<native_guid/>
<compatibility_status>COMPATIBLE</compatibility_status>
<job_discovery_status>COMPLETE</job_discovery_status>
<last_discovery_run_time>1386860840239</last_discovery_run_time>
<last_discovery_status_message/>
<last_metering_run_time>0</last_metering_run_time>
<job_metering_status>CREATED</job_metering_status>
<next_discovery_run_time>0</next_discovery_run_time>
<next_metering_run_time>0</next_metering_run_time>
<registration_status>REGISTERED</registration_status>
<success_discovery_time>0</success_discovery_time>
<success_metering_time>0</success_metering_time>
<tenant>
<id>urn:storageos:TenantOrg:7985d438-9980-41df-
bba1-29d6a873f811:</id>
<link href="/tenants/urn:storageos:TenantOrg:
7985d438-9980-41df-bba1-29d6a873f811:" rel="self"/>
</tenant>
<ip_address>10.247.166.41</ip_address>
<os_version>5.1.0</os_version>
<user_name>cc-ro</user_name>
</vcenter>
Response
HTTP 200 OK
<clusters>
<cluster>
<id>urn:storageos:Cluster:c8fe93d7-a7c2-4c93-a338-a31e22aab490:</
id>
<link href="/compute/clusters/urn:storageos:Cluster:c8fe93d7-
a7c2-4c93-a338-a31e22aab490:" rel="self"/>
<name>Mgmt-Cluster</name>
</cluster>
<cluster>
<id>urn:storageos:Cluster:37e6b15a-d503-47cc-b18a-6d59594001b9:</
id>
<link href="/compute/clusters/urn:storageos:Cluster:37e6b15a-
d503-47cc-b18a-6d59594001b9:" rel="self"/>
<name>CSE-Cluster-CISCO</name>
</cluster>
</clusters>
Response
HTTP 200 OK
<hosts>
<host>
<id>urn:storageos:Host:003422cf-6596-43da-b382-816486fd58e9:</id>
<link href="/compute/hosts/urn:storageos:Host:003422cf-6596-43da-
b382-816486fd58e9:" rel="self"/>
<name>lglba180.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:492ed254-282f-4cd4-bb76-34777db9152e:</id>
<link href="/compute/hosts/urn:storageos:Host:492ed254-282f-4cd4-
bb76-34777db9152e:" rel="self"/>
<name>lglac019.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:8e854ee0-ca64-4642-9cea-527dfb1b19a8:</id>
<link href="/compute/hosts/urn:storageos:Host:8e854ee0-
ca64-4642-9cea-527dfb1b19a8:" rel="self"/>
<name>lglba181.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:27dab0f2-70cc-4bbe-81ef-a9b66ddb14ca:</id>
<link href="/compute/hosts/urn:storageos:Host:
27dab0f2-70cc-4bbe-81ef-a9b66ddb14ca:" rel="self"/>
<name>lglba241.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:8ea2ef78-a072-41df-ada9-951433cc6464:</id>
<link href="/compute/hosts/urn:storageos:Host:8ea2ef78-a072-41df-
ada9-951433cc6464:" rel="self"/>
<name>lglba046.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:807d346a-3b47-4412-9ab5-8f516e792b71:</id>
<link href="/compute/hosts/urn:storageos:Host:
807d346a-3b47-4412-9ab5-8f516e792b71:" rel="self"/>
<name>lglba243.lss.emc.com</name>
</host>
<host>
<id>urn:storageos:Host:e7f67b93-8090-4316-a800-7f826d415bb8:</id>
<link href="/compute/hosts/urn:storageos:Host:e7f67b93-8090-4316-
a800-7f826d415bb8:" rel="self"/>
<name>lglba242.lss.emc.com</name>
</host>
</hosts>
Response
HTTP 200 OK
<initiators>
<initiator>
<id>urn:storageos:Initiator:97a5bfd2-5981-401c-
ba52-3bf002a63470:</id>
<link href="/compute/initiators/urn:storageos:Initiator:
97a5bfd2-5981-401c-ba52-3bf002a63470:" rel="self"/>
<name>iqn.1998-01.com.vmware:localhost:1161951551:36</name>
</initiator>
<initiator>
<id>urn:storageos:Initiator:b70c8916-
e415-4f71-9e46-34fd73c9488f:</id>
<link href="/compute/initiators/urn:storageos:Initiator:b70c8916-
e415-4f71-9e46-34fd73c9488f:" rel="self"/>
<name>iqn.1998-01.com.vmware:localhost:1161951551:34</name>
</initiator>
<initiator>
<id>urn:storageos:Initiator:ebe54432-3bba-4bf6-
a5b4-0af274d96b53:</id>
<link href="/compute/initiators/
urn:storageos:Initiator:ebe54432-3bba-4bf6-a5b4-0af274d96b53:"
rel="self"/>
<name>iqn.1998-01.com.vmware:localhost:1161951551:35</name>
</initiator>
<initiator>
<id>urn:storageos:Initiator:7188e4cb-6b58-4815-
a1c7-9a1b2684f08d:</id>
<link href="/compute/initiators/urn:storageos:Initiator:
7188e4cb-6b58-4815-a1c7-9a1b2684f08d:" rel="self"/>
<name>iqn.1998-01.com.vmware:localhost:1161951551:33</name>
</initiator>
<initiator>
<id>urn:storageos:Initiator:ce9cee8f-
fec8-4aac-8233-1256ad34d57c:</id>
<link href="/compute/initiators/urn:storageos:Initiator:ce9cee8f-
fec8-4aac-8233-1256ad34d57c:" rel="self"/>
<name>10:00:00:00:C9:B8:2D:30</name>
</initiator>
<initiator>
<id>urn:storageos:Initiator:
514381ab-5555-4183-9467-8172b4a0d7fa:</id>
<link href="/compute/initiators/urn:storageos:Initiator:
514381ab-5555-4183-9467-8172b4a0d7fa:" rel="self"/>
<name>10:00:00:00:C9:B8:2D:31</name>
</initiator>
</initiators>
u Registering and discovering physical storage systems in VNX Block and VMAX....138
u Registering and discovering a VPLEX................................................................... 139
u Registering and discovering an Isilon storage system.......................................... 140
u Registering and discovering a NetApp storage system......................................... 142
u Registering and discovering a VNX File storage system........................................ 143
Response
2. Repeat the query of the SMI-S registration task, using the task URL from the response
body of the POST request, until the message attribute of the task is Operation
completed successfully.
Request
GET https://<ViPR_URL>:4443/vdc/smis-providers/
urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:/
tasks/e393ece4-44eb-42d2-9d8a-33e28b436daf
{'Content-Type': 'application/json',
'X-SDS-AUTH-TOKEN': '{Token_Text}',
'ACCEPT': 'application/json'}
Response
HTTP 200 OK
{
"end_time": 1379202543299,
"link": {
"href": "/vdc/smis-providers/
urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:/
tasks/e393ece4-44eb-42d2-9d8a-33e28b436daf",
"rel": "self"
},
"message": "Operation completed successfully",
"op_id": "e393ece4-44eb-42d2-9d8a-33e28b436daf",
"resource": {
"id": "urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-
c7b225f413d5:",
"link": {
"href": "/vdc/smis-providers/
urn:storageos:SMISProvider:dce4a4c4-334b-4353-9484-c7b225f413d5:",
"rel": "self"
},
"name": "mysmis"
},
"start_time": 1379202542423,
"state": "ready"
}
"port_number": "443",
"system_type": "vplex",
"user_name": "service"
}
Response
202 Accepted
<task>
<op_id>d6860996-be16-42f8-8d81-e35b0ba63fc9</op_id>
<resource>
<id>urn:storageos:StorageSystem:75b2adfb-47c9-45d6-
a5be-76e400e328fb:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:75b2adfb-47c9-45d6-a5be-76e400e328fb:"
rel="self" />
<name>VPLEX_MET</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
75b2adfb-47c9-45d6-a5be-76e400e328fb:/tasks/d6860996-
be16-42f8-8d81-e35b0ba63fc9" rel="self" />
<start_time>1386301587343</start_time>
<state>pending</state>
</task>
2. Repeat the query of the VPLEX create task, using the task URL from the response body
of the POST request, until the message attribute of the task is Operation
completed successfully.
Request
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
urn:storageos:StorageSystem:75b2adfb-47c9-45d6-a5be-76e400e328fb:/
tasks/d6860996-be16-42f8-8d81-e35b0ba63fc9
Response
<task>
<end_time>1386301599628</end_time>
<message>Operation completed successfully</message>
<op_id>d6860996-be16-42f8-8d81-e35b0ba63fc9</op_id>
<resource>
<id>urn:storageos:StorageSystem:75b2adfb-47c9-45d6-
a5be-76e400e328fb:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:75b2adfb-47c9-45d6-a5be-76e400e328fb:"
rel="self" />
<name>VPLEX_MET</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
75b2adfb-47c9-45d6-a5be-76e400e328fb:/tasks/d6860996-
be16-42f8-8d81-e35b0ba63fc9" rel="self" />
<start_time>1386301587343</start_time>
<state>ready</state>
</task>
<storage_system_create>
<name>isilon1</name>
<system_type>isilon</system_type>
<ip_address>192.168.0.0</ip_address>
<port_number>8080</port_number>
<user_name>rootid</user_name>
<password>password</password>
</storage_system_create>
Response
202 Accepted
<task>
<associated_resources/>
<op_id>63719ec8-211e-41ae-a0a6-2a7a9c3a97e8</op_id>
<resource>
<id>urn:storageos:StorageSystem:473d0990-742b-4035-
b360-933f3f189ba8:</id>
<link href="/vdc/storage-systems/{StorageSystem_urn}"
rel="self"/>
<name>isilon1</name>
</resource>
<link href="/vdc/storage-systems/{StorageSystem_urn}/tasks/
63719ec8-211e-41ae-a0a6-2a7a9c3a97e8" rel="self"/>
<start_time>1387486656968</start_time>
<state>pending</state>
</task>
2. Query the Isilon create task, using the task URL from the response body of the POST
request, until the state attribute of the task is ready which indicates that the
operation has completed.
Request
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
{StorageSystem_urn}/tasks/63719ec8-211e-41ae-a0a6-2a7a9c3a97e8
Response
<task>
<associated_resources/>
<end_time>1387486658727</end_time>
<message>Operation completed successfully</message>
<op_id>63719ec8-211e-41ae-a0a6-2a7a9c3a97e8</op_id>
<resource>
<id>urn:storageos:StorageSystem:473d0990-742b-4035-
b360-933f3f189ba8:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
473d0990-742b-4035-b360-933f3f189ba8:" rel="self"/>
<name>isilon1</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
473d0990-742b-4035-b360-933f3f189ba8:/tasks/63719ec8-211e-41ae-
a0a6-2a7a9c3a97e8" rel="self"/>
<start_time>1387486656968</start_time>
<state>ready</state>
</task>
Once the task is complete, this storage system is automatically discovered by ViPR.
<storage_system_create>
<name>NetApp2</name>
<system_type>netapp</system_type>
<ip_address>192.168.0.0</ip_address>
<port_number>443</port_number>
<user_name>root</user_name>
<password>dangerous1</password>
</storage_system_create>
Response
202 Accepted
<task>
<op_id>937200f1-16ef-4bd3-8c13-b79e6651f967</op_id>
<resource>
<id>urn:storageos:StorageSystem:b4c6efa0-
bf8b-416a-9c01-5fc0a19f27a8:</id>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:b4c6efa0-bf8b-416a-9c01-5fc0a19f27a8:"
rel="self" />
<name>ISI_RAH</name>
</resource>
<link href="/vdc/storage-systems/
urn:storageos:StorageSystem:b4c6efa0-
bf8b-416a-9c01-5fc0a19f27a8:/tasks/937200f1-16ef-4bd3-8c13-
b79e6651f967" rel="self" />
<start_time>1386303328118</start_time>
<state>pending</state>
</task>
2. Query the NetApp create task, using the task URL from the response body of the POST
request. When the state attribute of the task is ready, the operation has
completed.
Request
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
{StorageSystem_urn}/tasks/937200f1-16ef-4bd3-8c13-b79e6651f967
Response
<task>
<associated_resources/>
<end_time>1387489906247</end_time>
<message>Operation completed successfully</message>
<op_id>937200f1-16ef-4bd3-8c13-b79e6651f967</op_id>
<resource>
<id>urn:storageos:StorageSystem:0dfd2dfc-
e097-4af4-94f2-5e08f41a6fad:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
0dfd2dfc-e097-4af4-94f2-5e08f41a6fad:" rel="self"/>
<name>NetApp2</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
0dfd2dfc-e097-4af4-94f2-5e08f41a6fad:/tasks/ba2b50b3-b5ad-44a7-
bbfd-bd51dc58f9d9" rel="self"/>
<start_time>1387489905274</start_time>
<state>ready</state>
</task>
password A password for the VNX File control station admin user
smi-s_user_ssl true
Procedure
1. Register a VNX File system by sending a POST /vdc/storage-systems request.
The request returns a task whose URI can be queried to determine the status of the
task.
Request
POST https://<ViPR_VIP>:4443/vdc/storage-systems
<storage_system_create>
<name>VNXFile1</name>
<system_type>vnxfile</system_type>
<ip_address>192.168.0.0</ip_address>
<port_number>443</port_number>
<user_name>nasadmin</user_name>
<password>nasadmin</password>
<smis_provider_ip>10.247.71.61</smis_provider_ip>
<smis_port_number>5989</smis_port_number>
<smis_user_name>admin</smis_user_name>
<smis_password>#1Password</smis_password>
<smis_use_ssl>true</smis_use_ssl>
</storage_system_create>
Response
202 Accepted
<task>
<associated_resources/>
<op_id>d036da87-2a93-4db2-9c34-c971945264ed</op_id>
<resource>
<id>urn:storageos:StorageSystem:1cab66bf-46fd-4953-
a527-2dc80797bf7d:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
1cab66bf-46fd-4953-a527-2dc80797bf7d:" rel="self"/>
<name>VNXFile1</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
1cab66bf-46fd-4953-a527-2dc80797bf7d:/tasks/
d036da87-2a93-4db2-9c34-c971945264ed" rel="self"/>
<start_time>1387568454683</start_time>
<state>pending</state>
</task>
2. Query the VNX File create task, using the task URL from the response body of the
POST request. When the state attribute of the task is ready, the operation has
completed.
Request
GET https://<ViPR_VIP>:4443/vdc/storage-systems/
{StorageSystem_urn}/d036da87-2a93-4db2-9c34-c971945264ed
Response
<task>
<associated_resources/>
<end_time>1387568504400</end_time>
<message>Operation completed successfully</message>
<op_id>d036da87-2a93-4db2-9c34-c971945264ed</op_id>
<resource>
<id>urn:storageos:StorageSystem:1cab66bf-46fd-4953-
a527-2dc80797bf7d:</id>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
1cab66bf-46fd-4953-a527-2dc80797bf7d:" rel="self"/>
<name>VNXFile1</name>
</resource>
<link href="/vdc/storage-systems/urn:storageos:StorageSystem:
1cab66bf-46fd-4953-a527-2dc80797bf7d:/tasks/
d036da87-2a93-4db2-9c34-c971945264ed" rel="self"/>
<start_time>1387568454683</start_time>
<state>ready</state>
</task>
Note
GET /api/ Show the details of the service which matches the specified path. The path can
catalog/{sp1}/ be up to five catalog or service names.
{sp2}/{sp3}/ For example, /api/catalog/BlockStorageServices/
{sp4}/{sp5} RemoveBlockStorageForHost
POST /api/ Retrieve the service descriptor for the catalog service.
services/ A JSON file is returned. It contains the information required to create a form
{serviceID}/ that specifies the payload parameters to be sent with a request to execute the
descriptor service.
The service parameters in the payload must be form encoded using the content
type: application/x-www-form-urlencoded.
The service parameters in the payload must be form encoded using the content
type: application/x-www-form-urlencoded.
GET /api/orders Returns a list of IDs for orders which you own.
GET /api/ Returns a list of IDs for all orders in the current tenant. You must have the
orders/all Tenant Administrator role.
GET /api/ Show the details of a specific order. You must be the owner of the order or
orders/{orderID} have the Tenant Administrator or Tenant Approval role.
GET /api/ Show the execution information for an order, including all log information.
orders/
{orderID}/
execution
GET /api/ List all approvals for the tenant of which you are a member.
approvals
GET /api/ List all approvals that are in the pending state.
approvals/
pending
GET /api/ Show the details for the specified approval request.
approvals/
{approvalID}
Accessing UI services
All UI Services are available under the /api context. To access them the client must be
authenticated against ViPR and an X-SDS-AUTH-TOKEN provided.
Authentication on page 7 describes how to obtain a token.
Note
Unlike other parts of the ViPR API, the UI services are accessed on HTTP port 443, and not
4443.
returns
[
{
"id": "urn:storageos:Order:3184068d-0b88-447e-a899-16d412c21309:",
"href": "/api/orders/urn:storageos:Order:3184068d-0b88-447e-
a899-16d412c21309:"
},
{
"id": "urn:storageos:Order:34a028a8-b2b4-43e8-81af-5442ba97dc6b:",
"href": "/api/orders/urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:"
}
]
GET https://<ViPR_VIP>:443/api/orders
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
Accept: application/xml
returns
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<list>
<reference>
<href>/api/orders/urn:storageos:Order:3184068d-0b88-447e-
a899-16d412c21309:</href>
<id>urn:storageos:Order:3184068d-0b88-447e-
a899-16d412c21309:</id>
</reference>
<reference>
<href>/api/orders/urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:</href>
<id>urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:</id>
</reference>
</list>
Approval requests
You can set up a service in the Service Catalog to require approval before being
processed. These Approval Requests can be listed and actioned using either the UI or the
Approval Service.
Note that to make any calls against the Approval Service, the authenticated user must
have the TENANT_APPROVER role.
Approving or rejecting
Approval Requests can be either approved or rejected using POST /api/approvals/
<ApprovalRequest_ID>/approve and /reject .
POST https://<ViPR_VIP>:443/api/approvals/<ApprovalRequest_ID>/
approve
POST https://<ViPR_VIP>:443/api/approvals/<ApprovalRequest_ID>/reject
which returns
{
"status": "PENDING",
"order": {
"id": "urn:storageos:Order:7f9e7e1f-d765-498c-a320-5840ade14da1:",
"href": "/api/orders/urn:storageos:Order:7f9e7e1f-d765-498c-
a320-5840ade14da1:"
},
"tenant": "urn:storageos:TenantOrg:66e1c6ce-d133-42bb-b90f-
f7c3334599bb:",
"id": "urn:storageos:ApprovalRequest:ad0f1973-514f-42e9-8186-
ebd121198e16:",
"inactive": false,
"link": {
"rel": "self",
"href": "/api/approvals/
urn:storageos:ApprovalRequest:ad0f1973-514f-42e9-8186-ebd121198e16:"
}
}
URL notification
Ordinarily when an Approval Request is created ViPR will send an email to the approvers.
You can however also setup ViPR to call a URL by providing a URL in the UI Admin > Tenant
> Approval Settings page. The URL can be any address visible to the ViPR cluster.
The following shows an example of the JSON Approval Information resource that ViPR
would send to the specified URL.
{
"message":null,
"dateActioned":null,
"status":"PENDING",
"approvedBy":null,
"order":{
"id":"urn:storageos:Order:2792d568-034a-42d0-b0da-f39b32fa9074:",
"href":"/api/orders/urn:storageos:Order:2792d568-034a-42d0-b0da-
f39b32fa9074:"
},
"tenant":"urn:storageos:TenantOrg:66e1c6ce-d133-42bb-b90f-
f7c3334599bb:",
"id":"urn:storageos:ApprovalRequest:739ff36b-ce89-41ff-
a22e-5c572f861da7:",
"inactive":false,
"link":{
"rel":"self",
"href":"/api/approvals/urn:storageos:ApprovalRequest:739ff36b-
ce89-41ff-a22e-5c572f861da7:"
}
}
Asset options
There is a special field type that starts with AssetType.XXX. This indicates that options for
that field are not supplied statically with the form, but should be retrieved from the
server.
To retrieve values for an assetType you call the AssetOption API using the name of the
asset (the part after "AssetType."). So for example, to get the name of all hosts for the
type AssetType.bourne.hosts, you would call:
GET https://<ViPR_VIP>:443/api/options/bourne.hosts
The response returned contains a JSON array of key value pairs; the key being the value
which should be sent to ViPR as the field value when executing the service, and the value
being the display label for that option.
[
{
"key": "urn:storageos:Host:4c4b7da7-61ee-4384-
afb9-87e1fa3d045b:",
"value": "linux2"
},
{
"key": "urn:storageos:Host:4c4b7da7-61ee-9783-
afb9-87e1fa3d045b:",
"value": "linux1"
}
]
Upstream values
Some asset option fields require previous options in order to determine possible valid
options. For example, the "Create Block Volume for a Host" service requires that the user
select a protocol so that it can display only the hosts that support that particular
protocol.
In order to support this, the Asset Option API requires that you pass all current field
values that have been selected when asking for the options. This is why the ordering of
the field descriptors in the Service Descriptor is important.
For example, the "Export Volume To Host" service includes the following fields :
u Block Protocol (bourne.blockProtocol)
u Project (bourne.project)
u Host (bourne.host)
u Volume (bourne.unassignedBlockVolume)
The first call will be made against the first field, Block Protocol:
GET https://<ViPR_VIP>:443/api/options/bourne.blockProtocol
which returns
[
{
"key": "FC",
"value": "FC"
},
{
"key": "iSCSI",
"value": "iSCSI"
}
]
The next call will be to retrieve options for the bourne.Project field. Note that we must
pass in all proceeding values that have been chosen so far.
GET https://<ViPR_VIP>:443/api/options/bourne.project?
bourne.blockProtocol=FC
We then pass the two values so far when getting the bourne.Host field:
GET https://<ViPR_VIP>:443/api/options/bourne.host?
bourne.blockProtocol=FC&bourne.project=urn:storageos:Project:b161965b-
4fb1-439e-8224-ed47840487e0:
Lastly we can get the options for unassignedBlockVolume. Note that this example is on
separate lines for readability, however it should all be submitted as a single line.
GET https://<ViPR_VIP>:443/api/options/bourne.unassignedBlockVolume
?bourne.host=urn:storageos:Host:4c4b7da7-61ee-4384-
afb9-87e1fa3d045b:
&bourne.project=urn:storageos:Project:b161965b-4fb1-439e-8224-
ed47840487e0:
&bourne.blockProtocol=FC
Which returns
[
{
"key":"urn:storageos:Volume:39149c88-46ea-4aec-
ac51-46bd58a01e5c:",
"value":"ViPR-TestVolume-1"
}
]
Executing a service
Services are executed by POSTing the required service values to the service as form-url-
encoded.
Use the following URL path:
POST https://<ViPR_VIP>:443/api/services/<serviceId>
For example, in order to execute the Create Volume service you would post the
following parameters:
virtualArray:urn:storageos:VirtualArray:58528ef1-149e-40c4-8732-
df3ddf108a22:
virtualPool:urn:storageos:VirtualPool:7aa0c6f0-5f47-423b-9b1e-
eda98c838bc7:
project:urn:storageos:Project:b161965b-4fb1-439e-8224-ed47840487e0:
name:ViPR-Test2
consistencyGroup:
numberOfVolumes:1
size:5
These would be URL encoded as the body of the request, with the following being sent:
POST https://<ViPR_VIP>:443/api/services/
urn:storageos:CatalogService:672fa6b6-b17e-49f3-ad11-b6c43c3680cb:
Accept: application/json
Content-Length: 420
Content-Type: application/x-www-form-urlencoded
X-SDS-AUTH-TOKEN: <AUTH-TOKEN>
virtualArray=urn%3Astorageos%3AVirtualArray%3A58528ef1-149e-40c4-8732-
df3ddf108a22%3A&virtualPool=urn%3Astorageos%3AVirtualPool
%3A7aa0c6f0-5f47-423b-9b1e-eda98c838bc7%3A&project=urn%3Astorageos
%3AProject%3Ab161965b-4fb1-439e-8224-ed47840487e0%3A&name=ViPR-
Test3&consistencyGroup=&numberOfVolumes=1&size=5
size:5
If a 200 OK response is returned, the submission has been accepted and a link to the
order is returned:
{
"orderNumber": "5",
"service": {
"id": "urn:storageos:CatalogService:672fa6b6-b17e-49f3-ad11-
b6c43c3680cb:",
"href": "/api/services/urn:storageos:CatalogService:672fa6b6-
b17e-49f3-ad11-b6c43c3680cb:"
},
"summary": "Create a block volume",
"message": "",
"createdDate": "Sep 10, 2013 1:26:24 PM",
"status": "PENDING",
"execution": {
"id": "urn:storageos:Order:34a028a8-b2b4-43e8-81af-5442ba97dc6b:",
"href": "/api/orders/urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:/execution"
},
"id": "urn:storageos:Order:34a028a8-b2b4-43e8-81af-5442ba97dc6b:",
"inactive": false,
"link": {
"rel": "self",
"href": "/api/orders/urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:"
}
}
Orders are visible in the ViPR Portal when submitted via the API as if they had been
submitted directly via the catalog.
If any of the required fields are missing, the Portal API will reject the submission, and
return a 400 BAD REQUEST with a JSON resource explaining what's wrong. For example, if
the previous request were submitted with the size parameter is missing, the response
would be:
400 BAD_REQUEST
[
{
"field": "size",
"error": "Required"
}
]
The Portal API will also validate all parameters against the Service Descriptor
requirements, and any errors could lead to multiple errors for the same field being
returned. If the following example, were submitted the numberOfVolumes parameter
with a non numeric value of asd the response would be:
400 BAD_REQUEST
[
{
"field": "numberOfVolumes",
"error": "Must be a valid integer"
},
{
"field": "numberOfVolumes",
"error": "Cannot be lower than 1"
},
{
"field": "numberOfVolumes",
"error": "Cannot be greater than 2"
}
]
Service catalog
The Service Catalog API allows a REST client to browse the ViPR Self Service Catalog
configured in the ViPR Portal. The catalog itself is structured as a tree of Categories, each
Category can contain a list of Sub-Categories and a list of Services in that category.
Information about a category can be retrieved by path using the category titles (with
spaces removed) to form a path. For example, the following will retrieve the Block Storage
Services -> Protection Services category:
GET https://<ViPR_VIP>:443/api/catalog/BlockStorageServices/
ProtectionServices
The Root (or 'Home') category is retrieved using the following URL (note that there is no /
on the end of the URL)
GET https://<ViPR_VIP>:443/api/catalog
"href": "/api/categories/urn:storageos:CatalogCategory:
67218dcf-9330-4822-9b67-137f3a0de2b5:"
}
],
"services": [
{
"name": "CreateBlockVolumeforaHost",
"title": "Create Block Volume for a Host",
"description": "Create block volume and export it for a host",
"image": "icon_array_host_add.png",
"approvalRequired": false,
"executionWindowRequired": false,
"defaultExecutionWindowId":
"urn:storageos:ExecutionWindow:NEXT::NEXT",
"baseService": "CreateBlockStorageForHost",
"maxSize": 10,
"id": "urn:storageos:CatalogService:5ee6e282-bf83-457f-
bc4f-48c3b94e0648:",
"inactive": false,
"link": {
"rel": "self",
"href": "/api/services/urn:storageos:CatalogService:5ee6e282-
bf83-457f-bc4f-48c3b94e0648:"
}
},
{
"name": "RemoveBlockStorageForHost",
"title": "Remove Volume by Host",
"description": "Removes an unmounted block volume assigned to a
host and all of its exports. The volume will no longer be available
from any host.",
"image": "icon_array_host_remove.png",
"approvalRequired": false,
"executionWindowRequired": false,
"baseService": "RemoveBlockStorageForHost",
"id": "urn:storageos:CatalogService:aef84673-2f98-41f9-
b74b-32c6e75ee7d5:",
"inactive": false,
"link": {
"rel": "self",
"href": "/api/services/
urn:storageos:CatalogService:aef84673-2f98-41f9-b74b-32c6e75ee7d5:"
}
}
}
],
"id": "urn:storageos:CatalogCategory:1ee6d153-5809-45c5-962f-
fc91f255a0d9:",
"inactive": false,
"link": {
"rel": "self",
"href": "/api/categories/urn:storageos:CatalogCategory:
1ee6d153-5809-45c5-962f-fc91f255a0d9:"
}
}
The id and link fields at the end of the descriptor provide identification information about
this category.
ViPR also allows you to retrieve the category descriptor directly with the Category ID
(shown as the "id":"urn:CatalogCategory:XXXX" values in the above example), using the
following URL:
GET https://<ViPR_VIP>:443/api/categories/<Catalog_ID>
Service descriptors
Each service in the catalog is represented by a service descriptor which provides
configuration information about the service as well as a list of field descriptors. The field
descriptors tell clients (such as the portal) what fields values are required and any
constraints on those fields values.
Service descriptors can be retrieved with the ID of the service (id's starting with
urn:storageos:CatalogService:XXXX), using the following URL
GET https://<ViPR_VIP>:443/api/services/<service_id>/descriptor
The following shows a basic Service descriptor with one field of Virtual Array.
{
"serviceId": "CreateVolume",
"category": "Block Services",
"title": "Create Block Volume",
"description": "Create a Block Volume",
"roles": [],
"destructive": false,
"fields": {
"virtualArray": {
"name": "virtualArray",
"label": "Virtual Array",
"type": "assetType.bourne.virtualArray",
"required": true,
"select": "one",
"lockable": true,
"validation": {
"min": 0,
"max": 2147483647,
"regEx": "",
"failureMessage": ""
},
"options": {}
},
}
Field descriptors
Field descriptors describe the fields required by the service in order to perform the
requested operation. For example, the Export Volume to Host service requires the user
select a host and a target volume.
Each descriptor provides information such as the label, the type of the field, and then any
constraints on that field which a UI can use to provide further hints to a user. The
following is an example of a field descriptor:
"host": {
"name": "host",
"label": "Host",
"type": "assetType.bourne.host",
"description": "If the host is in a cluster, storage will be
allocated to all hosts in the cluster.",
"required": true,
"select": "one",
"lockable": false,
"validation": {
"min": 0,
"max": 2147483647,
"regEx": "",
"failureMessage": ""
},
"options": {}
}
name The symbolic name of the field. This is the name by which the field is
referenced when executing the service
select The type of selection for field types that support it. A value of one
indicates only one value can be selected from the options, a value of
many indicates one or more values can be selected
lockable Indicates to the user should have the option of locking this field to a
particular value when editing the service
validation Validation rules that should be applied to the field. See section on
validation
options If the field type is choice, this provides a map of value to label for all the
possible choices
Field validation
For text and number field types, the validation resource provides information on the
constraints around acceptable values.
Note that the validation resource will always contain all the fields, but only values that
make sense against the type should be used.
choice A choice of one of the options from the options field of the descriptor
assetType.XXXXX If the field type begins with assetType, this indicates a dynamic value.
See Asset Options for how to retrieve the possible options.
A field type can have a type that begins with assetType, for example assetType.vipr.host.
If the field type begins with assetType it indicates that the field is dynamic and a further
call should be made back to ViPR to get possible values. See section on retrieving Asset
Type Values, or the AssetOptions API on how to retrieve these values.
Tracking orders
Once a service has been submitted, a link to the order ID is returned, which can be used
to retrieve the status of the order.
For example, calling:
GET https://<ViPR_VIP>:443/api/orders/urn:storageos:Order:34a028a8-
b2b4-43e8-81af-5442ba97dc6b:
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
REJECTED The order has been rejected by an approver and will not be executed.
2001 Unable to find the object with the No 404 Not Found
given id
2002 The object has been marked as No 500 Internal Server Error
inactive for deletion
6002 Unable to queue the job, we have Yes 503 Service Unavailable
reached the maximum capacity for
this queue
201 Created The requested entity has been created and can be found at the
URL specified in the Location header.
202 Accepted The request has been accepted for processing, but the
processing has not been completed. A task has been created for
the request. The response provides a task URI in the Location
header and usually has a task document in the response body.
204 No Content The request is valid and has been completed. The response
includes no document body.
301 Moved Permanently This and all future requests should be directed to the given URL.
400 Bad Request The request contains bad syntax or cannot be fulfilled.
401 Unauthorized An Authorization header was expected, but not found. The
response includes a WWW-Authenticate header field containing
a challenge applicable to the requested resource.
403 Forbidden The client does not have adequate privileges to access one or
more resources specified in the request.
405 Method Not Allowed A request was made of a resource using a request method not
supported by that resource. For example, a PUT on a read-only
resource.
500 Internal Server Error The request could not be completed due to an internal error at
the server.
501 Not Implemented The server either does not recognize the request method, or it
lacks the ability to fulfill the request.
503 Service Unavailable Services that are needed to complete the request on the server
are currently unavailable. This state is usually temporary.