ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Discrepancies between what NCM policies are returned via REST, to what is shown in the Spectrum OneClick GUI

book

Article ID: 237569

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

Discrepancies between what NCM_Policy_Device_List (0x903774) is reporting via REST, to what is shown in the OneClick GUI. Only 33 policies show in OC GUI, while REST/CLI show return 50

REST is:

http://<ONECLICK>:8080/spectrum/restful/models

METHOD: POST

<?xml version="1.0" encoding="UTF-8"?>  
<rs:model-request throttlesize="
100000
xmlns:rs="
http://www.ca.com/spectrum/restful/schema/request
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation="
http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">     
<rs:target-models>         
<rs:models-search>             
<rs:search-criteria xmlns="
http://www.ca.com/spectrum/restful/schema/filter">               
<filtered-models>                   
<has-substring-ignore-case>                     
<attribute id="
0x10000"> <!-- MODEL TYPE NAME -->                       
<value>
NCM_Policy</value>                     
</attribute>                   
</has-substring-ignore-case>               
</filtered-models>             
</rs:search-criteria>         
</rs:models-search>     
</rs:target-models>   
<rs:requested-attribute id="
0x1006e"/> <!-- POLICY NAME -->   
<rs:requested-attribute id="
0x82004c"/> <!-- POLICY DEFINITION -->   
<rs:requested-attribute id="
0x82004b"/> <!-- POLICY STATE - ACTIVE = 1 -->   
<rs:requested-attribute id="
0x820114"/> <!-- POLICY TYPE --> 
</rs:model-request>

The CLI returns a Model_Handle (MH) that is invalid (and not shown in the OneClilck GUI):

[[email protected]/usr/Spectrum/vnmsh] $ ./show attributes mh=0x95d627 | grep NCM_Policy_Device_List
0x820068    NCM_Policy_Device_List            0                    0x957bee

However, when searching for this MH, nothing is returned:

./show models | grep 0x957bee

Cause

The Policy Model_Handles have become invalid, so OneClick cannot resolve them and they are not listed under the Explorer pane of OneClick. However, because they're still in the DB, they are returned by REST or CLI calls since they read directly from what's in the DB for those Models and do not have to resolve them with other attributes like OneClick.

Environment

DX NetOps Spectrum 20.2 or later

Resolution

Setting a Locator search in OneClick for:

'Model Type Name (0x10000)' = 'NCM_Policy'

Everything in the results but not in the policy list shown in OneClick Explorer Policies is considered as invalid. 

These can then be deleted manually. After this, the results returned via REST, should be the same as what is shown in the OneClick GUI.