cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
543
Views
15
Helpful
7
Replies
wal77
Beginner

Namespace in the topology file

Hello,

I'm new in community. Play with NSO-5.3 local installation. Currently try to implement the following example:  examples.ncs/getting-started/developing-with-ncs/17-mpls-vpn-python. But to understand the NSO dependencies I decided to setup the environment manually and a little bit simpler:

ncs-netsim create-network /opt/nso-5.3/packages/neds/cisco-ios-cli-3.0 6 ce

ncs-netsim add-to-network /opt/nso-5.3/packages/neds/cisco-iosxr-cli-3.0 3 pe

copied ios.xml andiosxr.xml to the appropriatenetsim/(ce/pe)/(ce/pe1…..x/cdb/ directory.

ncs-netsim start

ncs-setup --netsim-dir ./netsim --dest .

Generate skeleton:

cd /opt/walnso_vpn02/packages

ncs-make-package --service-skeleton python-and-template VPN02 --augment /ncs:services

Compile package

cd /opt/walnso_vpn02/packages/VPN02/src

make clean all

Create topology file using the simplified topology.xml from the example:

vi /opt/walnso_vpn02/ncs-cdb/topology.xml

Start ncs:

ncs

Result:

CDB boot error: failed to load ./ncs-cdb/topology.xml:2: unknown namespace: http://com/example/l3vpn in topology
Daemon died status=10

I've compared in skeleton automatic created /packages/VPN02/src/Makefile and in example, some differences.

Copied example Makefile, result the same.

Could you help me please.

Regards

wal77

7 REPLIES 7
vleijon
Cisco Employee

So you are missing the namespace http://com/example/l3vpn. You generated a new service skeleton instead of using the l3vpn package that was provided by the example so you probably don’t have that namespace, or any of the yang model for the topology.

In my yang module I have container "topology", the same as in the examples yang

 

container topology {
tailf:info "Topology CE-PE";
list role {
key "role";
tailf:cli-compact-syntax;
leaf role {
type enumeration {
enum ce;
enum pe;
enum p;
}
}
leaf-list device {
type leafref {
path "/ncs:devices/ncs:device/ncs:name";
}
}
}

list connection {
key "name";
leaf name {
type string;
}
container endpoint-1 {
tailf:cli-compact-syntax;
uses connection-grouping;
}
container endpoint-2 {
tailf:cli-compact-syntax;
uses connection-grouping;
}
leaf link-vlan {
type uint32;
}
}
}

 

Or you mean a separate yang model?

Which other namespaces could I use in this case? Or how can I add the namespace by myself?

Thanks in advance

vleijon
Cisco Employee

Yes, the namespace is at the top of the yang file, the namespace statement, you can either change the namespace in your yang file, or you can change it in the xml file to match what was auto-generated.

I've changed to the following:

yang file:

namespace "http://com/example/VPN02";

 

topology.xml:

<config xmlns="http://tail-f.com/ns/config/1.0">
  <topology xmlns="http://com/example/VPN02">

 

then 

make clean all

 

 

But I still get:

[root@walnso_01 walnso_vpn02]# ncs
CDB boot error: failed to load ./ncs-cdb/topology.xml:2: unknown namespace: http://com/example/VPN02 in topology
Daemon died status=10

 

 

 

Missing: ">request package reload" ? You need to let NSO know about the compiled changes.

Thanks for the answer.

But to execute "package reload" ncs_cli is needed, and ncs_cli does need ncs well started.

ncs start terminated with:

CDB boot error: failed to load ./ncs-cdb/topology.xml:2: unknown namespace: http://com/example/VPN02 in topology
Daemon died status=10

You can run ncs with package reload:

 

#ncs --with-package-reload-force

 

You can see all ncs options via "man ncs"