cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
203
Views
0
Helpful
3
Replies
khgrant
Cisco Employee

NSO - Questions on the XML coding

Hi All,

 

 

I have some questions on the NSO XML coding.

 

1.  Is there any good documentation available on how to create conditions within the XML file?

 

 

2.  Is it possible to use the variable “name” within the XML file? Here I’m talking about the variable “name” which is defined within the .yang file for a service.

 

 

3.  Is it possible to use the variable “device” within the .XML or .yang file to point towards a device?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
khgrant
Cisco Employee

Thanks for your help.

Well, to be more specific, the question is, when we create a new service within the GUI, it asks to fill in the “Name” which in the below example is “TEST-0012”.

 

Question is, can we re-use that variable within the XML?

Something as in t he example below, where we use the variable device, but directly from the real/physical device name? Will that work?

 

 

View solution in original post

3 REPLIES 3
khgrant
Cisco Employee

 

<< 

I have some questions on the NSO XML coding.

 

 

1/ Is there any good documentation available on how to create conditions within the XML file?

  

 

(Cisco NSO Expert) Sure, XPATH: https://www.w3.org/TR/xpath/

   

 

2/ Is it possible to use the variable “name” within the XML file? Here I’m talking about the variable “name” which is defined within the .yang file for a service.

   

 

(Cisco NSO Expert) Do you have an example of what you want to do?

   

 

3/ Is it possible to use the variable “device” within the .XML or .yang file to point towards a device?

   

 

(Cisco NSO Expert) Do you have an example of what you want to do?

khgrant
Cisco Employee

a good starting point is the getting started guide. It will show you how to do a small template based service.

 

Then as a second step take a look at the examples in the examples.ncs folder. For example the service-provider/mpls-vpn example, its more advanced and is a good example of a java-and-template service.

 

khgrant
Cisco Employee

Thanks for your help.

Well, to be more specific, the question is, when we create a new service within the GUI, it asks to fill in the “Name” which in the below example is “TEST-0012”.

 

Question is, can we re-use that variable within the XML?

Something as in t he example below, where we use the variable device, but directly from the real/physical device name? Will that work?

 

 

View solution in original post

Content for Community-Ad