ViPR 2.2 - Add Hosts and Clusters with the ViPR REST API

Table of Contents

Overview

Learn how to add Linux, Windows, AIX, AIX VIO, HP-UX, and other types of hosts using the ViPR REST API. Also includes examples of adding host initiators and adding the host to a ViPR cluster. Lists some of the important REST APIs used to manage hosts and clusters.

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 a 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.

This article is part of a series

Hosts can be added to ViPR at anytime. If, however, you are setting up the ViPR Controller virtual data center for the first time, before you continue to provision storage, complete the following steps.

  1. Authenticate with the ViPR REST API
  2. Add physical assets to ViPR:
  3. Create ViPR virtual assets:
    1. Create and configure a virtual array
    2. Create virtual pools:

Back to Top

Add and discover a LINUX host

To manage a LINUX host in ViPR, use POST /compute/hosts to add the host to ViPR and discover the host, and its initiator ports.

Before you begin

The following steps describe how to add a LINUX host to ViPR using the REST API. To use the ViPR UI to add a LINUX host to ViPR see the Add LINUX Hosts and Clusters to ViPR article.

Procedure

  1. Get the URN of your tenant.
    GET https://<ViPR_VIP>:4443/tenant
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
  2. Use the tenant URN in the request payload to create a host. The POST /compute/hosts method also initiates discovery of the host and its initiator ports.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <host_create>
      <type>Linux</type>
      <host_name>lglw7151.example.com</host_name>
      <name>lglw7151</name>
      <port_number>22</port_number>
      <user_name>root</user_name>
      <password>Password1</password>
      <use_ssl>false</use_ssl>
      <tenant>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</tenant>
    </host_create>
    
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
         <creation_time>1423511829227</creation_time>
         <global>false</global>
         <id>urn:storageos:Task:5cbe14c7-5540-4d98-abea-fcf5ba3896a0:vdc1</id>
         <inactive>false</inactive>
         <internal>false</internal>
         <link rel="self" href="/vdc/tasks/urn:storageos:Task:5cbe14c7-5540-4d98-abea-fcf5ba3896a0:vdc1"/>
         <name>DISCOVER HOST</name>
         <remote>false</remote>
         <tags/>
         <vdc>
              <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
         </vdc>
         <associated_resources/>
         <description>discover a compute host</description>
         <op_id>f9b296b2-ad28-4074-9b23-0e5766530f27</op_id>
         <progress>0</progress>
         <resource>
              <id>urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1</id>
              <link rel="self" href="/compute/hosts/urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1"/>
              <name>lglw7151</name>
         </resource>
         <start_time>1423511829226</start_time>
         <state>pending</state>
    <task>
    
    You will not be able to fully manage the host until you discover it.
  3. Check the user interface to see if the host has completed discovery, or check the host resource. Use the resource URI included in the task returned from the create a host request. It should contain the information shown in the following example.
    Request
    GET https://<ViPR_VIP>:4443/compute/hosts/urn:storageos:Host:ead39b5a-07f4-4cb4-8124-35aa864fe760:
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <host>
         <creation_time>1423511829212</creation_time>
         <global>false</global>
         <id>urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1</id>
         <inactive>false</inactive>
         <internal>false</internal>
         <link rel="self" href="/compute/hosts/urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1"/>
         <name>lglw7151</name>
         <remote>false</remote>
         <tags/>
         <vdc>
              <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
         </vdc>
         <native_guid>6C:41:6A:1E:71:68</native_guid>
         <compatibility_status>COMPATIBLE</compatibility_status>
         <job_discovery_status>COMPLETE</job_discovery_status>
         <last_discovery_run_time>1423511839761</last_discovery_run_time>
         <last_discovery_status_message></last_discovery_status_message>
         <last_metering_run_time>0</last_metering_run_time>
         <job_metering_status>CREATED</job_metering_status>
         <next_discovery_run_time>1423598229542</next_discovery_run_time>
         <next_metering_run_time>0</next_metering_run_time>
         <registration_status>REGISTERED</registration_status>
         <success_discovery_time>1423511839761</success_discovery_time>
         <success_metering_time>0</success_metering_time>
         <tenant>
              <id>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</id>
              <link rel="self" href="/tenants/urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global"/>
         </tenant>
         <discoverable>true</discoverable>
         <host_name>lglw7151.example.com</host_name>
         <os_version>RHEL 6.3.0.3.el6</os_version>
         <port_number>22</port_number>
         <type>Linux</type>
         <use_ssl>false</use_ssl>
         <user_name>root</user_name>
    </host>
    
    
Back to Top

Add and discover a Windows host

To manage a Windows host in ViPR, use POST /compute/hosts to add the host to ViPR and discover the host, and its initiator ports.

Before you begin

  • Your Windows host must be running the correct version of Windows, and be properly configured. In particular, your ViPR installation, the Windows host, and the user name you use to authenticate must all be in the same Windows domain.
  • Authenticate with the ViPR REST API as a Tenant Administrator.
  • type - Windows
  • discoverable
    • true = Allow ViPR to automatically discover and register the host. This is the default setting if you do not include it in your request payload.
    • false = Do not allow ViPR to automatically discover the host. You must manually register the host initiators in ViPR using POST /compute/hosts/{Host_URN}/initiators.
  • port - The SSH connection port. The default is 5986.
  • host_name - When using domain credentials, this must be the hostname (not IP address) and resolvable through DNS.
  • The EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this section.

The following steps describe how to add a Windows host to ViPR using the REST API. To use the ViPR UI to add a Windows host to ViPR see the Add Windows Hosts and Clusters to ViPR article.

Procedure

  1. Get the URN of your tenant.
    GET https://<ViPR_VIP>:4443/tenant
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
  2. Use the tenant URN as one of the parameters to create a host. The POST /compute/hosts method creates a host and initiates discovery of the host and its initiator ports.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <host_create>
         <type>Windows</type>
         <host_name>192.168.0.0</host_name>
         <name>host1win</name>
         <port_number>5986</port_number>
         <user_name>root</user_name>
         <password>Password123</password>
         <use_ssl>false</use_ssl>
         <tenant>urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</tenant>
    </host_create>
    
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1415198092146</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:b9366da9-31ed-4809-ad46-74364f83e637:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:b9366da9-31ed-4809-ad46-74364f83e637:vdc1"/>
        <name>DISCOVER HOST</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1"/>
        </vdc>
        <associated_resources/>
        <op_id>9e150aa2-d92e-47ee-8fab-d86733d852d0</op_id>
        <progress>0</progress>
        <resource>
            <id>urn:storageos:Host:4582fc0e-ff38-462a-9a18-f7488d4dd940:vdc1</id>
            <link rel="self" href="/compute/hosts/urn:storageos:Host:4582fc0e-ff38-462a-9a18-f7488d4dd940:vdc1"/>
            <name>host1win</name>
        </resource>
        <start_time>1415198092145</start_time>
        <state>pending</state>
        <tenant>
            <id>urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global"/>
        </tenant>
    </task>
    
    You will not be able to fully manage the host until discovery of the host, and its initiator ports has completed.
  3. Check the user interface to see if the host has completed discovery, or use the host URN contained in the task returned from the create request to 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:4582fc0e-ff38-462a-9a18-f7488d4dd940:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <host>
        <creation_time>1415198092133</creation_time>
        <global>false</global>
        <id>urn:storageos:Host:4582fc0e-ff38-462a-9a18-f7488d4dd940:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/compute/hosts/urn:storageos:Host:4582fc0e-ff38-462a-9a18-f7488d4dd940:vdc1"/>
        <name>host1win</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1"/>
        </vdc>
        <native_guid/>
        <compatibility_status>COMPATIBLE</compatibility_status>
        <job_discovery_status>COMPLETE</job_discovery_status>
        <last_discovery_run_time>1415198092615</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>1415284492176</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:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global"/>
        </tenant>
        <discoverable>true</discoverable>
        <host_name>192.168.0.0</host_name>
        <port_number>5986</port_number>
        <type>Windows</type>
        <use_ssl>false</use_ssl>
        <user_name>root</user_name>
    </host>
    
Back to Top

Add an AIX host or AIX VIO server to ViPR

To manage an AIX host or AIX VIO host, use POST /compute/hosts.

Before you begin

The following steps describe how to add an AIX or AIX VIO host to ViPR using the REST API. To use the ViPR UI to add an AIX or AIX VIO host to ViPR, see the Add AIX and AIX VIO Hosts and Clusters to ViPR.

