阿鲁巴网络航空API客户端
airwaveapiclient的Python项目详细描述
AirwayApiclient是Aruba Networks Airway用户的实用工具。 该模块连接到无线电波,获取接入点列表等信息, 细节、客户等
要求
- Python2.7,3.5,3.6,3.7,Python。
安装
pypi或github
$ pip install airwaveapiclient or $ git clone https://github.com/mtoshi/airwaveapiclient $ cd airwaveapiclient $ sudo python setup.py install
使用示例
- 文档:Readthedocs
- 示例代码:Github
登录
>>> airwave = AirWaveAPIClient(username='admin', ... password='*****', ... url='https://192.168.1.1') >>> airwave.login()
获取访问点列表
>>> res = airwave.ap_list() >>> res.status_code 200 >>> res.text # xml output '<?xml version="1.0" encoding="utf-8" ...'
获取接入点详细信息
>>> ap_id = 1 >>> res = airwave.ap_detail(ap_id) >>> res.status_code 200 >>> res.text # xml output '<?xml version="1.0" encoding="utf-8" ...'
注销
>>> airwave.logout()