{"id":19871860,"url":"https://github.com/saltstack-formulas/napalm-install-formula","last_synced_at":"2025-05-02T09:30:44.251Z","repository":{"id":16373705,"uuid":"79331894","full_name":"saltstack-formulas/napalm-install-formula","owner":"saltstack-formulas","description":"Salt formula to install the necessary packages and system dependencies for NAPALM (http://napalm.readthedocs.org/en/latest/base.html)","archived":false,"fork":false,"pushed_at":"2022-05-21T17:02:55.000Z","size":18,"stargazers_count":5,"open_issues_count":3,"forks_count":9,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-04-07T00:41:22.958Z","etag":null,"topics":["automation","formula","napalm","network","network-programming","salt"],"latest_commit_sha":null,"homepage":"http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saltstack-formulas.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-18T11:02:51.000Z","updated_at":"2021-10-18T08:26:18.000Z","dependencies_parsed_at":"2022-08-27T04:10:53.171Z","dependency_job_id":null,"html_url":"https://github.com/saltstack-formulas/napalm-install-formula","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fnapalm-install-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fnapalm-install-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fnapalm-install-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saltstack-formulas%2Fnapalm-install-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saltstack-formulas","download_url":"https://codeload.github.com/saltstack-formulas/napalm-install-formula/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252015724,"owners_count":21680817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","formula","napalm","network","network-programming","salt"],"created_at":"2024-11-12T16:13:49.532Z","updated_at":"2025-05-02T09:30:44.002Z","avatar_url":"https://github.com/saltstack-formulas.png","language":"SaltStack","funding_links":[],"categories":["Pre-written Salt States (Formulas)"],"sub_categories":["NETCONF"],"readme":"======================\nnapalm-install-formula\n======================\n\nAlthough the installation of NAPALM is very easy, some underlying Python libraries have certain dependencies on various operating systems.\nThis SaltStack formula provides the necessary state to install the required packages.\n\n.. note::\n\n    See the full `Salt Formulas installation and usage instructions\n    \u003chttp://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html\u003e`_.\n\n\nAvailable states\n================\n\n.. contents::\n    :local:\n\n``napalm_install``\n------------------\n\nInstall the NAPALM and additional community drivers, together with their system\nrequirements.\n\nPillar\n======\n\n.. note::\n\n    Beginning with release 2.0.0, NAPALM has been reunified into a single \n    monolithic package, and therefore the structure used by this formula has \n    been therefore changed. The previous structure can be still found under the\n    `1.0.0 \n    \u003chttps://github.com/saltstack-formulas/napalm-install-formula/tree/1.0.0\u003e`_\n    tag, however this is not recommended usage as the individual drivers are no\n    longer maintained.\n\nFields:\n\n- ``version``: The NAPALM version to install.\n- ``upgrade``: Boolean value, defaults to ``False`` -- whether should upgrade \n  NAPALM (and the additional drivers, unless a specific version is requested).\n- ``additional_drivers``: A list of NAPALM community drivers to install in \n  addition to the core library. Check out \n  https://github.com/napalm-automation-community/ for the list of available \n  community drivers. Do note however that the community drivers are not \n  maintained by the NAPALM core developers, and they may not be available on \n  the public Python Package Index (PyPI). See \n  https://napalm.readthedocs.io/en/latest/contributing/drivers.html for more \n  details.\n\n  For each of the listed drivers, you can pin to a specific desired version to \n  install. See an example below.\n\n\nExample Pillar\n==============\n\n.. code:: yaml\n\n  napalm:\n    version: 2.4.0\n    additional_drivers:\n      - napalm-ros\n      - napalm-panos==0.5.1\n\nSee `pillar.example \n\u003chttps://github.com/saltstack-formulas/napalm-install-formula/blob/master/pillar.example\u003e`__.\n\nUsage\n=====\n\n.. note::\n\n    As NAPALM is mostly used when working with Proxy Minions,\n    it is good to keep in mind this distinction: Proxy Minions\n    manage the network gear, while regular minion(s) manage the\n    server(s) where the Proxy minions run.\n    Hence, this formula is designed to be executed on the\n    regular Minion, in order to prepare the environment for the Proxies.\n\n.. hint::\n\n    While the above is generally true, beginning with Salt release 2019.2.0, \n    once you have NAPALM installed on a regular Minion, you can execute the \n    regular NAPALM functions using ``salt-call`` against one device at a time, \n    e.g., \n\n    .. code-block:: bash\n\n      $ salt-call net.lldp driver=junos host=cr1.thn.lon username=test password=test1234\n\n    To avoid passing the above for every command, you can specific these \n    details in the Minion configuration file (typically ``/etc/salt/minion``),\n    e.g.,\n\n    .. code-block:: yaml\n\n      napalm:\n        driver: junos\n        username: test\n        password: test1234\n        optional_args:\n          key_file: /path/to/ssh/key\n          ssh_config_file: /path/to/ssh/config\n\nTo install, execute:\n\n.. code-block:: bash\n\n  $ sudo salt-call state.sls napalm_install\n\nFrom the master, targeting the server(s) where we need to install NAPALM:\n\n.. code-block:: bash\n\n  $ sudo salt 'server-for-napalm' state.sls napalm_install\n\nUsage Example\n=============\n\n.. code-block:: bash\n\n  $ sudo salt-call state.apply napalm_install\n  local:\n  ----------\n            ID: Install system packges\n      Function: pkg.installed\n        Result: True\n       Comment: 3 targeted packages were installed/updated.\n                The following packages were already installed: python-pip, libssl-dev, python-dev\n       Started: 08:45:58.781798\n      Duration: 13944.873 ms\n       Changes:\n                ----------\n                libffi-dev:\n                    ----------\n                    new:\n                        3.2.1-8\n                    old:\n                libxslt1-dev:\n                    ----------\n                    new:\n                        1.1.29-5ubuntu0.1\n                    old:\n                python-cffi:\n                    ----------\n                    new:\n                        1.11.5-1\n                    old:\n                python-ply:\n                    ----------\n                    new:\n                        3.11-1\n                    old:\n                python-pycparser:\n                    ----------\n                    new:\n                        2.18-2\n                    old:\n  ----------\n            ID: Install NAPALM\n      Function: pip.installed\n          Name: napalm==2.4.0\n        Result: True\n       Comment: All packages were successfully installed\n       Started: 08:46:13.764355\n      Duration: 23864.833 ms\n       Changes:\n                ----------\n                napalm==2.4.0:\n                    Installed\n  ----------\n            ID: Install additional drivers\n      Function: pip.installed\n        Result: True\n       Comment: All packages were successfully installed\n       Started: 08:46:37.629497\n      Duration: 15499.615 ms\n       Changes:\n                ----------\n                napalm-panos==0.5.1:\n                    Installed\n                napalm-ros==0.4.1:\n                    Installed\n  \n  Summary for local\n  ------------\n  Succeeded: 3 (changed=3)\n  Failed:    0\n  ------------\n  Total states run:     3\n  Total run time:  53.309 s\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fnapalm-install-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaltstack-formulas%2Fnapalm-install-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaltstack-formulas%2Fnapalm-install-formula/lists"}