{"id":13585846,"url":"https://github.com/greenpau/ndmtk","last_synced_at":"2025-03-17T08:36:51.385Z","repository":{"id":57445301,"uuid":"78966724","full_name":"greenpau/ndmtk","owner":"greenpau","description":"Network Discovery and Management Toolkit","archived":false,"fork":false,"pushed_at":"2020-10-14T00:41:35.000Z","size":1078,"stargazers_count":58,"open_issues_count":3,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-22T12:33:09.487Z","etag":null,"topics":["ansible-plugins","network-analysis","network-automation","network-configuration","network-discovery","network-engineers","network-management"],"latest_commit_sha":null,"homepage":"http://ndmtk.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greenpau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-14T21:07:54.000Z","updated_at":"2024-01-18T21:14:26.000Z","dependencies_parsed_at":"2022-09-27T10:50:28.684Z","dependency_job_id":null,"html_url":"https://github.com/greenpau/ndmtk","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fndmtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fndmtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fndmtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenpau%2Fndmtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greenpau","download_url":"https://codeload.github.com/greenpau/ndmtk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243709099,"owners_count":20334955,"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":["ansible-plugins","network-analysis","network-automation","network-configuration","network-discovery","network-engineers","network-management"],"created_at":"2024-08-01T15:05:10.738Z","updated_at":"2025-03-17T08:36:51.357Z","avatar_url":"https://github.com/greenpau.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Network Discovery and Management Toolkit\n\n[![GitHub version](https://badge.fury.io/gh/greenpau%2Fndmtk.svg)](https://badge.fury.io/gh/greenpau%2Fndmtk)\n[![CircleCI](https://circleci.com/gh/greenpau/ndmtk.svg?style=svg)](https://circleci.com/gh/greenpau/ndmtk)\n[![PyPI version](https://badge.fury.io/py/ndmtk.png)](https://badge.fury.io/py/ndmtk)\n[![Documentation Status](https://readthedocs.org/projects/ndmtk/badge/?version=latest)](http://ndmtk.readthedocs.io/)\n\nNetwork Discovery and Management Toolkit (`ndmtk`) makes Ansible \"work\" for\nboth Traditional and Software-Defined Network (SDN) network management.\n\n## Table of Contents\n\n1. [Overview](https://github.com/greenpau/ndmtk#overview)\n1. [Workflow Diagram](https://github.com/greenpau/ndmtk#workflow-diagram)\n1. [Getting Started](https://github.com/greenpau/ndmtk#getting-started)\n1. [Documentation](https://github.com/greenpau/ndmtk#documentation)\n1. [Questions](https://github.com/greenpau/ndmtk#questions)\n1. [Contribution](https://github.com/greenpau/ndmtk#contribution)\n\n## Overview\n\nThe future of network management lies in the area of Artificial Intelligence.\nAny network-enabled device will be able to build connectivity to a remote peer\non-demand, without human intervention. The restraint on that ability are the\nAI-enabled systems acting as gatekeepers. AI is impossible without ongoing\ndata collection, data analysis, probing, and modeling. As such, networks\nof the future need tools to perform the above tasks.\n\nThis toolkit is designed to accomplish the data collection piece of the AI\npuzzle. Specifically, the toolkit is designed to:\n\n- discover data on network devices and capture the entirety of available data\n- configure network devices via SSH, telnet, console, or terminal server\n- collect, analyze, and store the data via command-line interactions;\n  it performs data analysisn and, if necessary, it performs additional data\n  collection and/or device configuration tasks.\n\nThe intended audience of this toolkit are system and network engineers and\ndesigners, as well as the researchers dealing with AI.\n\nThe toolkit is delivered in a form of an Ansible plugin. However, it\ncould work well with Chef, or any other orchestration tool. The reason\nAnsible became a framework of choice is its modularity. The toolkit itself\nis modular. It allows extended existing functionality. For example, the\nplugin does not blindly run pre-defined commands. Rather, it first collects\nall of the commands forming the understanding of the function of a particular\ndevice in a network. Once the plugin receives the data, it runs it through its\nalgorithms and determines whether there are any additional command required\nto further gather data. That process continues until the algorithms determine\nthat the collection is complete.\n\nImportantly, once the plugin completes its tasks it produces a number of reports\nin JSON, YAML, and JUnit formats. These reports provide a map of what was done,\nwhere the collected data reside, and what that data is.\n\nThe plugin has no required arguments and parameters, because there are\na number of default commands available for various operating systems,\ne.g. Cisco Nexus OS, Arista EOS, Linux, etc.\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n\n## Workflow Diagram\n\n\n[![Plugin Workflow](https://raw.githubusercontent.com/greenpau/ndmtk/master/docs/_static/images/ndmtk.png \"Network Automation Workflow\")](https://raw.githubusercontent.com/greenpau/ndmtk/master/docs/_static/images/ndmtk.png)\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n\n## Getting Started\n\nFirst, a user installs `ndmtk` with `pip`:\n\n```\npip install ndmtk\n```\n\nSecond, the user creates Ansible playbook, e.g. `playbooks/collect_all.yml`:\n\n```\n---\n- name: generic data collection\n  hosts:\n  - ny-fw01\n  - ny-sw01\n  - ny-sw02\n  gather_facts: no\n  tasks:\n  - name: data collection from three network devices\n    action: ndmtk output=\"/tmp/ndmtk-%Y%m%d%H%M%S\" debug=no no_host_key_check=yes on_error=continue\n```\n\nThe above playbook collect the data from three devices: `ny-fw01`, `ny-sw01`, and\n`ny-sw02`.\n\nThird, the user must create a hosts file:\n\n```\ncontroller ansible_connection=local\n\n[test:children]\ncisco-asa-firewalls\narista-eos-switches\n\n[arista-eos-switches]\nny-sw01 os=arista_eos host_overwrite=localhost host_port=8224\nny-sw02 os=arista_eos host_overwrite=localhost host_port=8225\n\n[cisco-asa-firewalls]\nny-fw01 os=cisco_asa host_overwrite=192.168.1.1\n\n[all:vars]\nansible_connection=local\n```\n\nThe switches are Arista vEOS switches running on top of Virtual Box.\nThe firewall is a physical Cisco ASA 5505.\n\nAdditionally, the user must create Ansible configuration file in either:\n\n- `.ansible.cfg` in the user's home directory, or\n- `ansible.cfg` in the user's current directory\n\nThe configuration file contains the following directives:\n\n```\n[defaults]\ninventory             = ./hosts\nforks                 = 100\nlocal_tmp             = $HOME/.ansible/tmp\nretry_files_enabled   = True\nretry_files_save_path = $HOME/.ansible/retries/\nlog_path              = $HOME/.ansible/log/ansible.log\ntransport             = local\n```\n\nFourth, the user must create Ansible Vault `~/.ansible.vault.yml` and structure\nit according to `ndmtk`'s documentation. Then, for convinience, the user may\nstore the password to the vault in `~/.ansible.vault.key` plain-text file.\n\nFor example `.ansible.vault.key` has a single line for the password:\n\n```\nNX23nKz!\n```\n\nWhile the vault itself has the following content:\n\n```\n--\ncredentials:\n- regex: ny-fw0[1-9]\n  username: admin\n  password: 'NX23nKz!'\n  password_enable: '3nKz!NX2'\n  priority: 1\n  description: NY-FW01 password\n- default: yes\n  username: greenpau\n  password: 'My#DefaultPass'\n  password_enable: 'Enabled#By$Default'\n  priority: 1\n  description: my default password\n```\n\nThe toolkit accesses `ny-fw01` with the first set of credentials because its\nname matches the regular expression in that set. For the witches, the later,\ndefault password is used.\n\n\nAt any point of time, the user could edit or view the vault using the\nfollowing commands:\n\n```\nansible-vault edit ~/.ansible.vault.yml --vault-password ~/.ansible.vault.key\nansible-vault view ~/.ansible.vault.yml --vault-password ~/.ansible.vault.key\n```\n\nFinally, the user runs the playbook:\n\n```\nansible-playbook playbooks/collect_all.yml\n```\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n\n## Documentation\n\nPlease read the toolkit's documentation at [Read the Docs](http://ndmtk.readthedocs.io/)\nand review the [demo](https://github.com/greenpau/ndmtk/tree/master/demo/firewall) directory\ncontaining sample configuration files.\n\n* [User Guide](https://github.com/greenpau/ndmtk/blob/master/docs/userguide.md)\n* [Rules Engine](https://github.com/greenpau/ndmtk/blob/master/docs/rules.md)\n* [Reports and Structured Data](https://github.com/greenpau/ndmtk/blob/master/docs/reports.md)\n* [Access Credentials Management](https://github.com/greenpau/ndmtk/blob/master/docs/auth.md)\n* [Frequently Asked Questions](https://github.com/greenpau/ndmtk/blob/master/docs/faqs.md)\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n\n## Questions\n\nPlease open issues and ask questions in [Github Issues](https://github.com/greenpau/ndmtk/issues).\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n\n## Contribution\n\nPlease contribute using the following [Guidelines](https://github.com/greenpau/ndmtk/tree/master/CONTRIBUTING.md).\n\n[:arrow_up: Back to Top](#table-of-contents)\n\n*****\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenpau%2Fndmtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreenpau%2Fndmtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenpau%2Fndmtk/lists"}