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

Add device to nso using a service

Hello I Have a service that i use to add device to device to nso here is my template :

<config-template xmlns="http://tail-f.com/ns/config/1.0">
  <devices xmlns="http://tail-f.com/ns/ncs" >
    <device tags='merge'>
      <name>{/device-name}</name>
      <address>{/ip-management}</address>
      <port>{/port-management}</port>
      <authgroup>{/auth-group}</authgroup>
      <device-type>
        <cli>
          <ned-id xmlns:cisco-nx-cli-5.25="http://tail-f.com/ns/ned-id/cisco-nx-cli-5.25">cisco-nx-cli-5.25:cisco-nx-cli-5.25</ned-id>
        </cli>       
      </device-type>
      <trace>raw</trace>
      <state>
        <admin-state>{/admin-state}</admin-state>
      </state>
    </device>
  </devices>
</config-template>

It add the device successfuly but I try to update for exemple the authgroup the commit dry-run shows that all the device config from NSO. Any idea?

3 Replies 3

Daniel Kratz
Cisco Employee
Cisco Employee

Hi @MAMADOUTOURE2733 ,

Per my understanding of the reported, you are configuring stuff in the device manager via service manager, and are questioning the config diff provided after promote a service change.

Have you tried to do a "show run devices device <dev_name> | display service-meta-data"? Maybe the Backpointers can give you a hint.

BR

 

Yes I got the diff after device sync-from

huayyang
Cisco Employee
Cisco Employee

with given info, I guess the your service update would remove everything under /devices/device/config(data populated by sync-from) because fastmap removes the /devices/device list but doesn't recreate /devices/device/config, this is how fastmap works, check https://developer.cisco.com/docs/nso-guides-6.1/implementing-services/#fastmap-and-service-life-cycle for more details