Procedure

  1. Get the URN of your tenant.
    GET https://<ViPR_VIP>:4443/tenant
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
  2. Use the tenant URN as one of the parameters to create a host. The POST /compute/hosts method creates a host and initiates discovery of the host and its initiator ports.
    In this example, an AIX is added to ViPR.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <host_create>
         <type>AIX</type>
         <host_name>192.168.0.0</host_name>
         <name>host1aix</name>
         <port_number>22</port_number>
         <user_name>root</user_name>
         <password>pancake</password>
         <use_ssl>false</use_ssl>
         <tenant>urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</tenant>
    </host_create>
    
    Response
    HTTP 202 Accepted
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1415137101100</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:743ecb3f-349a-4b95-ab2a-b7365ae13e29:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:743ecb3f-349a-4b95-ab2a-b7365ae13e29:vdc1"/>
        <name>DISCOVER HOST</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1"/>
        </vdc>
        <associated_resources/>
        <op_id>546f5647-4cf3-4fc9-a551-6f1ba934bc4e</op_id>
        <progress>0</progress>
        <resource>
            <id>urn:storageos:Host:d9d2312c-d172-4099-b3dd-e17b49b01797:vdc1</id>
            <link rel="self" href="/compute/hosts/urn:storageos:Host:d9d2312c-d172-4099-b3dd-e17b49b01797:vdc1"/>
            <name>host1aix</name>
        </resource>
        <start_time>1415137101097</start_time>
        <state>pending</state>
        <tenant>
            <id>urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global"/>
        </tenant>
    </task>
    You will not be able to fully manage the host until discovery of the host, and its initiator ports has completed.
  3. Check the user interface to see if the host has completed discovery, or use the host URN contained in the task returned from the create request to check the host resource. It should contain the information shown in the following example.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts/urn:storageos:Host:d9d2312c-d172-4099-b3dd-e17b49b01797:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <host>
        <creation_time>1415137101050</creation_time>
        <global>false</global>
        <id>urn:storageos:Host:d9d2312c-d172-4099-b3dd-e17b49b01797:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/compute/hosts/urn:storageos:Host:d9d2312c-d172-4099-b3dd-e17b49b01797:vdc1"/>
        <name>host1aix</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:d649923c-3d28-4195-bd6e-d7139c0df033:vdc1"/>
        </vdc>
        <native_guid>BA:10:95:D0:7C:02</native_guid>
        <compatibility_status>COMPATIBLE</compatibility_status>
        <job_discovery_status>COMPLETE</job_discovery_status>
        <last_discovery_run_time>1415137121159</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>1415223501712</next_discovery_run_time>
        <next_metering_run_time>0</next_metering_run_time>
        <registration_status>REGISTERED</registration_status>
        <success_discovery_time>1415137121159</success_discovery_time>
        <success_metering_time>0</success_metering_time>
        <tenant>
            <id>urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:167d6c87-209e-4f9a-a688-c1c73a2c9de8:global"/>
        </tenant>
        <discoverable>true</discoverable>
        <host_name>192.168.0.0</host_name>
        <os_version>7.1.0.0
    </os_version>
    <port_number>22</port_number>
    <type>AIX</type>
    <use_ssl>false</use_ssl>
    <user_name>root</user_name>
    </host>
Back to Top

Add a host other than Windows, AIX or Linux

Adding a host other than Windows, AIX or Linux requires you to manually register the initiators with the host after adding the host. You can also manually assign host initiators and interfaces to any host you are registering with ViPR .

Before you begin

  • Authenticate with the ViPR REST API as a Tenant Administrator.
  • HP-UX hosts are not automatically discovered and registered in ViPR. When you set type equal to HPUX it:
    • Sets the Volume Set Addressing (VSA) flag, which is required for exporting EMC VMAX, and VPLEX volumes to HP-UX hosts.
    • Is required to use the Host Mode Option when provisioning with HDS storage systems.
      Note Image
      The Host Mode Option is set by using PUT /config/controller/{ID} where {ID} is the ID of the HDSHostModeOption controller type.

  • For hosts other than HP-UX, set type to Other.
  • When you add an HP-UX host to ViPR, you will still need to manually add and register the host initiators in ViPR
  • The EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this section.
  • You need the following information:
    • The name of the host being registered.
    • The fully qualified domain name of IP address of the host.
    • The node address of an initiator
    • The port address of an initiator.

In this example, a host other than Windows, AIX or Linux is added. Once the host is added, an initiator is manually registered with the host.

Procedure

  1. Get the URN of your tenant.
    Request
    GET https://<ViPR_VIP>:4443/tenant
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
  2. Use the tenant URN as one of the parameters to add the host to ViPR.
    • If the host will be attached to EMC VMAX volumes, use <type>HPUX</type>
    • Otherwise, use <type>Other</type>
    Note Image
    Hosts of type Other, and HPUX are not automatically discovered, therefore, set the <discoverable> flag to false.

    Request
    POST https://<ViPR_VIP>:4443/compute/hosts
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <host_create>
         <type>Other</type>
         <host_name>192.168.0.1</host_name>
         <name>myhost2</name>
         <discoverable>false</discoverable>
         <tenant>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</tenant>
    </host_create>
     
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
         <creation_time>1423519740612</creation_time>
         <global>false</global>
         <id>urn:storageos:Task:7692ec89-c388-40f1-9d5d-70029556fe9b:vdc1</id>
         <inactive>false</inactive>
         <internal>false</internal>
         <link rel="self" href="/vdc/tasks/urn:storageos:Task:7692ec89-c388-40f1-9d5d-70029556fe9b:vdc1"/>
         <name>DISCOVER HOST</name>
         <remote>false</remote>
         <tags/>
         <vdc>
              <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
         </vdc>
         <associated_resources/>
         <description>discover a compute host</description>
         <end_time>1423519740611</end_time>
         <message>Host is not discoverable</message>
         <op_id>b738e081-e671-44be-959d-cd670ceaf75f</op_id>
         <progress>100</progress>
         <resource>
              <id>urn:storageos:Host:4f96c363-f6dd-4e5f-968e-a4778671972b:vdc1</id>
              <link rel="self" href="/compute/hosts/urn:storageos:Host:4f96c363-f6dd-4e5f-968e-a4778671972b:vdc1"/>
              <name>myhost2</name>
         </resource>
         <start_time>1423519740610</start_time>
         <state>ready</state>
         <tenant>
              <id>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</id>
              <link rel="self" href="/tenants/urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global"/>
         </tenant>
    </task>
    
    If the state from the returned task is ready, the host is now added to ViPR.
  3. Register an initiator associated with the host by calling the following POST. The new host initiator is returned.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts/{Host_URN}/initiators
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
     
    <initiator_create>
           <protocol>FC</protocol>
           <initiator_port>10:13:27:65:60:38:68:BE</initiator_port>
    </initiator_create>
    
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <initiator>
           <creation_time>1379202603661</creation_time>
           <id>urn:storageos:Initiator:07b2e71d-cb4c-49c9-94fe-1feab7878d35:vdc1</id>
           <inactive>false</inactive>
           <link
                  href="/compute/initiators/urn:storageos:Initiator:07b2e71d-cb4c-49c9-94fe-1feab7878d35:vdc1"
                  rel="self"/>
           <tags/>
           <host>
                  <id>urn:storageos:Host:c2fe902f-0de0-4a92-a2a9-46ba87279bd2:vdc1</id>
                  <link
                         href="/compute/hosts/urn:storageos:Host:c2fe902f-0de0-4a92-a2a9-46ba87279bd2:vdc1"
                         rel="self"/>
           </host>
           <protocol>FC</protocol>
           <hostname>myhost</hostname>
           <initiator_port>10:13:27:65:60:38:68:BE</initiator_port>
    </initiator>
    
