Create Storage Device operation

The Create Storage Device operation creates the details of a storage device.

The following table describes the elements of the <items> XML element and the adapter request. If not specified, the valid value for an element should be assumed to be a string.

Elements for the <items> XML element and adapter request for the Create Storage Device operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: create-storage-device

Yes

<model>

Contains the other elements in the request

Yes

<keys>

Contains elements that uniquely identify a record

If you do not specify the child elements of the <keys> element, the application tries to find the <logical-name> element in the <instance> element.

You can specify the <logical-name> element in the <keys> element, in the <instance> element, or in both elements.

Yes

<logical-name>

Specifies a unique name for identifying a storage device

Valid value: Any unique string

Note: The <logical-name> element must be used as the key and must be the child element of the <keys> element.

Yes

<instance>

Specifies a unique storage device record

The children of the <instance> element describe the fields of the record.

The only two higher-level elements are <keys> and <instance>. All other elements are child elements of the <instance> element.

Yes

<file-device>

Specifies the attributes for a storage device

The <file-device> element can contain multiple child elements.

Yes

<istatus>

Specifies the status of the storage device

Note: The <istatus> element is optional in a WebService API but is required in the HP Service Manager application. If you do not specify a value for the <istatus> element, the adapter request does not generate an error. However, update and delete operations do not work from the application. Therefore, BMC recommends that you specify a value for this element.

Valid values:

  • Planned/On order
  • Received
  • In Stock
  • Reserved
  • In use
  • Maintenance
  • Disposed/Retired
  • Installed

Yes

<assignment>

Specifies the assignment group for the storage device

Valid value: Any string, or an existing record from the application

Note: The <assignment> field is optional in a WebService API but is required in the application. If you do not specify the value for <assignment>, the adapter request does not generate an error. However, update and delete operations do not work from the application. Therefore, BMC recommends that you provide a value for this element.

Yes

<vendor>

Specifies the name of the vendor for the storage device

Valid value: Any string, or an existing record from the application

No

<serial-number>

Specifies the serial number of the storage device

Valid value: Any string

No

<location>

Specifies the location of the storage device

Valid value: Any string, or an existing record from the application

No

<configuration-item-type>

Specifies the type of the configuration item

Valid value: storage

Yes

<part-no>

Specifies the part number related to the storage device

Valid value: Any string; or an existing record from the application

No

<version>

Specifies the version of the storage device

Valid value: Any string

No

<model>

Specifies the model of the storage item

Valid value: Any string

No

<updated-by>

Specifies the name of the person who updated the record

Default value: The user who updated the record

No

<subtype>

Specifies the subtype for a selected type for a configuration item

The list of valid values is customizable. You can add and delete <subtype> values.

For example:

  • CDRW
  • Direct Attached Storage(DAS)
  • HDD
  • Network Attached Storage (NAS)
  • Storage Area Network (SAN)
  • ZIP
  • CD Burner

No

<building>

Specifies the building for the storage device

Valid value: Any string

No

<floor>

Specifies the floor related to the location

Valid value: Any string

No

<room>

Specifies information about the room

Valid value: Any string

No

<system-down>

Specifies whether the system is down

Valid values:

  • true: Indicates that the system is down
  • false (default): Indicates that the system is up

No

<asset-tag>

Specifies the asset for the record

Valid value: Any string

No

<company>

Specifies the name of the company

Valid value: Any string

No

<file-storage>

Contains child elements for describing the storage device; is a structure-type element

Yes

<sysmodtime>

Specifies the system time when the record was last modified

Valid value: Any input in date and time format

Default value: The date and time when the record is created

No

<sysmoduser>

Specifies the user name that last modified the record

Valid value: Any string

Default value: The current user of the service

No

<sysmodcount>

Specifies the number of times the record was modified

Valid value: Any integer

Default value: 0

No

<environment>

Specifies the environment of the storage device

Valid values:

  • Development
  • Test
  • Production
  • Failover
  • None

No

<owner>

Specifies the department that owns the storage device

Valid value: Any valid department in the HP Service Manager application

The list can be customized by using the HP Service Manager application.

No

<default-impact>

Specifies the default impact of the storage device

Valid values:

  • 1: Enterprise
  • 2: Site / Dept
  • 3: Multiple Users
  • 4: User

No

<title>

Specifies the title for the storage device

Valid value: Any string

No

<problem-priority>

Specifies the priority of the storage device

Valid values:

  • 1: Critical
  • 2: High
  • 3 - Average
  • 4: Low

No

<id>

Specifies the ID of the storage device

Valid value: Any unique string

No

The following figure displays a sample adapter request for the Create Storage Device operation.

