Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdface committed Mar 16, 2021
1 parent 640a0a7 commit 2b02e4e
Show file tree
Hide file tree
Showing 25 changed files with 937 additions and 2,124 deletions.
Binary file removed .coverage
Binary file not shown.
6 changes: 6 additions & 0 deletions .eggs/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.

This directory caches those eggs to prevent repeated downloads.

However, it is safe to delete this directory.

2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PYTHONPATH=${workspaceDir}/lib
PYTHONPATH=${workspaceFolder}
46 changes: 14 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,22 @@ give your feedback by following ways<br/>

None <br/>


# Overview

With *fiberhome-oltcli* library, you can easily access olt's commandline interface.<br/>

# How to use

* **Chassis class<br/>**

```
# connect testcenter with ip 10.182.32.138 , without reserving any port
# creating chassis class will auto connect chassis
chassis = Chassis('10.182.32.138')
# disconnect chassis
chassis.disconnect()
# apply changes ( it will apply automatically)
chassis.apply()
# connect testcenter and reserve port
chassis = Chassis('10.182.32.138', [{ 'location' : '//10.182.32.138/1/1', 'vid': None}, { 'location' : '//10.182.32.138/1/2', 'vid': None}])
# connect testcenter, reserve port and specify a default vlan with specified vid
# when you create a device under the port, it will insert a vlan layer with vid 100 for you
# when you create a streamblock, it will insert a vlan layer with vid 100 for you too
chassis = Chassis('10.182.32.138', [{ 'location' : '//10.182.32.138/1/1', 'vid': 100}])
# save xml file
chassis.save('test_configuration.xml')
# get chassis serial number
chassis.serial
# get chassis ip
chassis.ip
```
## Use OLTCLI ###
```
oltcli = OLTCLI.get(OLTModel.AN6000_17, '10.182.33.210', 'GEPON', 'GEPON')
oltcli.get_authorization()
```
## Use OLTTelnet ###
```
telnet = OLTTelnet('10.182.33.210', 'GEPON', 'GEPON')
telnet.connect()
assert telnet.run('config') == ''
telnet.disconnect()
```
Binary file added dist/fiberhome-oltcli-1.0.0.tar.gz
Binary file not shown.
53 changes: 53 additions & 0 deletions fiberhome_oltcli.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Metadata-Version: 2.1
Name: fiberhome-oltcli
Version: 1.0.0
Summary: OLT CommandLine API for FiberHome Co. ltd
Home-page: https://github.com/dvdface/fiberhome-oltcli
Author: Ding Yi
Author-email: dvdface@hotmail.com
License: MIT
Description: # Changelist
* 1.0.0, first release

# Feedback

give your feedback by following ways<br/>

* visit https://github.com/dvdface/fiberhome-oltcli (preferred)

* send email to dvdface@gmail.com


# How to install

`pip install fiberhome-oltcli`

# Known issues

None <br/>

# Overview

With *fiberhome-oltcli* library, you can easily access olt's commandline interface.<br/>

# How to use
## Use OLTCLI ###
```
oltcli = OLTCLI.get(OLTModel.AN6000_17, '10.182.33.210', 'GEPON', 'GEPON')

oltcli.get_authorization()
```
## Use OLTTelnet ###
```
telnet = OLTTelnet('10.182.33.210', 'GEPON', 'GEPON')
telnet.connect()
assert telnet.run('config') == ''
telnet.disconnect()

```
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
14 changes: 14 additions & 0 deletions fiberhome_oltcli.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
README.md
setup.py
fiberhome_oltcli.egg-info/PKG-INFO
fiberhome_oltcli.egg-info/SOURCES.txt
fiberhome_oltcli.egg-info/dependency_links.txt
fiberhome_oltcli.egg-info/requires.txt
fiberhome_oltcli.egg-info/top_level.txt
oltcli/__init__.py
oltcli/cli.py
oltcli/telnet.py
oltcli/utils.py
test/test_cli.py
test/test_telnet.py
test/test_utils.py
1 change: 1 addition & 0 deletions fiberhome_oltcli.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions fiberhome_oltcli.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
wait-util
threadpool
1 change: 1 addition & 0 deletions fiberhome_oltcli.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oltcli
2 changes: 0 additions & 2 deletions oltcli/aw/__init__.py

This file was deleted.

148 changes: 0 additions & 148 deletions oltcli/aw/olt.py

This file was deleted.

Loading

0 comments on commit 2b02e4e

Please sign in to comment.