nso_config - Manage Cisco NSO configuration and service synchronization.

New in version 2.5.

Synopsis

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
required
NSO password
timeout
(added in 2.6)
Default:
300
JSON-RPC request timeout in seconds
url
required
NSO JSON-RPC URL, http://localhost:8080/jsonrpc
username
required
NSO username

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', 'type': 'set', 'to': '12000000', 'from': '6000000'}]
  path
string
always
Path to value changed

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

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

  from
string
When previous value is present on value change
Previous value if any, else null

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'}]
  path
string
always
keypath to service changed

  diff
string
always
configuration difference triggered the re-deploy



Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as certified which means that it is maintained by an Ansible Partner. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by an Ansible Partner, see here.

Author

  • Claes Nästén (@cnasten)

Hint

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