Ionix NCM/VoyenceControl: How to delete SNMP v3 objects using the VoyenceControl API; Receive "ApiSystemException: Unsupported credential type" error
search cancel

Ionix NCM/VoyenceControl: How to delete SNMP v3 objects using the VoyenceControl API; Receive "ApiSystemException: Unsupported credential type" error

book

Article ID: 303520

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:


How to delete SNMP v3 objects using the Ionix Network Configuration Manager (Ionix NCM) API
How to delete SNMP v3 objects using the VoyenceControl API


The following error is received when trying to delete an SNMP v3 objects using the Ionix NCM/VoyenceControl API:

com.powerup.configmgr.common.api.ApiSystemException: Unsupported credential type



Environment

VMware Smart Assurance - NCM

Cause

The above problem symptom occurs when the deleteCredential(ResourceIdentityInfo credentialId) code is used as in the following:

ResourceIdentityInfo networkRII = new ResourceIdentityInfo(null, "NETWORK", networkName);
networkRII = ionix_api.getNetworkInfo(networkRII, false).getResourceIdentityInfo();
Collection<ResourceIdentityInfo> networkCredentialObjects = ionix_api.getAllCredentials(networkRII);

for(ResourceIdentityInfo rii : networkCredentialObjects){
try{

if(rii.getResourceName().equals(credentialName)){
rii = ionix_api.getCredentialInfo(networkRII, rii).getId();
ionix_api.
deleteCredential(networkRII, rii);
break;
}
}catch(Exception e){
LOG.error(e);
}
}

Resolution

To delete SNMP v3 objects, instead of the deleteCredential() call highlighted in the code snippet above, use the following API call: 

deleteSNMPV3Credential(ResourceIdentityInfo credentialId)