Skip to main content

模拟 Aerohive 设备的模拟 SSH 服务器

项目描述

https://img.shields.io/pypi/v/mock-aerohive.svg https://gitlab.com/pencot/mock_aerohive/badges/master/pipeline.svg https://codecov.io/gh/pencot/mock_aerohive/branch/master/graph/badge.svg

模拟 Aerohive 设备的模拟 SSH 服务器。

安装:

pip install mock_aerohive

基本用法:

from mock_aerohive import MockAerohive

aerohive = MockAerohive()
# You must add at least 1 user before starting the server!  (Library limitation)
aerohive.addUser("admin", "aerohive")

port = aerohive.run("127.0.0.1")
# Or provide a port: aerohive.run("127.0.0.1", 2222)

aerohive.stop() # Stop a single server.

aerohive.stopAll() # Terminate the background thread running all SSH servers (otherwise the process will hang)
                   # Once you stop the background thread, you may not start another server (with 'run') -
                   # another library limitation.

有关自动启动和停止服务器的 py.test 夹具示例(它在测试会话结束时清理服务器,但允许运行多个服务器),请参阅test/util/MockAerohiveFixture.pytest/integration /auth/test_addUser_and_login.py例如。

版本控制

这个包使用语义版本控制。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

mock_aerohive-0.0.2.tar.gz (3.5 kB 查看哈希

已上传 source

内置分布

mock_aerohive-0.0.2-py2-none-any.whl (5.5 kB 查看哈希

已上传 py2