Back to Top

Add host ports to an IP network

If adding hosts to provision over an IP network, the host ports must be added to the IP network.

IP networks are created by system administrators. Tenant administrators cannot configure IP networks or add host ports to the network.

You use POST /vdc/networks to create a new IP network or PUT /vdc/networks/{ID} to add your host ports to an existing IP network.

Back to Top

Add a host to a cluster

Optionally, hosts can be added to ViPR clusters. Adding hosts to clusters allows service operations to be performed exclusively on a single host, or shared across all the hosts in a cluster.

Before you begin

  • Authenticate with the ViPR REST API as a Tenant Administrator.
  • Clusters can only contain the same type of hosts.
  • A host can only be used in one cluster.
  • You need the following information:
    • The URN of the tenant, if you need to create the cluster before adding the host. To get the URN of the current tenant, use GET /tenant.
    • The URN of the host being added to the cluster. To determine the ID of the host, you can use GET /compute/hosts/bulk to get the list of all hosts IDs and then GET /compute/hosts/{Host_URN} to show the details of a specific host.
    • The URN of the cluster.

The EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this section.

Procedure

  1. If the cluster does not already exist, create one with the following POST.
    Request
    POST https://<ViPR_VIP>:4443/tenants/{Tenant_URN}/clusters
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <cluster_create>
          <name>Win_cluster_1</name>
    </cluster_create>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <cluster>
        <creation_time>1399748901762</creation_time>
        <global>false</global>
        <id>urn:storageos:Cluster:2f6b27f2-5eb9-4b8f-8519-050a43f3c733:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/compute/clusters/urn:storageos:Cluster:2f6b27f2-5eb9-4b8f-8519-050a43f3c733:vdc1"/>
        <name>Win_cluster_1</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:440b70de-fd36-4361-a455-b6ca65fb8228:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:440b70de-fd36-4361-a455-b6ca65fb8228:vdc1"/>
        </vdc>
        <tenant>
            <id>urn:storageos:TenantOrg:6c7dde31-ec48-4028-8672-5e74f5754656:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:6c7dde31-ec48-4028-8672-5e74f5754656:global"/>
        </tenant>
    </cluster>
    
    
  2. A host is added to a cluster by updating the <cluster> attribute of a host, using PUT /compute/hosts/{Host_URN}. This example uses the URN of the new cluster, from the cluster create call. A task is returned.
    Request
    PUT https://<ViPR_VIP>:4443/compute/hosts/urn:storageos:Host:24e9c36a-804d-4d05-a646-a64a47accc7e:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <host_update>
         <cluster>urn:storageos:Cluster:9a18479e-d36e-44cc-bdae-f8d44720dbe3:vdc1</cluster>
    </host_update>
    Response
    HTTP/1.1 202 Accepted
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <associated_resources/>
        <description>DISCOVER_HOST</description>
        <op_id>5e7a5c9d-2a37-4f43-9534-727dc396804f</op_id>
        <resource>
            <id>urn:storageos:Host:24e9c36a-804d-4d05-a646-a64a47accc7e:vdc1</id>
            <link rel="self" href="/compute/hosts/urn:storageos:Host:24e9c36a-804d-4d05-a646-a64a47accc7e:vdc1"/>
            <name>host219</name>
        </resource>
        <link rel="self" href="/compute/hosts/urn:storageos:Host:24e9c36a-804d-4d05-a646-a64a47accc7e:vdc1/tasks/5e7a5c9d-2a37-4f43-9534-727dc396804f"/>
        <start_time>1399749237037</start_time>
        <state>pending</state>
    </task>

Results

