salt.proxy.napalm

NAPALM: Network Automation and Programmability Abstraction Layer with Multivendor support

Proxy minion for managing network devices via NAPALM library.

codeauthor:Mircea Ulinic <mircea@cloudflare.com> & Jerome Fleury <jf@cloudflare.com>
maturity:new
depends:napalm
platform:unix

Dependencies

The napalm proxy module requires NAPALM library to be installed: pip install napalm Please check Installation for complete details.

Pillar

The napalm proxy configuration requires four mandatory parameters in order to connect to the network device:

  • driver: specifies the network device operating system. For a complete list of the supported operating systems please refer to the NAPALM Read the Docs page.
  • host: hostname
  • username: username to be used when connecting to the device
  • passwd: the password needed to establish the connection
  • optional_args: dictionary with the optional arguments. Check the complete list of supported optional arguments

Example:

proxy:
    proxytype: napalm
    driver: junos
    host: core05.nrt02
    username: my_username
    passwd: my_password
    optional_args:
        port: 12201
        config_format: set

New in version 2016.11.0.

salt.proxy.napalm.call(method, **params)

Calls a specific method from the network driver instance. Please check the readthedocs page for the updated list of getters.

Parameters:
  • method – specifies the name of the method to be called
  • params – contains the mapping between the name and the values of the parameters needed to call the method
Returns:

A dictionary with three keys:

  • result (True/False): if the operation succeeded
  • out (object): returns the object as-is from the call
  • comment (string): provides more details in case the call failed
  • traceback (string): complete traceback in case of exeception. Please submit an issue including this traceback

on the correct driver repo and make sure to read the FAQ_

Example:

__proxy__['napalm.call']('cli'
                         **{
                            'commands': [
                                'show version',
                                'show chassis fan'
                            ]
                         })
salt.proxy.napalm.fns()

Method called by NAPALM grains module.

salt.proxy.napalm.grains()

Retrieve facts from the network device.

salt.proxy.napalm.grains_refresh()

Refresh the grains.

salt.proxy.napalm.init(opts)

Opens the connection with the network device.

salt.proxy.napalm.initialized()

Connection finished initializing?

salt.proxy.napalm.ping()

Connection open successfully?

salt.proxy.napalm.shutdown(opts)

Closes connection with the device.

Docs for previous releases are available on readthedocs.org.

Latest Salt release: 2016.11.1

Table Of Contents

Previous topic

salt.proxy.marathon module

Next topic

salt.proxy.nxos module