cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
377
Views
10
Helpful
12
Replies
Cisco Employee

[NSO] adding new service - how to request multiple variable

Hi Expert, 

I created a template. when I create a service on that template, it only asked for 1 variable (CUSTOMER_NAME).

the other variable was not asked.

 

when I go to Commit section, it shows the other variable as "Not configured". so I have to click commit multiple time in order to fill all the variable.

nso.png

 

question is: how I can modify the yang file so that when I create the service, it will request all the variable?

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

It looked to me as a UI thingy more than a YANG thingy as your model looks quite straightforward.

I don't use the UI too often, so I had to try and load your model and check for myself.

 

(don't ask me why, but) Seems as by default, most of the leafs you defined in your model are hidden in the UI.

 

Once you selected the service manager, selected your service point, created a new entry and clicked it, you need to click 'view options' at the top-right corner.

 

Screen Shot 2019-08-01 at 9.03.36.png

 

You should move it from 'configuration only' to 'full model'.

Once you do that, you should see your entire model.

 

Screen Shot 2019-08-01 at 9.06.51.png

 

For the question why it doesn't show by default, I must say I don't know. Those leafs are definitely configuration, so they should show even when configuration only is selected.

 

Generally speaking, if you try things through the UI and something is not working as you expect, I suggest checking the same through the CLI. In most cases, this will tell you if there's an issue with your model, or you're facing some sort of UI issue.

 

 

12 REPLIES 12
Beginner

Re: [NSO] adding new service - how to request multiple variable

afajri,

 

Did you define the other inputs in your yang model, if so can you post a copy of it?  This will allow us to see what you have defined in your model and can possibly tell why you are having an issue. Also can you add in the template that you created so we can see that it looks correct. 

 

thank you

Beginner

Re: [NSO] adding new service - how to request multiple variable

If you want to really make sure that NSO will demand the values from you during provisioning  you can define your input leafs as:

leaf myLeaf {
     type uint32;
    mandatory true;
}
 
However, yes, like lightfep1 said... it all depends on what you did in the model and even what version of NSO you are using (webgui works in mysterious ways in some versions).
Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

Hi All,

thanks for your response.

we are using NSO 5.1.20190528.1

 

we also already had the leaf set as mandatory in the yang file.

I attach both yang and xml file.

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

xml file

Highlighted
Beginner

Re: [NSO] adding new service - how to request multiple variable

This might be a silly question, but did you remember to do a "make" in your src directory?  When I was new to this, I would often forget to do that and then wonder why my YANG changes were not working.

 

-Allen

 

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

@allenc - yes I did

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

It looked to me as a UI thingy more than a YANG thingy as your model looks quite straightforward.

I don't use the UI too often, so I had to try and load your model and check for myself.

 

(don't ask me why, but) Seems as by default, most of the leafs you defined in your model are hidden in the UI.

 

Once you selected the service manager, selected your service point, created a new entry and clicked it, you need to click 'view options' at the top-right corner.

 

Screen Shot 2019-08-01 at 9.03.36.png

 

You should move it from 'configuration only' to 'full model'.

Once you do that, you should see your entire model.

 

Screen Shot 2019-08-01 at 9.06.51.png

 

For the question why it doesn't show by default, I must say I don't know. Those leafs are definitely configuration, so they should show even when configuration only is selected.

 

Generally speaking, if you try things through the UI and something is not working as you expect, I suggest checking the same through the CLI. In most cases, this will tell you if there's an issue with your model, or you're facing some sort of UI issue.

 

 

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

@yfherzog , thank you for pointing towards the "View Options".
After selecting the "full model", I can see all parameters on same page.
I have another observation here. After this, I can see "Warnings" per parameter. Is this expected?

commit_manager.JPG

Beginner

Re: [NSO] adding new service - how to request multiple variable

Did you fill out all the parameters initially?

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

No. Is it expected to see "Warnings" before feeding for first time?
If that is the case, each time when we'll create the instance of the service for a new set of network elements, we'll be observing the same.
Beginner

Re: [NSO] adding new service - how to request multiple variable

No, if you start from scratch and fill everything you shouldn't get any warnings.

My bet is that you have things set as mandatory, however because you didn't have "full model" displayed you couldn't see and provide all the inputs earlier. When you wanted to create that instance you couldn't provide everything that was mandatory hence these warnings "is not configured" popped up.

Try configuring a fresh instance and warnings shouldn't appear.

 

Safe bet is to try it in the cli like yfherzo said. If that works then you can be 100% sure that the webgui is glitching.

Cisco Employee

Re: [NSO] adding new service - how to request multiple variable

The screenshot you shared seems to me as if it's taken from the commit manager, rather than configuration stage.

I think that once you select the commit manager then NSO will try to validate that all the mandatory parameters were provided, thus you're going to see the warning.

 

If you provide the inputs before moving to that screen, I don't expect you to get the warnings.