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

NSO devel-c no registration found for callpoint access/service_create of type=external

michelbijnsdorp
Level 1
Level 1

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

3 Replies 3

Michael Maddern
Cisco Employee
Cisco Employee

Hi Michel,

 

Check that you have python installed (try executing it from the command line). Needs to be minimum version of 2.7.5 or 3.4.

 

Check the python process is running for your service. Easiest way is to check the logs directory, there should be a file called ncs-python-vm-<service-name>.log (i.e. ncs-python-vm-access.log). If the file is there, check the contents to see if the process has crashed.

 

If the file is missing or the process has crashed try running "packages reload" from ncs_cli. Or try restarting NSO. Also if the process is not running ensure you have the correct entry in package-meta-data.xml. This should have been created automatically when you created the package if you choose one of the python service-skeleton options. You should have an entry which looks something like:

 

 

  <component>
    <name>main</name>
    <application>
      <python-class-name>access.main.Main</python-class-name>
    </application>
  </component>

 

 

Finally, ensure that the callpoint in register_service exactly matches the servicepoint ("access") in your yang file. You've said you've omitted the default information from the python main.py so I can't see it, but check you have something like this:

 

# ---------------------------------------------
# COMPONENT THREAD THAT WILL BE STARTED BY NCS.
# ---------------------------------------------
class Main(ncs.application.Application):
    def setup(self):
        # The application class sets up logging for us. It is accessible
        # through 'self.log' and is a ncs.log.Log instance.
        self.log.info('Main RUNNING')

        # Service callbacks require a registration for a 'service point',
        # as specified in the corresponding data model.
        #
        self.register_service('access', ServiceCallbacks)

    def teardown(self):
        # When the application is finished (which would happen if NCS went
        # down, packages were reloaded or some error occurred) this teardown
        # method will be called.

        self.log.info('Main FINISHED')

 

I have a problem similar to this. I have NSO 5.2.1 installed on my Mac. Now, no services work anymore, including services that worked before. I get this error:

admin@ncs(config-vlan_mappings-32)# commit dry-run outformat xml                                                                             
Aborted: no registration found for callpoint newSubAccess-servicepoint/service_create of type=external

It looks like the python process is not running for my services, because the ncs-python-vm-<service-name>.log is not created for new services. What can I do in that case?

Seems like python is running on my Mac:

# ncs-run % python --version
Python 3.7.3
# ncs-run % python2 --version
Python 2.7.16
# ncs-run % python3 --version
Python 3.7.3

I get this in ncs --status output:

Loaded packages:
  accessSwitchAndSP:
    Version: 1.0 Status: up
  cisco-ios-cli-6.37:
    Version: 6.37 Status: up
  cisco-iosxr-cli-7.15:
    Version: 7.15.3 Status: up
  cisco-pnp-cs-gen-1.1:
    Version: 1.1.24 Status: up
  intDescTest:
    Version: 1.0 Status: up
  moveSubPE:
    Version: 1.0 Status: up
  multipleIpslaIcmp:
    Version: 1.0 Status: up
  my_test:
    Version: 1.0 Status: up
  newSubAccess:
    Version: 1.0 Status: up
  newSubCPE:
    Version: 1.0 Status: up
  newSubPE:
    Version: 1.0 Status: up
  newSubPOI:
    Version: 1.0 Status: up
  newSubSP:
    Version: 1.0 Status: up
  open-net-access:
    Version: 1.0 Status: up
  open-net-core:
    Version: 1.0 Status: up
  test_yang:
    Version: 1.0 Status: up

But also this:

servicepoints:
  id=accessSwitchAndSP-servicepoint ** not registered
  id=intDescTest-servicepoint ** not registered
  id=moveSubPE-servicepoint ** not registered
  id=multipleIpslaIcmp-servicepoint ** not registered
  id=my_test-servicepoint ** not registered
  id=newSubAccess-servicepoint ** not registered
  id=newSubCPE-servicepoint ** not registered
  id=newSubPE-servicepoint ** not registered
  id=newSubPOI-servicepoint ** not registered
  id=open-net-access-servicepoint ** not registered
  id=open-net-core-servicepoint ** not registered
  id=test_yang-servicepoint ** not registered

What do you think is wrong? Have I screwed up environmental variables like $PATH or something else?

 

I'm also facing similar issue .

while trying to commit  "Aborted: no registration found for callpoint" observed 

Service points are also  showing as not registered 

Is there any update on this ..?

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: