控制rv6688bcm路由器

rvcm的Python项目详细描述


⟹ Releases are here ⟸

这是用于控制路由器的库和cli实用程序。这取决于 python3.5和请求库。

请参阅源代码中的API—它非常简单和简短。

对于options=,cli还有一个--help。你可以从这个开始 命令:python router.pyz --help,其中python必须是python 3.5或更高。

提供此输出:

usage: router.pyz [OPTIONS] COMMAND [ARGS]...

Options:
  --ip TEXT        Router IP
  --user TEXT      Login name
  --password TEXT  Password
  --help           Show this message and exit.

Commands:
  calls   Calls operations
  nat     NAT operations
  router  Direct router operations

路由器控制支持基本的环境变量(除了 命令行参数):

  • RC_IP-路由器的IP地址
  • RC_USER-路由器的登录名(默认:admin)
  • RC_PASSWORD-路由器密码(默认:admin)

路由器操作

Usage: router.pyz router [OPTIONS] COMMAND [ARGS]...

  Direct router operations

Options:
  --help  Show this message and exit.

Commands:
  apply   Apply changes on the router
  export  Print details about router in json
  info    Print details about router

示例:

命令:python router.pyz --ip 192.168.100.1 router info

NAT操作

Usage: router.pyz nat [OPTIONS] COMMAND [ARGS]...

  NAT operations

Options:
  --help  Show this message and exit.

Commands:
  create   Create forwarding rule
  disable  Disable (but not remove) rule
  enable   Enable rule
  info     Print forwarding table
  remove   Remove forwarding rule
  rename   Rename forwarding rule
  update   Update forwarding record

呼叫操作

Usage: router.pyz calls [OPTIONS] COMMAND [ARGS]...

  Calls operations

Options:
  --help  Show this message and exit.

Commands:
  export  Print calls history in JSON
  info    Print calls history

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
在ElasticSearch中将SearchHit转换为Java对象   第三方库类的java重写XmlAdapter   java如何使用动画类获得平滑的动画效果?   Java PDFBox如果文本内容超过PDF的第一页,如何添加新页面?   Java二叉搜索树u根到最近叶的距离   java什么是diff Scanner和BufferedReader   java如何设计不生成并行数组的程序   java多次声明变量会降低执行速度吗?   java如何使用JXLAPI读取下拉列表的值   多线程为什么自定义阻塞队列在Java中不是线程安全的   java在一个变量中每输入1000个单位,就从另一个变量中减去1?   java Mapstruct通用映射器   Java中的类能否确定它是否已被修改?   java如何在MogoOperations聚合函数中定义输出类型?