https://github.com/pippozq/netadmin-driver
Execute commands or scripts on juniper,cisco
https://github.com/pippozq/netadmin-driver
ansible cisco juniper python3
Last synced: about 1 month ago
JSON representation
Execute commands or scripts on juniper,cisco
- Host: GitHub
- URL: https://github.com/pippozq/netadmin-driver
- Owner: pippozq
- License: gpl-3.0
- Created: 2017-12-15T02:52:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-15T09:07:28.000Z (over 8 years ago)
- Last Synced: 2025-01-23T22:19:18.889Z (over 1 year ago)
- Topics: ansible, cisco, juniper, python3
- Language: Python
- Size: 46.9 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Netadmin-driver
## What's This?
- A service which send command or script to network device like Juniper or Cisco ,then get the results back to you when it's finished
- Proivde HTTP service with [tornado](https://github.com/tornadoweb/tornado)
- Multiple Execute Commands on devices
- It's built for providing driver service to [netadmin](https://github.com/pippozq/netadmin)
## Build By
Package | Page
---|---
Python3.6|https://www.python.org/downloads/release/python-363/
Junos-eznc | https://github.com/Juniper/py-junos-eznc
Ansible | https://github.com/ansible/ansible
Tornado |https://github.com/tornadoweb/tornado
## Build
Provide Dockerfile, so you can build esaily using
```
docker build -t /netadmin-driver: .
```
## Web Interface
### Juniper
##### Command
```
define a JSON named "json_data" like
{
"hosts":["192.168.1.2","192.168.1.3".....],
"port":22,
"user": {
"name":"ssh name",
"password":"ssh password"
},
"command": "show version"
}
```
```
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d post_data 'http://netadmin-driver-url/juniper/command'
```
##### Config
```
define a JSON named "json_data" like
{
"hosts":["192.168.1.2","192.168.1.3".....],
"port":22,
"user": {
"name":"ssh name",
"password":"ssh password"
},
"file_content": "line1\nline2\n""
}
```
```
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d post_data 'http://netadmin-driver-url/juniper/config'
```
### Cisco
##### Command
```
define a JSON named "json_data" like
{
"hosts":["192.168.1.2","192.168.1.3".....],
"port":22,
"user": {
"name":"ssh name",
"password":"ssh password"
},
"command": "show version"
}
```
```
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d post_data 'http://netadmin-driver-url/cisco/command'
```
#### Config
```
define a JSON named "json_data" like
{
"hosts":["192.168.1.2","192.168.1.3".....],
"port":22,
"user": {
"name":"ssh name",
"password":"ssh password"
},
"file_content": "line1\nline2\n",
"blob_id":"Forza_Milan"
}
```
```
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d post_data 'http://netadmin-driver-url/cisco/config'
```
"blob_id" is the gitlab file id,it's used for the temporary file name, so you can use any thing to rename it. I prefer "Forza_Milan"
## License
GNU General Public License v3.0