aristanetworks/cvprac

Add API call to decom device (new folsom feature)

Closed this issue · 7 comments

Looking to add a call in CVPRAC in order to automate removing a device from CVP which is no longer reachable. This can be accomplished via the GUI under the "device" panel in "device overview" section, but only when the device is no longer streaming to CVP.

Hi @stimm87

Do you know if this decom device API is the "/inventory/deleteDevices.do" endpoint? If so this is already included in cvprac.

Hi, no this is a new Telemetry call, it's not on the Inventory API path and only occurs when when a device has stopped streaming telemetry data for a while. I did try to find the call using chrome developer tools but unfortunately could not spot it. It will appear in the https://{{cvpserver}}/cv/devices/overview/{{devicePathID}} view when CVP detects that the TerminAttr agent has stopped streaming data.

@Hugh-Adams There may not be a REST call for this. Could be some websocket magic the frontend is doing and that would be the reason you're not seeing it in developer tools.

One of the nuances with CVP is that we now have 2 APIs, one for CVP proper that we have been using for the past 4 years and the other is a Telemetry API using the RESTful calls to Aeris. I was explaining this to a customer last week, and this topic plus API versioning plus sysdb paths are not an API was not a fun discussion. Do we want to add a telemetry API to cvprac and expose turbine generated endpoints?

I think for this issue (adding a call in CVPRAC to automate removing a device from CVP if not streaming), there is no current way to do this. I think the frontend is using some method to remove the device from NetDB via websocket action...which is out of scope for cvprac. I've sent an email to cvp-dev....will circle back with response.

Dev replied and confirmed that right now this happens via a direct publish to NetDB via the websocket. They do have plans to add a versioned API, accessible over REST, in a future release.

This will be included when REST API is added.