Cisco NSO的Python客户端库(以前是tail-f)
pynso的Python项目详细描述
概述
Cisco NSO的Python客户端库(以前是tail-f)
安装
要安装,请使用pip:
$ pip install pynso
或者克隆回购协议:
$ git clone https://github.com/DimensionDataCBUSydney/pynso.git $ python setup.py install
用法
frompprintimportpprintfrompynso.clientimportNSOClientfrompynso.datastoresimportDatastoreType# Setup a clientclient=NSOClient('10.123.92.12','admin','admin')# Get information about the APIprint('Getting API version number')pprint(client.info()['version'])# Get the information about the running datastoreprint('Getting the contents of the running datastore')pprint(client.get_datastore(DatastoreType.RUNNING))