azure容器服务命令行工具

acs的Python项目详细描述


注意:不用于生产

请注意,这些脚本旨在允许使用 azure容器服务。它们不是生产用的。

一组用于创建和测试acs的方便脚本 集群。这些脚本还可以帮助您了解如何使用 rest api接口用于管理acs集群上的应用程序。

#用法

请参阅[文档](http://rgardler.github.io/acs-cli)。

#开发

##先决条件

##准备

要安装所有库和开发依赖项:

` sudo pip install -e . sudo pip install -e .[test] `

##一般用途

您可以使用acs–help获取基本帮助,或查看 [文档](http://rgardler.github.com/acs-cli)。

#开发

##添加命令

要添加表示新功能的顶级命令,请遵循 这些步骤(在本例中,新命令称为foo

  • Add the command foo and its description to the “Commands” section of the docstring for acs/cli.py
  • Copy acs/commands/command.tmpl to acs/commands/foo.py * Add the subcommands and options to the docstring of the foo.py file * Implement each command in a method using the same name as the command
  • Add foo.py import to acs/commands/__init__.py
  • Copy tests/command/test_command.tmpl to test/command/test_foo.py * Implement the tests
  • Run the tests with python setup.py test and iterate as necessary
  • Install the package with python setup.py install

##添加子命令

子命令应用于命令,要添加子命令,请执行以下操作:

  • Add the subcommand to the docstring of the relevant command class (e.g. foo.bar)
  • Add a method with the same name as the subcommand
  • Add a test
  • Run the tests with python setup.py test and iterate as necessary
  • Install the package with python setup.py install

##测试

使用[py.test:](http://pytest.org/latest)和[coverage]运行测试(https://pypi.python.org/pypi/pytest cov):

` python setup.py test `

注意,默认情况下,这不会运行慢速测试(如创建 群集和安装功能。因此,您必须首先至少运行一次完整的测试套件。您可以使用:

` py.test --runslow `

##释放

剪切发行版并发布到[python包 索引](https://pypi.python.org/pypi)安装 [绳线](http://pypi.python.org/pypi/twine。然后运行:

` python setup.py sdist bdist_wheel twine upload dist/* `

这将建立一个surce tarball和一个车轮,这将运行 在所有平台上。

###更新文档

创建和折叠文档:

` cd docs make gh-pages cd .. `

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

推荐PyPI第三方库


热门话题
java爬虫获取外部网站搜索结果   java Bluestack未连接到eclipse   java如何从ConstraintViolationException Hibernamte获取数据库字段名   HttpResponse HttpResponse=httpClient引发java运行时错误。执行(httpPost);   Jama中矩阵的java点积和叉积   java有什么方法可以唯一地识别可扩展设备吗?   java我需要用*来写我的名字,但我不断遇到一个错误,我对编码很陌生   java变量是在内部类中访问的。需要被宣布为最终决定。但我不想宣布最终结果   java如何缩短base64图像字符串,Android?   JavaSpringMVC:计划方法不自动触发   图形学习Java 2D API的好资源是什么?   如何在java中对方法进行排队   java JavaFX多行   java Selenium无法在[链接]上找到基于CSS元素的密码字段元素http://www.cartasi.it/gtwpages/index.jsp   Java中的equals()和hashCode()契约   软删除情况下的java Hibernate二级缓存   java为什么这段代码要两次调用这些方法?