Working with NSO 5.
x
Has anything changed?
Martin Åkerström
Solutions Architect
2020
• Common Data Model
• Different NED versions
API Changes
What has changed?
•
• Templates updates
• Code changes
• New functionality/features
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Common Data
Model
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Without CDM only a single
version of YANG module
could be loaded
Common Data
Model • No need to upgrade the
whole network in one go
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Crunched namespace
from mount-id and XML
namespace
• Introduces YANG schema
mount defined in RFC 8528
Schema Changes • ned-id is now mandatory
• Globally unique over all NED
versions
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
admin@ncs(config)# show full-configuration devices device
devices device ex0
address 127.0.0.1
port 12022
authgroup default
device-type netconf ned-id router-nc-1.0
state admin-state unlocked
!
devices device ex1
address 127.0.0.1
port 12023
authgroup default
device-type netconf ned-id router-nc-1.0
ned-id
state admin-state unlocked
!
$ ls -la packages/
total 0
drwxr-xr-x 5 makerstr staff 160 Feb 20 09:25 .
drwxr-xr-x 12 makerstr staff 384 Jun 5 16:56 ..
drwxr-xr-x 8 makerstr staff 256 Jun 5 16:56 router-nc-1.0
drwxr-xr-x 8 makerstr staff 256 Jun 5 16:56 router-nc-1.1
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Discover model changes on
upgrade
Services where config will
•
NED Migration change and what has
changed
• Services that are affected
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
NED Migration
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
Ned version
Scheme
NED releases in the same maintenace
branch are backawards compatible
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Large network upgrades
More control
NED Migration
•
• Not all at once
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Service Templates
API Changes • Programmatic APIs
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
<config-template xmlns="http://tail-f.com/ns/config/1.0"
servicepoint="syslog-servicepoint">
<devices xmlns="http://tail-f.com/ns/ncs" foreach="{devices}">
<device when="{deref(current())">
<name>{string(current())}</name>
<config>
<?if-ned-id.router-nc-1.0:router-nc-1.0?>
<sys xmlns="http://example.com/router">
<syslog>
<server foreach="{/server}">
<name>{name}</name>
<selector foreach="{selector}">
<name>{name}</name>
<option>
<pid/>
</option>
API Changes
<facility>{facility}</facility>
</selector>
</server>
</syslog>
Service templates </sys>
<?elif-ned-id router-nc-1.1:router-nc-1.1?>
<sys xmlns="http://example.com/router">
<syslog>
<server foreach="{/server}">
<name>{name}</name>
<selector foreach="{selector}">
<name>{name}</name>
<option>pid</option>
<facility>{facility}</facility>
</selector>
</server>
</syslog>
</sys>
<?end?>
</config>
</device>
</devices>
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
</config-template>
• Python
def create_apache_device(self, service, name):
dev = _get_device(service, name)
if 'apache-nc-1.0:apache-nc-1.0' ==
API Changes ncs.application.get_ned_id(dev):
self.create_apache1_device(dev)
Programmatic APIs elif 'apache-nc-1.1:apache-nc-1.1' ==
ncs.application.get_ned_id(dev):
self.create_apache2_device(dev)
else:
raise Exception('unknown ned-id
{}'.format(get_ned_id(dev)))
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Java
String nedIdStr =
context.getNEDIdByDeviceName(elemName.valueAsString
API Changes ());
if ("webserver-nc-1.0:webserver-nc-
1.0".equals(nedIdStr)) {
Programmatic APIs ipStr = ipv4Str;
}
else if ("webserver2-nc-1.0:webserver2-nc-
1.0".equals(nedIdStr)) {
ipStr = ipv6Str;
}
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Test your services in NSO 5.x
• It's probably easier than you
think
• An updated test-enviroment
makes a difference
Now what? • Start to look at the features
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public