07-12-2022 08:28 PM
hi, i'm new in cisco NSO and i'm trying to create service template but when i tried to commit, it's throwing error message as below. i did google before posting and found service point in yang and xml template has to match exactly and in my case, it's matched. could you please help to isolate this issue?
Solved! Go to Solution.
07-15-2022 02:48 AM - edited 07-15-2022 02:52 AM
Concerning the router-id , you define it in the yang as uint16 so you cannot use ip address. You need to change the type
leaf router-id{ type uint16; }
As i said before , in order to help you . Can you try to configure the device manually without using your services or do a show running-config devices device <EXISTING_DEVICE> config router | display xml on a router that has already the configuration in order to get the xml template.
07-13-2022 09:15 AM
Hello ,
Can you provide us your package ? Package-metadata, yang , python or Java , xml ?
07-13-2022 11:07 AM
Hi
Looks like your xml file is not loaded at all due to parsing error:
oper-status error-info "access-service-template.xml:10 The node: config contains unexpected data: '>'."
If the file is not loaded service-point is not registered. You did not share enough of the xml file to tell what the problem could be.
br.
Kristoffer Larsen
07-14-2022 01:17 PM
07-14-2022 02:21 PM
Hello ,
As @radioman said you had error in your XML. You need to remove the extra character >.
Also you made some mistake in your XML template.
In order to get the XML tempalte . Please first to configure device using NSO from ncs_cli then do a commit dry-run outformat xml then change the generated xml by replacing using your data structure that you define in Yang file.
Please try to provide us your XML as it in your NSO instance. For example the router node in your xml is missing the namespace.
07-14-2022 06:16 PM
Thank you @Nabsch for your prompt response.
yes i did the modification but it is still throwing error message. in the xml file, i need to use loop for 2 instances TEST1 and TEST2.
admin@ncs(config-access-service-SW31)# commit dry-run outformat xml
result-xml {
local-node {
data <services xmlns="http://tail-f.com/ns/ncs">
<access-service xmlns="http://com/example/accessservice">
<device>SW31</device>
<router>
<name>TEST1</name>
<router-id>100</router-id>
<network>12.12.12.12/32</network>
<description>TEST1</description>
</router>
<router>
<name>TEST2</name>
<router-id>200</router-id>
<network>13.13.13.13/32</network>
<description>TEST2</description>
</router>
</access-service>
</services>
}
}
admin@ncs(config)# services access-service SW31
admin@ncs(config-access-service-SW31)# router TEST1
admin@ncs(config-router-TEST1)# router-id 1.1.1.1
------------------------------------------^
syntax error: "1.1.1.1" is not a valid value.
admin@ncs(config-router-TEST1)# router-id 12.12.12.12
------------------------------------------^
syntax error: "12.12.12.12" is not a valid value.
admin@ncs(config-router-TEST1)# router-id 100
admin@ncs(config-router-TEST1)# network 12.12.12.12/32
admin@ncs(config-router-TEST1)# description TEST1
admin@ncs(config-router-TEST1)# exit
admin@ncs(config-access-service-SW31)# router
Possible completions:
<name:string>
TEST1 TEST1
admin@ncs(config-access-service-SW31)# router TEST2
admin@ncs(config-router-TEST2)# router-id 200
admin@ncs(config-router-TEST2)# network 13.13.13.13/32
admin@ncs(config-router-TEST2)# description TEST2
admin@ncs(config-router-TEST2)# exit
07-14-2022 06:27 PM
thank you for your help guys. i'm new in NSO and xml is also new for me.I appreciate your help.
below is my new xml template
07-15-2022 02:45 AM
Which ned version are you using and also which nso version ?
07-15-2022 02:48 AM - edited 07-15-2022 02:52 AM
Concerning the router-id , you define it in the yang as uint16 so you cannot use ip address. You need to change the type
leaf router-id{ type uint16; }
As i said before , in order to help you . Can you try to configure the device manually without using your services or do a show running-config devices device <EXISTING_DEVICE> config router | display xml on a router that has already the configuration in order to get the xml template.
07-17-2022 08:50 AM
hi, i'm trying to configure something different than router ios supports. is that possible?
once i define yang model and compile the package, that command is showing for that particular device. But once i deploy service template, it's throwing error message.
07-19-2022 04:21 AM
No you cannot . Your template is based on NED modelization ( that mean what the NED can support). So you cannot modelize a template of device configuration that's not supported by the NED.
07-19-2022 05:05 PM
got it. thank you Nabsch.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide