How to Delete a Device Using Rest and Not Retire It in Performance Management
search cancel

How to Delete a Device Using Rest and Not Retire It in Performance Management

book

Article ID: 240396

calendar_today

Updated On:

Products

CA Spectrum

Issue/Introduction


Starting in NetOps 21.2.8 there is a new option that allows a user to retire or not retire a device in Performance Management when you manually delete it. Does this
  new feature extend to rest when deleting models?


(DELETE) http://<hostname><:portnumber>/spectrum/restful/model/<model_handle>

 

Environment

Release : 21.2.8+

Component : Spectrum OneClick

Cause

Resolution


The Rest interface does not fully have this option as of yet, to not retire the device in CAPM remove the device from the
    IP Domain Global Collection Prior to deleting the model.


1. Delete Association to Global Collection

Rest Call to destroy an association

(DELETE) http://<hostname><:port>/spectrum/restful/associations/relation/<rel_handle>/leftmodel/<LMhandle>/rightmodel/<RMhandle>


<rel_handle> - a model can either be statically added or dynamically added to a Global Collection, so one of the following two relations is needed (typically dynamicGlobalCollects)

dynamicGlobalCollects        0x0001003a   MANY_TO_MANY
staticGlobalCollects             0x0001003b   MANY_TO_MANY

<LMhandle> - the model handle of the IP Domain Global Collection
<RMhandle> - the model handle of the device to be deleted

Example Syntax
(DELETE) http://oneclickserver.acme.net:8080/spectrum/restful/associations/relation/0x0001003a/leftmodel/0x1000b38/rightmodel/0x1000b39

 


2. Now that the device has been removed from the IP Domain Global Collection destroy the device model

Delete the device model

(DELETE) http://<hostname><:portnumber>/spectrum/restful/model/<model_handle>


Example Syntax
(DELETE) http://oneclickserver.acme.net:8080/spectrum/restful/model/0x1000b39

Additional Information


The rest call might be updated in a later version to add an option to not retire the device, For now, it must be removed from the IP Domain GC to not have it retired.


DELETE associations
https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/programming/web-services-api-reference/how-to-use-the-ca-spectrum-web-services-api/restful-resources-nouns/associations.html#concept.dita_d03fe2e108278a21db78ad03f95614754c65b243_DELETEassociations


DELETE model
https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/spectrum/21-2/programming/web-services-api-reference/how-to-use-the-ca-spectrum-web-services-api/restful-resources-nouns/model.html#concept.dita_1d06a0d76f000e6edd18de492383983feefced4e_DELETEmodel

Attachments