Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>NSO Developer Studio - ExplorerNew to Visual Studio Code? Get it now.
NSO Developer Studio - Explorer

NSO Developer Studio - Explorer

Cisco Crosswork NSO

|
2,368 installs
| (1) | Free
Cisco Crosswork NSO Explorer
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NSO Explorer

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
      "NSO.Instance": [
        {
          "name" : "string name",
          "host": "<hostname/ip>",
          "port": "<port>",
          "scheme": "http|https",  
          "username": "<username>",
          "password": "<password>"
        }
      ]
      
    • Save the settings.json file
  • 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
  • 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.

Action

The Action feature allows users to create, manage, and execute actions within the system. This involves defining action parameters, viewing and editing JSON payloads, and invoking actions through a guided interface. Users can easily interact with action elements, configure parameters, and execute actions in an organized and structured manner.

  • When you first open the Action View and it is empty, a Welcome Screen will be displayed. This screen introduces the feature and provides options for the user to create an Action Parameter View.
  • To start working with an action, click on the Invoke Action icon. This icon is typically found next to an Action Type element in the interface.
  • Clicking the Invoke Action icon brings up an Action Parameter TreeView, where you can fill in the necessary parameters for the action. The Action Parameter TreeView is a structured interface that helps users define the required parameters for the action, ensuring that all the necessary data is entered before the action can be invoked.
  • After defining the parameters in the Action Parameter TreeView, click on the JSON Payload icon. This icon allows users to view the JSON representation of the parameters they have entered.
  • The JSON Payload provides a clear overview of how the action parameters are structured in JSON format, making it easier to verify the data before running the action. You can review and confirm the payload, ensuring the action is configured correctly before proceeding.
  • After viewing the JSON payload, you can Run the Action to execute the action with the defined parameters.
  • If you need to define a new action from scratch, click on the New Action icon. This will create a new Action Parameter TreeView based on the Action Keypath.
  • The Action Keypath is used to specify the exact path or context for the action within the system. Once the new Action Parameter TreeView is created, you can define the necessary parameters as described above and proceed with executing the action.

QName Filter

The QName Filter feature allows users to narrow down their view in the NSO Explorer by selecting specific top-level branches they are interested in. This provides a focused way to explore large data sets or complex structures by filtering out unneeded sections, making navigation more efficient.

  • Once you click the QName Filter icon, a menu or dialog box will appear displaying a list of the top-level branches (Qualified Names) available in the current NSO data structure.
  • From the list, you can select the top-level branches (also known as QName branches) that you are interested in viewing. These branches represent the major sections of the NSO configuration or operational data. You can select one or multiple branches, depending on the specific data you want to explore.
  • After selecting the desired branches, apply the filter. The NSO Explorer will then display only the data from the selected branches, hiding any unselected sections. This allows users to focus on specific parts of the system without being overwhelmed by irrelevant data.

View Mode Filter

The View Mode feature allows users to filter and customize the data view by applying specific filters like Config Data Only, Hide Action, or Hide Operational Data. This helps users focus on the data that’s most relevant to their tasks, making data management more efficient.

  • Start by clicking the View Mode icon, which is located in the toolbar or side panel of the application.
  • After clicking the View Mode icon, a menu will appear with the following filter options:
    • Config Data Only: When this option is selected, the system will display only configuration data, filtering out all operational data and actions. Configuration data shows how the system is set up and intended to operate.
    • Hide Action: This filter option hides all action-based data or operations. It is useful when you want to see the configuration or operational data without any distracting actions or commands that have been executed in the system.
    • Hide Operational Data: Selecting this option filters out all operational data, focusing solely on configuration and action data. Operational data represents real-time or dynamic data that reflects the system’s current state.
  • Once an option is selected, the system will filter the data accordingly, hiding or showing the specific types of data based on the selected filter. This helps users concentrate on the specific aspect of the system they are working with, such as configuration settings, action logs, or operational status.

XPath Explorer

This feature allows users to input an XPath string and visually navigate through the document structure. As you type or paste the XPath expression, the system highlights the last valid node in the structure, providing real-time feedback for XPath evaluation.

  • Start by clicking the XPath icon, which is located in the toolbar of the application. This icon is clearly labeled XPath, making it easy to locate.
  • After clicking the icon, an input field will appear, where you can enter your XPath string. This input field is designed for you to type or paste an XPath expression that targets nodes within the XML or data structure.
  • Enter your desired XPath string in the provided input area. The system actively evaluates the expression as you type. Each segment of the XPath is parsed in real-time, ensuring immediate feedback on the validity of your query.
  • As you type, the explorer will automatically highlight the last valid node in the XPath string within the document. This is particularly useful for long or complex XPath queries, as it provides visual confirmation of how the expression is navigating through the data.
  • If part of the XPath is invalid, the system will still highlight the last portion that is valid, helping users correct their query easily.
  • Users can refine their XPath string based on the highlighted nodes. The real-time highlighting helps to visually map out the XPath path, making it easier to build or debug complex XPath expressions.

NSO Transaction Management

This feature allows users to manage and track all data changes within a transaction through the Transaction Data Changes page. Users can either commit the changes or revert them as needed.

  • Start by clicking on the NSO Transaction icon, typically found in the toolbar.
  • Once clicked, the system will display the Transaction Data Changes page. This page provides a clear overview of all the data modifications that occurred within the current transaction. Each change is listed in detail, allowing users to review before taking any further action.
  • On the Transaction Data Changes page, you’ll find a table or list that shows all the changes made during the transaction. The data changes could include updates, deletions, or additions, and each change is displayed in an easy-to-understand format for user review.
  • After reviewing the changes, you have two options:
    • Commit the Changes: By clicking the Commit button, all the changes listed on the page will be finalized and saved in the system.
    • Revert the Changes: Alternatively, if the changes are not as expected, you can click the Revert button to discard all the modifications made during the transaction, effectively restoring the system to its previous state.

Load Data

The "Load Merge" page is a crucial part of the data integration process, enabling users to load, preview, and merge XML-based data into the existing structure. It supports workflows that require manual data input or updates via XML.

This feature improves flexibility by allowing users to handle complex data merging tasks directly through the extension UI, reducing the need for manual file manipulations.

  • Begin by clicking the Load Data icon, typically located in the toolbar or side panel of the application. This icon is clearly labeled "Load Data" for easy access.
  • After clicking the icon, the system will navigate to the Load Merge page. This page provides two options for entering your XML data: manual input or file upload.
  • On the Load Merge page, there is a text area where you can either type or paste your XML data. The text area is clearly labeled, providing plenty of space to ensure your XML data is accurate.
  • Alternatively, if you have an XML file saved on your computer, you can upload it directly. There’s an Upload button available on the page. Click this button, navigate to the file on your computer, and select it for upload. The system will then display the contents of the file in the input area for your review before merging.
  • After entering the XML data (either manually or via file upload), click the Submit or Commit button to finalize the process. The system will then process and merge the data into its existing structure, ensuring that any new updates are applied seamlessly.

Detailed userguide info for NSO Plugins

  • URL: https://developer.cisco.com/docs/nso/guides/#!nso-developer-studio/nso-developer-studio

Contribute

If you feel certain code snippets would be helpful or would like to help contribute to enhance the Extension, please get in touch: nsovscode@cisco.com

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft