This is the codebase for the NSO Explorer Visual Studio Code extension.
Pre-requisites
Ensure the following are installed
JDK 11 is installed
Python is installed
Supported functionalities
NSO explorer allows the user to connect to running instance of NSO and navigate the CDB.
set filter to view selected top branches or data types(operational, config...).
input Action parameters and excute the Action .
update CDB data on the explorer treeView or through load merge webView.
Please see detailed information below for supported functionality.
NSO Explorer
NSO Explorer allows user to connect to and inspect & update the live NSO instance from within VSCode.
In the activity bar on left hand side, click on the NSO Icon
This will open the NSO Explorer
If no NSO instance has been configured, welcome screen will be displayed and user will be provided an option to "Add NSO Instance"
Upon clicking "Add NSO Instance", Settings editor will be displayed, and link will appear prompting user to edit settings.json file to add NSO instance
Click link to edit settings.json and add the following information
If settings have been configured correctly, NSO explorer will attempt to connect to running NSO instance and if successful, will display NSO Configuration
Using the explorer, user can drill down and inspect the CDB tree
Several element context menu are available:
Clicking on the "i" icon will display information about the selected element. User will be able to copy Xpath and KeyPath from the popup box.
"XML" icon will retrieve the XML configuration for the selected node and copy the XML Configuration to clipboard
If data has changed in NSO, refresh button at top of explorer pane can be used to fetch data again from NSO
Action feature:
welcome screen will be displayed for an empty Action View,and user will be provided options to create Action Parameter view.
click "invoke action" icon for Action type element to bring up Action parameter treeView to fill in parameters.
click "Json Payload" icon in Action parameter treeView to show json payload and run the Action.
click "New Action" icon to create Action parameter treeView from Action keypath.
click "QName filter" icon and select the interested top branches to view in the NSO-explorer.
click "View Mode" icon to filter the data by operational or config option.
click "xPath" icon to input xpath string and explorer will highlight the last valid node in the xpath string.
click "+" icon of the node to input value and update data element.
for container type, it will add new element defined in Yang model.
for new leaf element, it will create value for the element
for existing leaf element, it will update the value
for list type, it will create new list-entry and show all the other elements for input
for leaf-ref type , enumeration type or boolean type, it will show dropdown list for user to pick
for choice type, it will let user pick choice.
for leaf-list, it will create new leaf list entry
click "delete value" icon to delete the element.
click "NSO Transaction" icon to show "Transaction Data Changes" page that displays all the data changes in the transaction.
user can commit or revert the changes in "Transaction Data Changes" page
click the "load data" icon to bring up "load merge" page where user can input xml data for load merge.