community.general.nso_verify (0.1.1) — module

Verifies Cisco NSO configuration.

Authors: Claes Nästén (@cnasten)

preview | supported by certified

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module provides support for verifying Cisco NSO configuration is in compliance with specified values.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Verify interface is up
  nso_config:
    url: http://localhost:8080/jsonrpc
    username: username
    password: password
    data:
      ncs:devices:
        device:
        - name: ce0
          live-status:
            interfaces:
              interface:
                - name: GigabitEthernet0/12
                - state: Up

Inputs

    
url:
    description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc
    required: true
    type: str

data:
    description: 'NSO data in format as C(| display json) converted to YAML. List entries
      can be annotated with a C(__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.

      '
    required: true

timeout:
    default: 300
    description: JSON-RPC request timeout in seconds
    type: int

password:
    description: NSO password
    required: true
    type: str

username:
    description: NSO username
    required: true
    type: str

validate_certs:
    default: false
    description: When set to true, validates the SSL certificate of NSO when using SSL
    required: false
    type: bool

Outputs

violations:
  contains:
    expected-value:
      description: Expected value of path
      returned: always
      type: str
    path:
      description: Path to the value in violation
      returned: always
      type: str
    value:
      description: Current value of path
      returned: always
      type: str
  description: List of value violations
  returned: failed
  sample:
  - expected-value: CE0 example
    path: /ncs:devices/device{ce0}/description
    value: null
  type: complex