ypid / hp1820-cli

A command line interface for HP 1820 J9979A switch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HP 1820 command-line Interface

A command line interface for HP 1820 J9979A switch.

HP 1820 J9979A only provides web management interface. This is awkward for network administrators familiar with Cisco IOS interface. Therefore, this project is the solution to encapsulate the two different management layer.

A Quick View

$ ./sshhp 192.168.1.1
Cannot connect https://192.168.1.1 : [Errno 111] Connection refused
HTTPS failed. Try HTTP...
*****************************************
*Warning: Connect through HTTP protocal.*
*****************************************
Password: 
Type exit/forceexit to quit, help for help.

#setnetwork
management vlan id? (empty = 1)
dhcp or static?static
(if dhcp, left empty below) IP: 192.168.1.1
subnet mask: 255.255.255.0
gateway address: 

#setinfo
Switch Name: new-switch
Location: here
Contact: bookgin

new-switch#showint
Interface     Admin Mode    Physical Type Port Status   Physical Mode Link Speed    MTU           
1             Enabled       Normal        Link Up       Auto          100 Mbps Full Duplex1518          
2             Enabled       Normal        Link Down     Auto                        1518          
3             Enabled       Normal        Link Down     Auto                        1518          
4             Enabled       Normal        Link Down     Auto                        1518          
5             Enabled       Normal        Link Down     Auto                        1518          
6             Enabled       Normal        Link Down     Auto                        1518          
7             Enabled       Normal        Link Down     Auto                        1518          
8             Disabled      Normal        Link Down     Auto                        1518          
TRK1          Disabled      Normal        Link Down     Trunk                       1518          
TRK2          Enabled       Normal        Link Down     Trunk                       1518          
TRK3          Enabled       Normal        Link Down     Trunk                       1518          
TRK4          Enabled       Normal        Link Down     Trunk                       1518          

new-switch#
Logout.
Session closed.

Install

You may have to install BeautifulSoup4 first.

$ git clone https://github.com/BookGin/hp1820-cli.git
$ cd hp1820-cli/
$ ./sshhp admin@192.168.1.1

Dependency

Unimplemented Features

  • Port channel
  • Ping Test (Need to handle javascript)
  • Reboot switch
  • Prettify the information output
  • Download current config file (Need to handle javascript)
  • Compatible with Python 3.4.2 due to this issue

Official Manual

License

The MIT License

About

A command line interface for HP 1820 J9979A switch.

License:MIT License


Languages

Language:Python 100.0%