Showing results for 
Search instead for 
Did you mean: 
Cisco Employee

NSO package creation - naming convention


Hello experts,



my client is looking for best practices for package naming in NSO, in this case custom service creation.


Although default NEDs and other packages contain hyphens – (e.g. cisco-ios, cisco-iosxr), we’re getting the following message once we create a service skeleton with a package name containing it:



cisco@vbranch:~$ ncs-make-package --service-skeleton template pkg-test


WARNING 'pkg-test' the package name contains odd


chars, this means that Java variables may be mangled


and that can lead to varying degrees of badness



Should we use camel case to comply with Java classes naming convention, follow Java package naming convention by using all lowercase or we can simply use hyphens and disregard this message?



I would appreciate if you can provide me with some documentation outlining package naming convention in NSO and/or your experience with this process.



Thanks, Đokić

Cisco Employee


Hi Omer;



My understanding on the warning is:


          The usage of “_” and “–“ can cause some unexpected behaviours in the java code, if we are not careful. 


          It can be a problem, but only at a syntax level.


The “_” usage in a like statement is interpreted like a character wild card.



Best Regards


Paulo Oliveira


Cisco Employee


Thanks Paulo.



Our confusion came from the fact that existing tail-f packages use hyphens, so one would argue that our development of the packages (Cisco certified) sits on edge of what could lead to some unexpected behavior in the java code but could be prevented by omitting it in the name.



I looked at some internal engineering pages where developers use hyphens for custom services and this warning is also present in the output, but there’s no word about it; they just disregard it and continue with service creation examples. On the other hand, I found some SR where hyphen led to issue with the deployment of the service and also received a feedback from one of our SE colleagues from US reporting issues with it and Python interpreter, which led him to rewrite everything eventually.



I did suggest my client to leave it out for now - we’re in POC anyways, but they would like to have some consistency for future development, that’s why I asked this question in the first place. It would be good to have some official statement for it somewhere in the documentation (where we currently specify ‘package-name’ as a valid example), but I guess we’ll have to stick with warning received from the NSO which turned out to be true in some cases and leave it out for now.





This widget could not be displayed.