Sample adapter request for the Create Storage Device operation


 <hp-service-manager-request>
    <entity>configurationitem</entity>
    <entity-type>storage-device</entity-type>
    <request>
      <operation-name>create-storage-device</operation-name>
      <parameters>
        <create-configuration-request>
          <model>
            <keys>
              <logical-name>
                <value>SD-001</value>
                <type>String</type>
              </logical-name>
            </keys>
            <instance>
              <file-device>
                  <type>Structure</type>
                <istatus>
                  <value>Received</value>
                  <type>String</type>
                </istatus>
                <vendor>
                  <value>Compaq</value>
                  <type>String</type>
                </vendor>
                <model>
                  <value>2011</value>
                  <type>String</type>
                </model>
                <serial-no>
                  <value>Sr no</value>
                  <type>String</type>
                </serial-no>
                <location>
                  <value>Asia</value>
                  <type>String</type>
                </location>
                <configuration-item-type>
                  <value>storage</value>
                  <type>String</type>
                </configuration-item-type>
                <id>
                  <value>CI10921</value>
                  <type>String</type>
                </id>
                <updated-by>
                  <value>falcon</value>
                  <type>String</type>
                </updated-by>
                <part-no>
                  <value>1007</value>
                  <type>String</type>
                </part-no>
                <version>
                  <value>V 1.1</value>
                  <type>String</type>
                </version>
                <subtype>
                  <value>HDD</value>
                  <type>String</type>
                </subtype>
                <location-code>
                  <value>advantageasia</value>
                  <type>String</type>
                </location-code>
                <vendor-id>
                  <value>CPQ</value>
                  <type>String</type>
                </vendor-id>
                <floor>
                  <value>2</value>
                  <type>String</type>
                </floor>
                <room>
                  <value>Delta</value>
                  <type>String</type>
                </room>
                <problem-priority>
                  <value>1</value>
                  <type>String</type>
                </problem-priority>
                <assignment>
                  <value>Application</value>
                  <type>String</type>
                </assignment>
                <title>
                  <value>Physical HDD 40GB</value>
                  <type>String</type>
                </title>
                <environment>
                  <value>Development</value>
                  <type>String</type>
                </environment>
                <owner>
                  <value>D-0001</value>
                  <type>String</type>
                </owner>
                <default-impact>
                  <value>1</value>
                  <type>Decimal</type>
                </default-impact>
              </file-device>
              <sysmodtime>
                <value>2010.02.03 11:48:32</value>
                <type>DateTime</type>
              </sysmodtime>
              <sysmodcount>
                <value>2</value>
                <type>Decimal</type>
              </sysmodcount>
              <sysmoduser>
                <value>falcon</value>
                <type>String</type>
              </sysmoduser>
              <file-storage>
                <type>Structure</type>
              </file-storage>
            </instance>
          </model>
        </create-configuration-request>
      </parameters>
    </request>
  </hp-service-manager-request>


The following figure displays an adapter response for the Create Storage Device operation.

Sample adapter response for the Create Storage Device operation


<hp-service-manager-response>
  <metadata>
    <count>1</count>
  </metadata>
  <responses>
    <response>
      <metadata>
        <count>1</count>
      </metadata>
      <item>
        <metadata>
          <status>success</status>
        </metadata>
        <parameters>
          <model>
            <keys>
              <logical-name>
                <value>SD-001</value>
                <type>String</type>
              </logical-name>
            </keys>
            <instance>
              <file-device>
                <type>Structure</type>
                <vendor>
                  <value>Compaq</value>
                  <type>String</type>
                </vendor>
                <model>
                  <value>2011</value>
                  <type>String</type>
                </model>
                <serial-no>
                  <value>Sr no</value>
                  <type>String</type>
                </serial-no>
                <location>
                  <value>Asia</value>
                  <type>String</type>
                </location>
                <configuration-item-type>
                  <value>storage</value>
                  <type>String</type>
                </configuration-item-type>
                <id>
                  <value>CI10921</value>
                  <type>String</type>
                </id>
                <updated-by>
                  <value>falcon</value>
                  <type>String</type>
                </updated-by>
                <part-no>
                  <value>1007</value>
                  <type>String</type>
                </part-no>
                <istatus>
                  <value>Received</value>
                  <type>String</type>
                </istatus>
                <version>
                  <value>V 1.1</value>
                  <type>String</type>
                </version>
                <subtype>
                  <value>HDD</value>
                  <type>String</type>
                </subtype>
                <location-code>
                  <value>advantageasia</value>
                  <type>String</type>
                </location-code>
                <vendor-id>
                  <value>CPQ</value>
                  <type>String</type>
                </vendor-id>
                <floor>
                  <value>2</value>
                  <type>String</type>
                </floor>
                <room>
                  <value>Delta</value>
                  <type>String</type>
                </room>
                <sysmodtime>
                  <value>2010.02.08 18:38:02</value>
                  <type>DateTime</type>
                </sysmodtime>
                <sysmodcount>
                  <value>0</value>
                  <type>Decimal</type>
                </sysmodcount>
                <sysmoduser>
                  <value>falcon</value>
                  <type>String</type>
                </sysmoduser>
                <problem-priority>
                  <value>1</value>
                  <type>String</type>
                </problem-priority>
                <assignment>
                  <value>Application</value>
                  <type>String</type>
                </assignment>
                <title>
                  <value>Physical HDD 40GB</value>
                  <type>String</type>
                </title>
                <environment>
                  <value>Development</value>
                  <type>String</type>
                </environment>
                <owner>
                  <value>D-0001</value>
                  <type>String</type>
                </owner>
                <default-impact>
                  <value>1</value>
                  <type>Decimal</type>
                </default-impact>
              </file-device>
              <file-storage>
                <type>Structure</type>
                <sysmodtime>
                  <value>2010.02.08 18:38:03</value>
                  <type>DateTime</type>
                </sysmodtime>
                <sysmoduser>
                  <value>falcon</value>
                  <type>String</type>
                </sysmoduser>
                <sysmodcount>
                  <value>0</value>
                  <type>Decimal</type>
                </sysmodcount>
              </file-storage>
              <uniquequery>file.device,logical.name="SD-001"</uniquequery>
            </instance>
          </model>
          <messages>
            <element>
              <value>joinstorage record added.</value>
            </element>
          </messages>
          <status>SUCCESS</status>
          <message>Success</message>
          <schema-revision-date>2010.02.08 00:00:00</schema-revision-date>
          <schema-revision-level>1</schema-revision-level>
          <return-code>0</return-code>
        </parameters>
      </item>
    </response>
  </responses>
</hp-service-manager-response>
Was this page helpful? Yes No Submitting... Thank you

Comments