Delete Computer operation
The Delete Computer operation deletes a computer record.
Delete wrappers can delete only a single record. If information provided in the request refers to zero or more than one record, then no record is deleted. The entry to be deleted is first located by executing a logical AND operation using the elements provided in request. The located entry is then deleted.
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 Delete Computer operation
The following figure displays the sample adapter request for the Delete Computer operation.
Sample adapter request for the Delete Computer operation
<hp-service-manager-request>
<entity>configurationitem</entity>
<entity-type>computer</entity-type>
<request>
<operation-name>delete-computer</operation-name>
<parameters>
<delete-computer-request>
<model>
<keys>
<logical-name>
<value>Computer1</value>
<type>String</type>
</logical-name>
</keys>
<instance>
<file-device>
<type>Structure</type>
<configuration-item-type>
<value>computer</value>
<type>String</type>
</configuration-item-type>
</file-device>
<file-computer>
<type>Structure</type>
</file-computer>
</instance>
</model>
</delete-computer-request>
</parameters>
</request>
</hp-service-manager-request>
The following figure displays an adapter response for the Delete Computer operation.
Sample adapter response for the Delete Computer 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>Computer1</value>
<type>String</type>
</logical-name>
</keys>
<instance>
<file-device>
<type>Structure</type>
<model>
<value>RA-2001</value>
<type>String</type>
</model>
<location>
<value>location</value>
<type>String</type>
</location>
<configuration-item-type>
<value>computer</value>
<type>String</type>
</configuration-item-type>
<updated-by>
<value>falcon</value>
<type>String</type>
</updated-by>
<part-no>
<value>1003</value>
<type>String</type>
</part-no>
<istatus>
<value>In Stock</value>
<type>String</type>
</istatus>
<floor>
<value>floor</value>
<type>String</type>
</floor>
<sysmodtime>
<value>2010.02.05 12:31:07</value>
<type>DateTime</type>
</sysmodtime>
<sysmodcount>
<value>2</value>
<type>Decimal</type>
</sysmodcount>
<sysmoduser>
<value>falcon</value>
<type>String</type>
</sysmoduser>
<assignment>
<value>Application</value>
<type>String</type>
</assignment>
</file-device>
<file-computer>
<type>Structure</type>
<sysmodtime>
<value>2010.02.05 12:31:07</value>
<type>DateTime</type>
</sysmodtime>
<sysmoduser>
<value>falcon</value>
<type>String</type>
</sysmoduser>
<sysmodcount>
<value>1</value>
<type>Decimal</type>
</sysmodcount>
</file-computer>
<uniquequery>file.device,logical.name="Computer1"</uniquequery>
</instance>
</model>
<messages>
<element>
<value>joincomputer record deleted.</value>
</element>
</messages>
<status>SUCCESS</status>
<message>Success</message>
<schema-revision-date>2005.03.15 00:00:00</schema-revision-date>
<schema-revision-level>0</schema-revision-level>
<return-code>0</return-code>
</parameters>
</item>
</response>
</responses>
</hp-service-manager-response>