I have not found any good guide how to implement CPE full configuration in NSO. Most of examples are of one service, that is small part of the device configuration. I could do a single monster size cpe_service but that would grow unmanageable pretty quickly.
I could split configuration into pieces, but where do i say what config sections are necessary for specific product+technical_schema inside service? Examples what i've seen is to use commit script to choose template inside python/java code. Right now i have 45 product+technical_schema components. When I add different supported CPE models then i have 138 combinations. Doing it with if-then statements inside commit code sucks, it should use templates somehow.
If completely ignore what is possible in NSO i would like to segment it like:
1) Every config sections would have its own template and provisioning code attached to it. There is always some need to calculate something, for example interface ip addresses in NSO:
Inside template XML can I callback a custom function, to get interface "ip address + mask" in desired format?
2) I would need to describe what config sections are to be used for a specific product+technical_schema. As there are many combinations i would like to describe combinations outside of "cpe service yang".
3) In "cpe service" i would keep only parameters and their structure. I'm not quite sure, but i think i need to have parameters with tags "admin, customers". For example helpdesk and customer should be able to change LAN interface but not WAN. How to implement this?
During "cpe service" commit it should lookup its sections and pass "cpe service" parameters to config sections for xml template search&replace.
Our current CPE generator was written by me in 2010. It was my very first programming project that was used by some other people that me, until that time i've made only personal usage scripts. Most of config sections are reusable. With last new cisco_cpe configuration i had to do 6 new config sections and reused 11 old ones. I'm looking for ways of doing similar segmentation in NSO.
1) All services (teenus) and connection_type (yhendus) are described in single XML file. Webpage menus are auto generated from it. I have 138 different combination of service, connection_type, cpe_model.
2) In the same file inside "<router>" tag are configuration pieces used for that service+connection+cpe_model. A CPE full configuration is put together from common (cat=all) and device(cat=892F) specific configuration pieces. Single "tykk" is xpath query in file "<conf cat="cisco_ios.xml">" where actual config is located.
3) Single piece of config is from vendor specific XML file. Previously described xpath query is automatically appended by parent tag to add router info to query "/config/pieces/vty/router[@cat='all']". Variables are automatically read from config pieces and shown on webpage for filling.
access-list 23 remark Telnet ACL
access-list 23 permit %BGP_NEIG1%
access-list 23 permit x.x.x.x 0.0.0.31
access-list 23 permit y.y.y.y 0.0.0.255
access-list 23 deny any
line con 0
line vty 0 4
access-class 23 in vrf-also
transport input telnet ssh
4) Every variable has definition on top of vendor specific xml file. If it has "autovar/mysql" defined it tries to look up its content from database. If it has "kontr/fnkts" then user/database input should be ran through that function (ipaddr) with paramter (ip) for correct format/result.
<desc>BGP naaber wan interfacel, elioni keskne jaama ruuter</desc>
In order to ease the use of the CSP 2100 APIs, I've created a new repo which is containing the Postman collection.
Have a look at it: https://github.com/jgarnier/csp_2100_postman, there is details on importing the collection, creating the ...
It is very rare to be building a brand-new network from scratch. A much more common scenario is to introduce automation into a pre-existing network, which is already delivering services to customers. With NSO having been deployed in more than 200 customer...
Developer Days 2020 is over. With 1,998 registered attendees it was a huge success! We now have more than 20 hours of on-demand content from our fantastic speakers on YouTube. Soon, you will be able to find this material along with previous Developer Days...
In the NSO universe there a number of heroes and just a few villains. The clear uber-hero is FastMap, the one algorithm to diff them all. Other demi-heroes include Yang, Nanoservices, and Netsim. Most villains are vanquished quic...