cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3487
Views
0
Helpful
3
Replies

Can not delete a device from a DNA center inventory

alaaeddin2
Level 1
Level 1

-I had a c9200 device discovered by dna center and it showed a cli authentication error.

 

-tried to delete it from inventory and I checked clean up configuration box.

 

-and then I did a reset the device configuration.

 

-but the device didn't removed and the delete device from action is disabled 

 

How can I remove it from inventory?!

 

Thanks

 

 

 

 

 

 

 

 

3 Replies 3

balaji.bandi
Hall of Fame
Hall of Fame

Device deleted from Provision>Devices>Inventory.

 

What version of DNAC ? Try below thread may also help you, 

 

https://community.cisco.com/t5/cisco-digital-network/cisco-dna-center-can-t-delete-device-from-inventory/td-p/4035259

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Tomas de Leon
Cisco Employee
Cisco Employee
  • What version of the Cisco DNA Center?
  • Is the Device part of the SDA Fabric? If so, it needs to be removed from the SDA fabric first & before deleting.

 

One way to delete the device in your Use Case Scenario

  • ssh or use the console to access the C9200 device
  • Create CLI Credentials
For example:
!
username netadmin privilege 15 password Cisco123!
!
  • Configure an event manager applet to monitor the CLI Commands on the C9200 
!
event manager applet CLI_COMMANDS-->
event cli pattern ".*" sync no skip no
action 1.0 syslog msg "$_cli_msg"
action 2.0 file open FH flash:eem_cli_commands.txt a+
action 2.1 file puts FH "$_event_pub_time %HA_EM-6-LOG: CLI_COMMANDS-->: $_cli_msg"
action 2.2 file close FH
!

# Issue CLI command
switch# term mon
  • Create a Discovery Task on the Cisco DNA Center for the C9200. 
Discovery Parameters:
IP Address/Range c9200.ip.address-c9200.ip.address

+ Add Credentials
CLI Credentials netadmin Cisco123! enable.password
SNMPv2c Credentials snmpv2ro

then Discover the device... Monitor the output on the switch
  • Once the Device is added to inventory, go to the inventory unassigned section
    • Click on box to select
    • from the Actions -> Inventory -> Select "Delete Device"
    • Click on configuration clean-up Box
    • Proceed to delete the device
    • Monitor the terminal output on the switch 

The device should then be deleted. If it fails, record the errors seen on the screen...

 


Another Option is Delete Device using the API:

Use Postman...

GET
{{PROTOCOL}}://{{DNAC.IP.ADDRESS}}/dna/intent/api/v1/network-device/ip-address/{device.ip.address}

** Get device_id from the response

DELETE
{{PROTOCOL}}://{{DNAC.IP.ADDRESS}}/dna/intent/api/v1/network-device/{id}

 

[ref:deadbeef]  

 

Thanks Tomas for your reply,

DNAC version is 2.1.2.6

And yes I already remove it from the fabric.

I will try your solution and give you a feedback

Review Cisco Networking for a $25 gift card