umnet-napalm


Nameumnet-napalm JSON
Version 1.2.1 PyPI version JSON
download
home_pageNone
SummaryA custom version of NAPALM for UMnet
upload_time2025-07-22 20:20:23
maintainerNone
docs_urlNone
authorAmy Liebowitz
requires_python<4.0,>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # umnet-napalm
This is a project that augments the [NAPALM](https://napalm.readthedocs.io/en/latest/) library in ways that are relevant to our interests.
More specifically, new [getter functions](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix) have been implemented to pull
data from routers and parse it into a vender agnostic format.

The following platforms all have their own `umnet-napalm` drivers. Most of these inherit from other libraries.
* `ASA` does not inherit - the NAPALM community ASA driver uses the web API which is currently impractical for us.
* `IOS` inherits `napalm.ios.IOSDriver`
* `IOSXRNetconf` inherits `napalm.iosxr_netconf.IOSXRNETCONFDriver`
* `Junos` inherits `napalm.junos.JunOSDriver`
* `NXOS` inherits `napalm.nxos_ssh.NXOSSSHDriver`
* `PANOS` does not inherit - the NAPALM community PANOS driver but it doesn't support connecting via Panorama.

See the `umnet_napalm` [Abstract Base Class](https://github.com/umich-its-networking/umnet-napalm/blob/main/umnet_napalm/abstract_base.py) definition to see what commands are supported across all platforms. For platforms that inherit from core NAPALM drivers, refer to the [getter matrix](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix). For PANOS see [napalm-panos repo](https://github.com/napalm-automation-community/napalm-panos)

## Using umnet-napalm
When you install the code it comes with a cli script called `umnet-napalm-get`. You can use this to run a command against a particular device. Note that umnet-napalm doesn't inherently
know the platform or the credentials to use. You can supply all of these on the cli as arguments, or you can set the credentials as environment variables. Here are the different environment
variables you can set:
```
export NAPALM_PASSWORD=<redacted>
export NAPALM_USERNAME=automaton
export NAPALM_ENABLE=<redacted>

## only if you want to query ngfw devices
export PANORAMA_API_KEY=<redacted>
```
Note you currently can't pass a Panorama API key as a cli argument (because that's just messy) - you must set it in your environment. When querying a Panos device via Panorama you must provide
`--pan-host [panorama hostname]` and  `--pan-serial [serial number of the firewall]`

Here's some quick examples. You can reference `umnet_napalm.models` for expected output format. Output is in json:
```
amylieb@wintermute:~/src/agador$ umnet-napalm-get dl-arbl-1 nxos_ssh get_inventory
[{'name': 'Slot 1',
  'part_number': 'N9K-C93360YC-FX2',
  'serial_number': 'FDO261320CY',
  'type': 'linecard'},
 {'name': 'Fan 1',
  'part_number': 'NXA-FAN-160CFM-PI',
  'serial_number': 'N/A',
  'type': 'fan'},
....
amylieb@wintermute:~/src/agador$ umnet-napalm-get r-seb junos get_lag_interfaces
{'ae0': {'admin_up': True,
         'members': {'et-0/1/0': {'admin_up': False,
                                  'flags': 'AF',
                                  'oper_up': False}},
         'mlag_id': 0,
         'oper_up': False,
         'peer_link': False,
         'protocol': 'LACP'},
 'ae1': {'admin_up': True,
         'members': {'ge-11/1/0': {'admin_up': False,
                                   'flags': 'AF',
                                   'oper_up': False},
                     'ge-11/3/7': {'admin_up': False,
                                   'flags': 'AF',
                                   'oper_up': False}},
         'mlag_id': 0,
         'oper_up': False,
         'peer_link': False,
         'protocol': 'LACP'},**
amylieb@wintermute:~/src/agador$ umnet-napalm-get ngfw-1 panos get_active_routes --pan-host panorama-1 --pan-serial 010701000554
[{'age': 1874469,
  'learned_from': '10.250.0.114',
  'mpls_label': [],
  'nh_interface': None,
  'nh_ip': '10.250.0.114',
  'nh_table': 'default',
  'prefix': '0.0.0.0/0',
  'protocol': 'BGP',
  'vrf': 'default',
  'vxlan_endpoint': None,
  'vxlan_vni': None},
 {'age': 1874469,
  'learned_from': '10.224.191.241',
  'mpls_label': [],
  'nh_interface': 'ethernet2/14.233',
  'nh_ip': '10.224.191.241',
  'nh_table': 'default',
  'prefix': '10.224.14.32/29',
  'protocol': 'OSPF',
  'vrf': 'default',
  'vxlan_endpoint': None,
  'vxlan_vni': None},
....
```



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "umnet-napalm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Amy Liebowitz",
    "author_email": "amylieb@umich.edu",
    "download_url": "https://files.pythonhosted.org/packages/c7/06/aa92ccbb980febe110f0c600b32b2e706d36e104c56561da2c5b532fac8d/umnet_napalm-1.2.1.tar.gz",
    "platform": null,
    "description": "# umnet-napalm\nThis is a project that augments the [NAPALM](https://napalm.readthedocs.io/en/latest/) library in ways that are relevant to our interests.\nMore specifically, new [getter functions](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix) have been implemented to pull\ndata from routers and parse it into a vender agnostic format.\n\nThe following platforms all have their own `umnet-napalm` drivers. Most of these inherit from other libraries.\n* `ASA` does not inherit - the NAPALM community ASA driver uses the web API which is currently impractical for us.\n* `IOS` inherits `napalm.ios.IOSDriver`\n* `IOSXRNetconf` inherits `napalm.iosxr_netconf.IOSXRNETCONFDriver`\n* `Junos` inherits `napalm.junos.JunOSDriver`\n* `NXOS` inherits `napalm.nxos_ssh.NXOSSSHDriver`\n* `PANOS` does not inherit - the NAPALM community PANOS driver but it doesn't support connecting via Panorama.\n\nSee the `umnet_napalm` [Abstract Base Class](https://github.com/umich-its-networking/umnet-napalm/blob/main/umnet_napalm/abstract_base.py) definition to see what commands are supported across all platforms. For platforms that inherit from core NAPALM drivers, refer to the [getter matrix](https://napalm.readthedocs.io/en/latest/support/index.html#getters-support-matrix). For PANOS see [napalm-panos repo](https://github.com/napalm-automation-community/napalm-panos)\n\n## Using umnet-napalm\nWhen you install the code it comes with a cli script called `umnet-napalm-get`. You can use this to run a command against a particular device. Note that umnet-napalm doesn't inherently\nknow the platform or the credentials to use. You can supply all of these on the cli as arguments, or you can set the credentials as environment variables. Here are the different environment\nvariables you can set:\n```\nexport NAPALM_PASSWORD=<redacted>\nexport NAPALM_USERNAME=automaton\nexport NAPALM_ENABLE=<redacted>\n\n## only if you want to query ngfw devices\nexport PANORAMA_API_KEY=<redacted>\n```\nNote you currently can't pass a Panorama API key as a cli argument (because that's just messy) - you must set it in your environment. When querying a Panos device via Panorama you must provide\n`--pan-host [panorama hostname]` and  `--pan-serial [serial number of the firewall]`\n\nHere's some quick examples. You can reference `umnet_napalm.models` for expected output format. Output is in json:\n```\namylieb@wintermute:~/src/agador$ umnet-napalm-get dl-arbl-1 nxos_ssh get_inventory\n[{'name': 'Slot 1',\n  'part_number': 'N9K-C93360YC-FX2',\n  'serial_number': 'FDO261320CY',\n  'type': 'linecard'},\n {'name': 'Fan 1',\n  'part_number': 'NXA-FAN-160CFM-PI',\n  'serial_number': 'N/A',\n  'type': 'fan'},\n....\namylieb@wintermute:~/src/agador$ umnet-napalm-get r-seb junos get_lag_interfaces\n{'ae0': {'admin_up': True,\n         'members': {'et-0/1/0': {'admin_up': False,\n                                  'flags': 'AF',\n                                  'oper_up': False}},\n         'mlag_id': 0,\n         'oper_up': False,\n         'peer_link': False,\n         'protocol': 'LACP'},\n 'ae1': {'admin_up': True,\n         'members': {'ge-11/1/0': {'admin_up': False,\n                                   'flags': 'AF',\n                                   'oper_up': False},\n                     'ge-11/3/7': {'admin_up': False,\n                                   'flags': 'AF',\n                                   'oper_up': False}},\n         'mlag_id': 0,\n         'oper_up': False,\n         'peer_link': False,\n         'protocol': 'LACP'},**\namylieb@wintermute:~/src/agador$ umnet-napalm-get ngfw-1 panos get_active_routes --pan-host panorama-1 --pan-serial 010701000554\n[{'age': 1874469,\n  'learned_from': '10.250.0.114',\n  'mpls_label': [],\n  'nh_interface': None,\n  'nh_ip': '10.250.0.114',\n  'nh_table': 'default',\n  'prefix': '0.0.0.0/0',\n  'protocol': 'BGP',\n  'vrf': 'default',\n  'vxlan_endpoint': None,\n  'vxlan_vni': None},\n {'age': 1874469,\n  'learned_from': '10.224.191.241',\n  'mpls_label': [],\n  'nh_interface': 'ethernet2/14.233',\n  'nh_ip': '10.224.191.241',\n  'nh_table': 'default',\n  'prefix': '10.224.14.32/29',\n  'protocol': 'OSPF',\n  'vrf': 'default',\n  'vxlan_endpoint': None,\n  'vxlan_vni': None},\n....\n```\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A custom version of NAPALM for UMnet",
    "version": "1.2.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5cba22214278e8fbcc1b0836acc718bbf9a87f3663a1d5a89d47721378cc5b72",
                "md5": "3034b66e8368615f9f3e35fe13dc54c3",
                "sha256": "a9556b6a4c9c258e1cd331d3bea60ad23b4f5a9c96dc621e05e28ba73bfdfbff"
            },
            "downloads": -1,
            "filename": "umnet_napalm-1.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3034b66e8368615f9f3e35fe13dc54c3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 67220,
            "upload_time": "2025-07-22T20:20:22",
            "upload_time_iso_8601": "2025-07-22T20:20:22.043367Z",
            "url": "https://files.pythonhosted.org/packages/5c/ba/22214278e8fbcc1b0836acc718bbf9a87f3663a1d5a89d47721378cc5b72/umnet_napalm-1.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c706aa92ccbb980febe110f0c600b32b2e706d36e104c56561da2c5b532fac8d",
                "md5": "0a44641ede7c70427a89d6361a81bfd5",
                "sha256": "a0be04639a3d4278f6c5fa62a379ee5626eee2fe6326a7b8fbd7488f7cb33314"
            },
            "downloads": -1,
            "filename": "umnet_napalm-1.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0a44641ede7c70427a89d6361a81bfd5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 46987,
            "upload_time": "2025-07-22T20:20:23",
            "upload_time_iso_8601": "2025-07-22T20:20:23.218175Z",
            "url": "https://files.pythonhosted.org/packages/c7/06/aa92ccbb980febe110f0c600b32b2e706d36e104c56561da2c5b532fac8d/umnet_napalm-1.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-22 20:20:23",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "umnet-napalm"
}
        
Elapsed time: 1.48791s