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
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);
}
}
To delete SNMP v3 objects, instead of the deleteCredential() call highlighted in the code snippet above, use the following API call:
deleteSNMPV3Credential(ResourceIdentityInfo credentialId)