If the message from the returned task is Operation completed successfully, the host is now added to the cluster.

Back to Top

Replace Host Initiators after a storage volume has been exported to a host

Once you have used ViPR to export a volume to a host, you can add a host initiator to the export, remove a host initiator from the export, or perform both actions to swap out one host initiator for another in the export group.

Back to Top

Update ViPR after a host initiator is replaced outside of ViPR

After you use ViPR to export a volume to an AIX, ESX, Linux, or Windows host, which was added to ViPR as discoverable, you can, add, remove, or replace a host initiator used by ViPR for an export operation directly on the host, using an application other than ViPR.

Before you begin

After you add, remove, or replace a host initiator that was used by ViPR in an export operation, using an application other than ViPR, you must rediscover the network-system (fabric manager) which provides connectivity between the host and the storage.

Procedure

  1. Get a list of the available network-systems using GET /vdc/network-systems. The list includes the name, ID, and URI of each of network systems (fabric managers).
    Request
    GET https://<ViPR_VIP>:4443/vdc/network-systems
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <network_systems>
         <network_system>
              <id>urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1</id>
              <link rel="self" href="/vdc/network-systems/urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1"/>
              <name>brocade_west1</name>
         </network_system>
    </network_systems>
    
  2. Select the network system on which the network between the host and the storage is configured and rediscover the network system using POST /vdc/network-systems/{id}/discover. A task is returned whose URI can be queried to determine the status of the task.
    Request
    POST https://<ViPR_VIP>:4443/vdc/network-systems/urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1/discover
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
         <creation_time>1423664227579</creation_time>
         <global>false</global>
         <id>urn:storageos:Task:e2fdf765-0086-4a1c-8645-c58fa66f8cc0:vdc1</id>
         <inactive>false</inactive>
         <internal>false</internal>
         <link rel="self" href="/vdc/tasks/urn:storageos:Task:e2fdf765-0086-4a1c-8645-c58fa66f8cc0:vdc1"/>
         <name>DISCOVER NETWORKSYSTEM</name>
         <remote>false</remote>
         <tags/>
         <vdc>
              <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
         </vdc>
         <associated_resources/>
         <description>discover one network system</description>
         <op_id>553dba5e-509b-48be-b586-370cbe243438</op_id>
         <progress>0</progress>
         <resource>
              <id>urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1</id>
              <link rel="self" href="/vdc/network-systems/urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1"/>
              <name>brocade_west1</name>
         </resource>
         <start_time>1423664227577</start_time>
         <state>pending</state>
    </task>
  3. Query the network system discover task, using the task ID from the response body of the POST request. When the message attribute of the task is Operation completed successfully, the operation has completed and the network system has been rediscovered.
    Request
    GET https://<ViPR_VIP>:4443/vdc/tasks/urn:storageos:Task:e2fdf765-0086-4a1c-8645-c58fa66f8cc0:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
         <creation_time>1423664227579</creation_time>
         <global>false</global>
         <id>urn:storageos:Task:e2fdf765-0086-4a1c-8645-c58fa66f8cc0:vdc1</id>
         <inactive>false</inactive>
         <internal>false</internal>
         <link rel="self" href="/vdc/tasks/urn:storageos:Task:e2fdf765-0086-4a1c-8645-c58fa66f8cc0:vdc1"/>
         <name>DISCOVER NETWORKSYSTEM</name>
         <remote>false</remote>
         <tags/>
         <vdc>
              <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
         </vdc>
         <associated_resources/>
         <description>discover one network system</description>
         <end_time>1423664228010</end_time>
         <message>Operation completed successfully</message>
         <op_id>553dba5e-509b-48be-b586-370cbe243438</op_id>
         <progress>100</progress>
         <resource>
              <id>urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1</id>
              <link rel="self" href="/vdc/network-systems/urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1"/>
              <name>brocade_west1</name>
         </resource>
         <start_time>1423664227577</start_time>
         <state>ready</state></task>
  4. Rediscover the host that is associated with the replaced initiator so that ViPR can rediscover all of the initiators on the host. During host discovery, if any new or removed initiators are discovered on the host, existing exports will be automatically updated. Use POST /compute/hosts/{id}/discover. A task is returned whose URI can be queried to determine the status of the task.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts/{host_ID}/discover
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1424181597255</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:933b8a8e-8223-49f6-8d52-8ddfb03cfed9:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:933b8a8e-8223-49f6-8d52-8ddfb03cfed9:vdc1"/>
        <name>DISCOVER HOST</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
        </vdc>
        <associated_resources/>
        <description>discover a compute host</description>
        <op_id>82b9ca2f-a30a-475f-b7cd-f374b1995e32</op_id>
        <progress>0</progress>
        <resource>
            <id>urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1</id>
            <link rel="self" href="/compute/hosts/urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1"/>
            <name>lglw7151</name>
        </resource>
        <start_time>1424181597253</start_time>
        <state>pending</state>
        <tenant>
            <id>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global"/>
        </tenant>
    </task>
  5. Query the host discover task, using the task ID from the response body of the POST request. When the message attribute of the task is Operation completed successfully, the operation has completed and the host has been rediscovered.
    Request
    POST https://<ViPR_VIP>:4443/vdc/tasks/urn:storageos:Task:933b8a8e-8223-49f6-8d52-8ddfb03cfed9:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1424181597255</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:933b8a8e-8223-49f6-8d52-8ddfb03cfed9:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:933b8a8e-8223-49f6-8d52-8ddfb03cfed9:vdc1"/>
        <name>DISCOVER HOST</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
        </vdc>
        <associated_resources/>
        <description>discover a compute host</description>
        <end_time>1424181602095</end_time>
        <message>Operation completed successfully</message>
        <op_id>82b9ca2f-a30a-475f-b7cd-f374b1995e32</op_id>
        <progress>100</progress>
        <resource>
            <id>urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1</id>
            <link rel="self" href="/compute/hosts/urn:storageos:Host:a9a4a18d-df40-443c-9ab0-e83823d156fa:vdc1"/>
            <name>lglw7151</name>
        </resource>
        <start_time>1424181597253</start_time>
        <state>ready</state>
        <tenant>
            <id>urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global</id>
            <link rel="self" href="/tenants/urn:storageos:TenantOrg:c104b49e-4e6b-449c-b92b-a19b247a613b:global"/>
        </tenant>
    </task>
    
