nso_config – Manage Cisco NSO configuration and service synchronization

New in version 2.5.

Synopsis

  • This module provides support for managing configuration in Cisco NSO and can also ensure services are in sync.

Requirements

The below requirements are needed on the host that executes this module.

  • Cisco NSO version 3.4.12 or higher, 4.2.7 or higher, 4.3.8 or higher, 4.4.3 or higher, 4.5 or higher.

Parameters

Parameter Choices/Defaults Comments
data
- / required
NSO data in format as | display json converted to YAML. List entries can be annotated with a __state entry. Set to in-sync/deep-in-sync for services to verify service is in sync with the network. Set to absent in list entries to ensure they are deleted if they exist in NSO.
password
string / required
NSO password
timeout
integer
added in 2.6
Default:
300
JSON-RPC request timeout in seconds
url
string / required
NSO JSON-RPC URL, http://localhost:8080/jsonrpc
username
string / required
NSO username
validate_certs
boolean
    Choices:
  • no ←
  • yes
When set to true, validates the SSL certificate of NSO when using SSL

Examples

- name: Create L3VPN
  nso_config:
    url: http://localhost:8080/jsonrpc
    username: username
    password: password
    data:
      l3vpn:vpn:
        l3vpn:
        - name: company
          route-distinguisher: 999
          endpoint:
          - id: branch-office1
            ce-device: ce6
            ce-interface: GigabitEthernet0/12
            ip-network: 10.10.1.0/24
            bandwidth: 12000000
            as-number: 65101
          - id: branch-office2
            ce-device: ce1
            ce-interface: GigabitEthernet0/11
            ip-network: 10.7.7.0/24
            bandwidth: 6000000
            as-number: 65102
          - id: branch-office3
            __state: absent
        __state: in-sync

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changes
complex
always
List of changes

Sample:
[{'path': '/l3vpn:vpn/l3vpn{example}/endpoint{office}/bandwidth', 'from': '6000000', 'to': '12000000', 'type': 'set'}]
 
from
string
When previous value is present on value change
Previous value if any, else null

 
path
string
always
Path to value changed

 
to
-
When new value is present on value change
Current value if any, else null.

 
type
-
Type of change. create|delete|set|re-deploy

diffs
complex
always
List of sync changes

Sample:
[{'path': '/l3vpn:vpn/l3vpn{example}', 'diff': ' devices {\n device pe3 {\n config {\n alu:service {\n vprn 65101 {\n bgp {\n group example-ce6 {\n- peer-as 65102;\n+ peer-as 65101;\n }\n }\n }\n }\n }\n }\n }\n'}]
 
diff
string
always
configuration difference triggered the re-deploy

 
path
string
always
keypath to service changed



Status

Authors

  • Claes Nästén (@cnasten)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.