{"id":13397216,"url":"https://github.com/internap/netman","last_synced_at":"2026-01-16T12:14:26.934Z","repository":{"id":1993699,"uuid":"42546590","full_name":"internap/netman","owner":"internap","description":"A unified REST API to provide vendor-agnostic network automation","archived":false,"fork":false,"pushed_at":"2022-09-02T15:09:25.000Z","size":1368,"stargazers_count":51,"open_issues_count":13,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2026-01-14T12:14:18.196Z","etag":null,"topics":["arista","brocade","cisco","dell","juniper","netman","network-equipment","python","rest-api","switches"],"latest_commit_sha":null,"homepage":"http://netman.readthedocs.io/en/latest/","language":"Python","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/internap.png","metadata":{"files":{"readme":"README.md","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":"2015-09-15T21:06:05.000Z","updated_at":"2024-08-07T21:54:23.000Z","dependencies_parsed_at":"2022-08-09T03:02:01.273Z","dependency_job_id":null,"html_url":"https://github.com/internap/netman","commit_stats":null,"previous_names":["internaphosting/netman"],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/internap/netman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internap%2Fnetman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internap%2Fnetman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internap%2Fnetman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internap%2Fnetman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/internap","download_url":"https://codeload.github.com/internap/netman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/internap%2Fnetman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["arista","brocade","cisco","dell","juniper","netman","network-equipment","python","rest-api","switches"],"created_at":"2024-07-30T18:01:12.909Z","updated_at":"2026-01-16T12:14:26.920Z","avatar_url":"https://github.com/internap.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/internap/netman.svg?branch=master)](https://travis-ci.org/internap/netman)\n[![Documentation Status](https://readthedocs.org/projects/netman/badge/?version=latest)](http://netman.readthedocs.org/en/latest/?badge=latest)\n[![PyPI version](https://badge.fury.io/py/netman.svg)](http://badge.fury.io/py/netman)\n\nNetman\n======\n\nNetman is a unified REST API that provides vendor-agnostic network automation.\nIt abstracts the vendor-specific bits and leaves you with a clean and\nsimplified API.\n\n\nPython code usage\n-----------------\n\n```python\nswitch_factory = SwitchFactory(MemoryStorage(), ThreadingLockFactory())\nswitch = switch_factory.get_anonymous_switch(\n    model=\"cisco\", \n    hostname=\"hostname_or_ip\", \n    username=\"username\", \n    password=\"password\", \n)\n\nswitch.add_vlan(1000, name=\"myvlan\")\n```\n\nREST API usage \n--------------\n\nFirst, start the service\n\n```bash\ntox\n.tox/py27/bin/python netman/main.py\n * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)\n```\n\nThen you can access it by http\n\n```bash\ncurl -X POST http://127.0.0.1:5000/switches/hostname_or_ip/vlans -d '{\"number\": 1000, \"name\": \"myvlan\"}' \n    -H \"Content-Type: application/json\" \n    -H \"Netman-model: cisco\" \n    -H \"Netman-username: username\" \n    -H \"Netman-password: password\"\n```\n\nDisaggregated mode\n------------------\n\nNetman supports a disaggregated mode. This is a special mode of operation where netman will use a remote netman server to access the network equipment. This mode is particularly useful in the case where your network equipment is not available to your main netman server.  You can start a server somewhere, let's say at 192.168.1.1, running netman as described above. And use the proxy like this for direct code usage :\n\n```python\nswitch_factory = SwitchFactory(MemoryStorage(), ThreadingLockFactory())\nswitch = switch_factory.get_anonymous_switch(\n    model=\"cisco\", \n    hostname=\"hostname_or_ip\", \n    username=\"username\", \n    password=\"password\", \n    netman_server=\"http://192.168.1.1\")\n\nswitch.add_vlan(1000, name=\"myvlan\")\n```\n\nOr when invoked using the REST API, you can call the main server and provide the proxy netman server to be used.\n\n```bash\ncurl -X POST http://127.0.0.1:5000/switches/hostname_or_ip/vlans -d '{\"number\": 1000, \"name\": \"myvlan\"}' \n    -H \"Content-Type: application/json\" \n    -H \"Netman-model: cisco\" \n    -H \"Netman-username: username\" \n    -H \"Netman-password: password\"\n    -H \"Netman-Proxy-Server: http://192.168.1.1\"\n```\n\nDocker usage\n============\n\nFrom your computer, start a Netman container and a fake-switch container in order to mock a switch Netman will configure.\n```shell\n$ docker-compose up -d\n```\n\nCreate a Vlan\n```bash\ncurl -X POST http://localhost:32771/switches/netman_tsr1.yul1.example.net_1/vlans -d '{\"number\": 1000, \"name\": \"myvlan\"}' \n    -H \"Content-Type: application/json\" \n    -H \"Netman-model: cisco\" \n    -H \"Netman-username: root\" \n    -H \"Netman-password: root\"\n```\n\nGet information of an existing Vlan\n```bash\ncurl -X GET http://localhost:32771/switches/netman_tsr1.yul1.example.net_1/vlans/1000 \n    -H \"Content-Type: application/json\" \n    -H \"Netman-model: cisco\" \n    -H \"Netman-username: root\" \n    -H \"Netman-password: root\"\n```\n\nContributing\n============\n\nFeel free to raise issues and send some pull request, we'll be happy to look at them!\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternap%2Fnetman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finternap%2Fnetman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finternap%2Fnetman/lists"}