07-18-2018 06:22 AM - edited 03-01-2019 02:58 AM
Hi Experts.
I'm building an NSO 'access' service just like the one on youtube (Understand how to use Cisco NSO to build a service for a specific configuration - YouTube) with only difference that I'm using the python skeleton.
every works fine until I want to commit dry-run the configuration which gives me the following error:
admin@ncs# show packages package oper-status
PACKAGE
PROGRAM META FILE
CODE JAVA BAD NCS PACKAGE PACKAGE CIRCULAR DATA LOAD ERROR
NAME UP ERROR UNINITIALIZED VERSION NAME VERSION DEPENDENCY ERROR ERROR INFO
-----------------------------------------------------------------------------------------------------
access X - - - - - - - - -
cisco-ios X - - - - - - - - -
admin@ncs# config
Entering configuration mode terminal
admin@ncs(config)# access Customer-A device ios0 vlan 100 access-interface GigabitEthernet0/1 trunk-interface GigabitEthernet0/0
admin@ncs(config-access-Customer-A)# commit
Aborted: no registration found for callpoint access/service_create of type=external
the develop logs shows the following errors:
<DEBUG> 18-Jul-2018::16:21:35.182 NSO ncs[17812]: devel-sls received global notification: notification_type = notify_enforcement_mode, enforce_mode = eval
<DEBUG> 18-Jul-2018::16:22:44.136 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: entering validate phase for running...
<DEBUG> 18-Jul-2018::16:22:44.136 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: run pre-trans-lock service callbacks...
<DEBUG> 18-Jul-2018::16:22:44.137 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: run transforms and transaction hooks...
<DEBUG> 18-Jul-2018::16:22:44.139 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: run transforms and transaction hooks done
<DEBUG> 18-Jul-2018::16:22:44.139 NSO ncs[17812]: devel-c new_usess db request daemon id: 4
<DEBUG> 18-Jul-2018::16:22:44.139 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: pre-trans-lock service callbacks done
<DEBUG> 18-Jul-2018::16:22:44.140 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: grabbing transaction lock...
<DEBUG> 18-Jul-2018::16:22:44.140 NSO ncs[17812]: devel-c db reply daemon id: 4
<DEBUG> 18-Jul-2018::16:22:44.140 NSO ncs[17812]: devel-c new_trans request daemon id: 4 thandle: 57
<DEBUG> 18-Jul-2018::16:22:44.140 NSO ncs[17812]: devel-c new_trans succeeded daemon id: 4 session id: 57 worker id: 1
<DEBUG> 18-Jul-2018::16:22:44.141 NSO ncs[17812]: devel-c new_usess db request daemon id: 0
<DEBUG> 18-Jul-2018::16:22:44.141 NSO ncs[17812]: devel-c db reply daemon id: 0
<DEBUG> 18-Jul-2018::16:22:44.141 NSO ncs[17812]: devel-c new_trans request daemon id: 0 thandle: 57
<DEBUG> 18-Jul-2018::16:22:44.142 NSO ncs[17812]: devel-c new_trans succeeded daemon id: 0 session id: 57 worker id: 1
<DEBUG> 18-Jul-2018::16:22:44.143 NSO ncs[17812]: devel-c trans_lock request daemon id: 4 session id: 57
<DEBUG> 18-Jul-2018::16:22:44.143 NSO ncs[17812]: devel-c trans_lock succeeded daemon id: 4 session id: 57
<DEBUG> 18-Jul-2018::16:22:44.144 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: grabbing transaction lock ok
<DEBUG> 18-Jul-2018::16:22:44.144 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: creating rollback file...
<DEBUG> 18-Jul-2018::16:22:44.147 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: creating rollback file ok
<DEBUG> 18-Jul-2018::16:22:44.147 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: run transforms and transaction hooks...
<INFO> 18-Jul-2018::16:22:44.148 NSO ncs[17812]: ncs service /access:access{Customer-A}: pre_modification: service pre-modification...
<DEBUG> 18-Jul-2018::16:22:44.149 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: ncs: service /access:access{Customer-A}: pre-modification: service pre-modification...
<ERR> 18-Jul-2018::16:22:44.149 NSO ncs[17812]: devel-c no registration found for callpoint access/service_create of type=external
<INFO> 18-Jul-2018::16:22:44.150 NSO ncs[17812]: ncs service /access:access{Customer-A}: pre_modification: service pre-modification error
<DEBUG> 18-Jul-2018::16:22:44.150 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: ncs: service /access:access{Customer-A}: pre-modification: service pre-modification error
<DEBUG> 18-Jul-2018::16:22:44.162 NSO ncs[17812]: ncs commit progress db=undefined usid=48 thandle=72: entering write-start phase for operational...
<DEBUG> 18-Jul-2018::16:22:44.162 NSO ncs[17812]: ncs commit progress db=undefined usid=48 thandle=72: cdb: write-start
<DEBUG> 18-Jul-2018::16:22:44.163 NSO ncs[17812]: ncs commit progress db=running usid=40 thandle=57: validate: run transforms and transaction hooks done
<DEBUG> 18-Jul-2018::16:22:44.164 NSO ncs[17812]: devel-c new_usess db request daemon id: 4
<DEBUG> 18-Jul-2018::16:22:44.164 NSO ncs[17812]: devel-c db reply daemon id: 4
<DEBUG> 18-Jul-2018::16:22:44.165 NSO ncs[17812]: devel-c trans_unlock request daemon id: 4 session id: 57
<DEBUG> 18-Jul-2018::16:22:44.165 NSO ncs[17812]: devel-c trans_unlock succeeded daemon id: 4 session id: 57
<DEBUG> 18-Jul-2018::16:22:44.166 NSO ncs[17812]: devel-c close_usess db request daemon id: 4
<DEBUG> 18-Jul-2018::16:22:44.166 NSO ncs[17812]: devel-c db reply daemon id: 4
Has anyone an idea where I must look in order to repair the issue ?
my main.py is as follows (default information is onmitted)
# -*- mode: python; python-indent: 4 -*-
import ncs
from ncs.application import Service
# ------------------------
# SERVICE CALLBACK EXAMPLE
# ------------------------
class ServiceCallbacks(Service):
# The create() callback is invoked inside NCS FASTMAP and
# must always exist.
@service.create
def cb_create(self, tctx, root, service, proplist):
self.log.info('Service create(service=', service._path, ')')
vars = ncs.template.Variables()
template = ncs.template.Template(service)
vars.add('VLAN', '1100')
template.apply('access-template', vars)
self.log.debug('access vlan: ', service.VLAN)
With kind regards,
Michel