Back to Top

Replace a host initiator of an undiscovered host after a ViPR export operation.

If ViPR was used to export a volume to a host, which was added to ViPR as “Other,” or if the host was added as undiscoverable, use the following procedures to replace a host initiator with a different host initiator after the export operation.

Before you begin

In ViPR, add the new host initiator to the same network from which the host initiator is being replaced, so that ViPR will see the connectivity between the host and the storage after the swap is complete. ViPR automatically updates the host initiators in the export group after the add, and remove operations are detected in ViPR

Procedure

  1. Get the list of networks using GET /vdc/networks.
    Request
    GET https://<ViPR_VIP>:4443/vdc/networks
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <networks>
         <network>
              <id>urn:storageos:Network:57351790-d19b-4a5b-b77b-7cbea6f3b0fe:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:57351790-d19b-4a5b-b77b-7cbea6f3b0fe:vdc1"/>
              <name>FABRIC_fake array fabric</name>
         </network>
         <network>
              <id>urn:storageos:Network:3a42b101-d309-4a92-b29f-16215aa09c0f:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:3a42b101-d309-4a92-b29f-16215aa09c0f:vdc1"/>
              <name>FABRIC_VPlex_LGL6220_FID_30-10:00:00:27:f8:58:f6:c1</name>
         </network>
         <network>
              <id>urn:storageos:Network:79596cc5-e8b2-4033-b576-8282222b7eb0:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:79596cc5-e8b2-4033-b576-8282222b7eb0:vdc1"/>
              <name>FABRIC_VPlex_Meta_Fid_20-10:00:00:27:f8:58:f6:c3</name>
         </network>
         <network>
              <id>urn:storageos:Network:80d3e51d-7181-4b31-baad-9f7d66bbd55e:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:80d3e51d-7181-4b31-baad-9f7d66bbd55e:vdc1"/>
              <name>FABRIC_Vplex_WAN-10:00:00:27:f8:58:f6:bc</name>
         </network>
         <network>
              <id>urn:storageos:Network:1da5b653-dce0-4f1c-8ac6-c0ad4faa176a:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:1da5b653-dce0-4f1c-8ac6-c0ad4faa176a:vdc1"/>
              <name>FABRIC_vplex154nbr2</name>
         </network>
         <network>
              <id>urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1"/>
              <name>FABRIC_VPlex_LGL6221_FID_40</name>
         </network>
         <network>
              <id>urn:storageos:Network:b53c8e06-0e80-457d-9764-c2bb82437de9:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:b53c8e06-0e80-457d-9764-c2bb82437de9:vdc1"/>
              <name>FABRIC_losam082-fabric</name>
         </network>
         <network>
              <id>urn:storageos:Network:3a5e76fe-2541-48ca-a293-bdc6ead8fa84:vdc1</id>
              <link rel="self" href="/vdc/networks/urn:storageos:Network:3a5e76fe-2541-48ca-a293-bdc6ead8fa84:vdc1"/>
              <name>FABRIC_VPLEX_WAN_lglw6208/lglw6209</name>
         </network>
    </networks>
  2. Select the network in which you want to swap the initiator. You can also use GET /vdc/networks/{id} if you want to view more details about a particular network.
  3. Add the new initiator to the network using PUT /vdc/networks/{id}. The updated network representation is returned with the new endpoint.
    Note Image
    The manually added endpoint is listed in the <endpoints_discovered> section, however the value is false, whereas those endpoints that ViPR discovered have a value of true.

    Request
    PUT https://<ViPR_VIP>:4443/vdc/networks/urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <network_update>
         <endpoint_changes>
              <add>
                   <endpoint>50:00:14:42:90:71:23:02</endpoint>
              </add>
         </endpoint_changes>
    </network_udpate>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <network>
        <creation_time>1423688165153</creation_time>
        <global>false</global>
        <id>urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/networks/urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1"/>
        <name>FABRIC_VPlex_LGL6221_FID_40</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
        </vdc>
        <native_guid>FC+BROCADE+10:00:00:27:F8:58:F6:C2</native_guid>
        <discovered>true</discovered>
        <endpoints>
            <endpoint>50:01:24:81:00:6A:6D:BE</endpoint>
            <endpoint>10:00:00:90:FA:66:22:E3</endpoint>
            <endpoint>50:06:01:62:39:A0:30:98</endpoint>
            <endpoint>50:01:24:81:00:71:ED:28</endpoint>
            <endpoint>50:01:24:81:00:71:ED:29</endpoint>
            <endpoint>10:00:00:90:FA:1C:A3:B8</endpoint>
            <endpoint>10:00:00:90:FA:1C:A3:B9</endpoint>
            <endpoint>50:00:14:42:90:71:23:02</endpoint>
            <endpoint>50:01:24:81:00:6A:6D:BF</endpoint>
            <endpoint>21:00:00:1B:32:8A:37:B3</endpoint>
            <endpoint>50:00:14:42:90:71:23:00</endpoint>
        </endpoints>
        <endpoints_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:6A:6D:BE</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:66:22:E3</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:06:01:62:39:A0:30:98</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:71:ED:28</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:71:ED:29</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:1C:A3:B8</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:1C:A3:B9</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:00:14:42:90:71:23:02</name>
                <value>false</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:6A:6D:BF</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>21:00:00:1B:32:8A:37:B3</name>
                <value>false</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:00:14:42:90:71:23:00</name>
                <value>true</value>
            </endpoint_discovered>
        </endpoints_discovered>
        <fabric_id>VPlex_LGL6221_FID_40</fabric_id>
        <network_systems>
            <network_system>urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1</network_system>
        </network_systems>
        <registration_status>REGISTERED</registration_status>
        <transport_type>FC</transport_type>
    </network>
    
  4. For the initiator that you just added as an endpoint in the network, create an initiator on the required host in ViPR.
    Request
    POST https://<ViPR_VIP>:4443/compute/hosts/{host_id}/initiators
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <initiator_create>
           <protocol>FC</protocol>
           <initiator_port>50:00:14:42:90:71:23:02</initiator_port>
    </initiator_create>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <initiator>
           <creation_time>1379202603661</creation_time>
           <id>urn:storageos:Initiator:07b2e71d-cb4c-49c9-94fe-1feab7878d35:vdc1</id>
           <inactive>false</inactive>
           <link
                  href="/compute/initiators/urn:storageos:Initiator:07b2e71d-cb4c-49c9-94fe-1feab7878d35:vdc1"
                  rel="self"/>
           <tags/>
           <host>
                  <id>urn:storageos:Host:c2fe902f-0de0-4a92-a2a9-46ba87279bd2:vdc1</id>
                  <link
                         href="/compute/hosts/urn:storageos:Host:c2fe902f-0de0-4a92-a2a9-46ba87279bd2:vdc1"
                         rel="self"/>
           </host>
           <protocol>FC</protocol>
           <hostname>myhost</hostname>
           <initiator_port>50:00:14:42:90:71:23:02</initiator_port>
    </initiator>
    The initiator is automatically registered, and any exports are updated automatically for the host.
  5. Remove the host initiator, which is being replaced by the host initiator added in the previous steps, from the network in ViPR.
    Note Image
    You can only remove those initiators which you manually added to ViPR. Any initiators that ViPR discovered cannot be removed.

    Request
    PUT https://<ViPR_VIP>:4443/vdc/networks/urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <network_update>
         <endpoint_changes>
              <remove>
                   <endpoint>21:00:00:1B:32:8A:37:B3</endpoint>
              </remove>
         </endpoint_changes>
    </network_udpate>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <network>
        <creation_time>1423688165153</creation_time>
        <global>false</global>
        <id>urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/networks/urn:storageos:Network:454b5f84-403d-4d1b-bce7-c920b93fc9d4:vdc1"/>
        <name>FABRIC_VPlex_LGL6221_FID_40</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/>
        </vdc>
        <native_guid>FC+BROCADE+10:00:00:27:F8:58:F6:C2</native_guid>
        <discovered>true</discovered>
        <endpoints>
            <endpoint>50:01:24:81:00:6A:6D:BE</endpoint>
            <endpoint>10:00:00:90:FA:66:22:E3</endpoint>
            <endpoint>50:06:01:62:39:A0:30:98</endpoint>
            <endpoint>50:01:24:81:00:71:ED:28</endpoint>
            <endpoint>50:01:24:81:00:71:ED:29</endpoint>
            <endpoint>10:00:00:90:FA:1C:A3:B8</endpoint>
            <endpoint>10:00:00:90:FA:1C:A3:B9</endpoint>
            <endpoint>50:00:14:42:90:71:23:02</endpoint>
            <endpoint>50:01:24:81:00:6A:6D:BF</endpoint>
            <endpoint>50:00:14:42:90:71:23:00</endpoint>
        </endpoints>
        <endpoints_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:6A:6D:BE</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:66:22:E3</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:06:01:62:39:A0:30:98</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:71:ED:28</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:71:ED:29</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:1C:A3:B8</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>10:00:00:90:FA:1C:A3:B9</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:00:14:42:90:71:23:02</name>
                <value>false</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:01:24:81:00:6A:6D:BF</name>
                <value>true</value>
            </endpoint_discovered>
            <endpoint_discovered>
                <name>50:00:14:42:90:71:23:00</name>
                <value>true</value>
            </endpoint_discovered>
        </endpoints_discovered>
        <fabric_id>VPlex_LGL6221_FID_40</fabric_id>
        <network_systems>
            <network_system>urn:storageos:NetworkSystem:7875ed0e-1d2a-430d-94d0-20fcd7e38bb4:vdc1</network_system>
        </network_systems>
        <registration_status>REGISTERED</registration_status>
        <transport_type>FC</transport_type>
    </network>
    
  6. Delete the initiator from ViPR using POST /compute/initiators/{id}/deactivate. This will automatically remove the initiator from any existing exports. A task is returned whose URI can be queried to determine the status of the task.
    Request
    POST https://<ViPR_VIP>:4443/compute/initiators/urn:storageos:Initiator:b90c23cf-8152-4dcc-b3e0-a1d882f9a79e:vdc1/deactivate
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    Response
    HTTP 202 Accepted
    Content-Type: application/xml
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1424203404060</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:864cfa1b-8a51-4175-b3d3-7d4a5131c33d:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:864cfa1b-8a51-4175-b3d3-7d4a5131c33d:vdc1"/>
        <name>DELETE INITIATOR</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:fd8f9b83-69c4-4826-b83b-49944710bd28:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:fd8f9b83-69c4-4826-b83b-49944710bd28:vdc1"/>
        </vdc>
        <associated_resources/>
        <description>delete initiator</description>
        <op_id>928dd2ed-3db4-4e91-98fc-91b34e78237a</op_id>
        <progress>0</progress>
        <resource>
            <id>urn:storageos:Initiator:b90c23cf-8152-4dcc-b3e0-a1d882f9a79e:vdc1</id>
            <link rel="self" href="/compute/initiators/urn:storageos:Initiator:b90c23cf-8152-4dcc-b3e0-a1d882f9a79e:vdc1"/>
            <name/>
        </resource>
        <start_time>1424203404059</start_time>
        <state>pending</state>
    </task>
  7. Query the initiator deletion task, using the task ID from the response body of the POST request. When the message attribute of the task is Operation completed successfully, the operation has completed and the initiator has been deleted. In addition, if the initiator is in use by exports, those exports are updated by removing the initiator from them.
    Request
    GET  https://<ViPR_VIP>:4443/vdc/tasks/urn:storageos:Task:864cfa1b-8a51-4175-b3d3-7d4a5131c33d:vdc1
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <task>
        <creation_time>1424203404060</creation_time>
        <global>false</global>
        <id>urn:storageos:Task:864cfa1b-8a51-4175-b3d3-7d4a5131c33d:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/vdc/tasks/urn:storageos:Task:864cfa1b-8a51-4175-b3d3-7d4a5131c33d:vdc1"/>
        <name>DELETE INITIATOR</name>
        <remote>false</remote>
        <tags/>
        <vdc>
            <id>urn:storageos:VirtualDataCenter:fd8f9b83-69c4-4826-b83b-49944710bd28:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:fd8f9b83-69c4-4826-b83b-49944710bd28:vdc1"/>
        </vdc>
        <associated_resources/>
        <description>delete initiator</description>
        <end_time>1424203467146</end_time>
        <message>Operation completed successfully</message>
        <op_id>928dd2ed-3db4-4e91-98fc-91b34e78237a</op_id>
        <progress>100</progress>
        <resource>
            <id>urn:storageos:Initiator:b90c23cf-8152-4dcc-b3e0-a1d882f9a79e:vdc1</id>
            <link rel="self" href="/compute/initiators/urn:storageos:Initiator:b90c23cf-8152-4dcc-b3e0-a1d882f9a79e:vdc1"/>
            <name/>
        </resource>
        <start_time>1424203404059</start_time>
        <state>ready</state>
        <workflow>
            <id>urn:storageos:Workflow:cd0a4b0f-2adb-458f-a34e-a4331790f7ba:vdc1</id>
            <link rel="self" href="/vdc/workflows/urn:storageos:Workflow:cd0a4b0f-2adb-458f-a34e-a4331790f7ba:vdc1"/>
        </workflow>
    </task>
Back to Top

Important REST API calls to manage hosts and clusters

The table shows some important APIs that are used to manage hosts, vCenters and Windows clusters.

Back to Top