cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
795
Views
5
Helpful
2
Replies

Automatic service package upgrade with added nodes

allenc
Level 1
Level 1

I am trying to take advantage of NSO's automatic service package upgrade feature to add a node to the service schema, but it does not seem to be working.

I start off with a basic template-only service with this YANG snippet:

  augment /ncs:services {
    list basic {
      key name;

      uses ncs:service-data;
      ncs:servicepoint "basic";

      leaf name {
        type string;
      }

      leaf-list device {
        type leafref {
          path "/ncs:devices/ncs:device/ncs:name";
        }
      }

      leaf foo {
        type string;
      }

      //leaf bar {
      //  type string;
      //  default "bye";
      //}

    }
  }

In NSO, I instantiate the service:

 

 

admin@ncs(config)# services basic b1
admin@ncs(config-basic-b1)# foo hello
admin@ncs(config-basic-b1)# commit dry-run
cli {
    local-node {
        data  services {
             +    basic b1 {
             +        foo hello;
             +    }
              }
    }
}
admin@ncs(config-basic-b1)# commit
Commit complete.

In the YANG, I uncomment the `bar` leaf, re-compile, and reload packages.

If I understand the docs correctly, the package reload with the new YANG model should automatically upgrade my service instances and add the `bar` leaf with default value `yo`. But this does not happen:

admin@ncs# show running-config services basic
services basic b1
 foo hello
!

I know the new package with the new `bar` leaf loaded as I am able to instantiate it just fine:

admin@ncs# show running-config services basic b2
services basic b2
 foo hej
 bar hejda
!

What am I missing here?  I'm using NSO 4.7 if that matters.

 

Thanks,

-Allen

1 Accepted Solution

Accepted Solutions

vleijon
Cisco Employee
Cisco Employee

Default values are not displayed by default. You can either do a show on the entire path (show running-config services basic bar) or do show running-config services basic | details to get the defaults included.

View solution in original post

2 Replies 2

vleijon
Cisco Employee
Cisco Employee

Default values are not displayed by default. You can either do a show on the entire path (show running-config services basic bar) or do show running-config services basic | details to get the defaults included.

Thanks, Viktor. I did not know about the `| details` in that context.  That is very helpful.