cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
545
Views
0
Helpful
4
Replies
Highlighted
Beginner

How can I remove from NSO a device associated with device groups or services?

I am trying to find an easy way to remove a device from NSO when the device is assigned to certain device groups or services. We are using NSO to manage a client's network and we recently started deploying services to push configuration changes. As the client's network is a brownfield, there are devices that need to be decommissioned. When that happens we need to remove them from NSO.

 

If I try using the command 

no devices device <device-name>

after I run

commit dry-run

I get an error saying.

Aborted: illegal reference 'devices device-group <group-name> device-name'

The same happens with devices associated with services. It seems like NSO is asking me to remove the device from the services and the device groups first, and then remove the device from NSO. That seems quite cumbersome when we are trying to deploys several services to devices and we may find ourselves decommissioning devices in the future.

 

Is there a command or a script that can be used to remove a device and all of its references in one go from NSO?

Everyone's tags (4)
4 REPLIES 4
Cisco Employee

Re: How can I remove from NSO a device associated with device groups or services?

you have to remove the device from the group <group-name> first, by updating the device-group:

 

(config) devices device-group <group-name> device-name [ device1 device2 device3 ]

(config) commit

 

 

Beginner

Re: How can I remove from NSO a device associated with device groups or services?

@atriyant, that is actually what we already figured out and where our issue stands. Because of the large network that we help manage, we will devices belonging to several device groups and services, so if one device needs to be removed, it could take some time to identify and remove the device form those groups and services.

 

Our plan is to create a script that can do this operation automatically, but before doing that we wanted to check if someone in the community had already worked on this.

Cisco Employee

Re: How can I remove from NSO a device associated with device groups or services?

It would be interesting for us/me to understand what sort of behavior you would have expected. NSO will never tolerate a configuration that violates the YANG model (e.g. with dangling pointers), so what would you have liked the system to do in this situation?

Beginner

Re: How can I remove from NSO a device associated with device groups or services?

The behavior that we were expecting was for NSO to automatically recognize what dangling pointers a change would create and ask the user if it was OK to remove them, rather than having the user manually find them and remove them before removing the device. That would preserve the YANG model and provide a useful feature to users that need to remove devices from NSO. It is possible for us to script that functionality ourselves, but I wanted to check if it was already available. From our prospective, this is a very common use case, but if that is not the case from your prospective, I can understand why it was not implemented.