用于Mistral工作流的linter

mistral-lint的Python项目详细描述


PyPI VersionBuild Status

用法

$ pip install mistral-lint
$ mistral-lint path-to-files

查看OpenStack的Gerrit中的评论?我们抓到你了。

$ mistral-lint --review $GERRIT_REVIEW_ID

如果您添加–diff,它会将修补程序与其父提交进行比较,使其 更容易看到变化。例如:

$ mistral-lint --diff --review 428178
+E101: Input flavor_list is not used in Workflow tripleo.validations.v1.collect_flavors
+W102: Workflow tripleo.validations.v1.collect_flavors has no description

当前棉绒

这些是当前包括的绒布。

w101&w102说明

检查每个工作簿和工作流是否都有说明。

w103型

检查工作流类型,如果给定“direct”,则它会发出警告,指出它不是 需要

w103任务名称

检查task()表达式函数的任何使用是否不包括引用 到当前任务。

E101输入

检查是否使用工作流输入。

E102任务存在

检查任务在成功使用时是否在工作流中定义, 出错或完成时

E103、E104、E105表达式

检查表达式是否有匹配数量的左括号和右括号。 使用库解析器验证yaml和jinja2表达式。

示例输出

workbooks/baremetal.yaml
W102: Workflow tripleo.baremetal.v1.set_node_state has no description
W102: Workflow tripleo.baremetal.v1.set_power_state has no description
W102: Workflow tripleo.baremetal.v1.manual_cleaning has no description
E103: Input node_uuids is not used in Workflow tripleo.baremetal.v1.cellv2_discovery

workbooks/deployment.yaml
W102: Workflow tripleo.deployment.v1.deploy_on_server has no description
W102: Workflow tripleo.deployment.v1.deploy_on_servers has no description

workbooks/plan_management.yaml
W102: Workflow tripleo.plan_management.v1.create_deployment_plan has no description
W102: Workflow tripleo.plan_management.v1.update_deployment_plan has no description
W102: Workflow tripleo.plan_management.v1.create_default_deployment_plan has no description

workbooks/stack.yaml
W102: Workflow tripleo.stack.v1.wait_for_stack_complete_or_failed has no description
W102: Workflow tripleo.stack.v1.wait_for_stack_in_progress has no description
W102: Workflow tripleo.stack.v1.wait_for_stack_does_not_exist has no description
W102: Workflow tripleo.stack.v1.delete_stack has no description

workbooks/validations.yaml
W102: Workflow tripleo.validations.v1.run_validation has no description
W102: Workflow tripleo.validations.v1.run_validations has no description
W102: Workflow tripleo.validations.v1.run_groups has no description
W102: Workflow tripleo.validations.v1.list has no description
W102: Workflow tripleo.validations.v1.list_groups has no description
W102: Workflow tripleo.validations.v1.add_validation_ssh_key_parameter has no description
W102: Workflow tripleo.validations.v1.copy_ssh_key has no description
E103: Input queue_name is not used in Workflow tripleo.validations.v1.add_validation_ssh_key_parameter

想法

    检查任务是否存在(所有这些都是错误的,成功的)。 完成等)。
  • 检查是否调用了所有任务。
  • 检查所有任务是否有On error/On success或On complete
  • 检查Zaqar格式
  • Zaqar发布继续代码的交互式工作流。
  • 检查子工作流提供了队列名称

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

推荐PyPI第三方库


热门话题
java创建猜谜游戏程序   JavaWebSocketContainer。connectToServer似乎挂起了   如何在java中中断函数   java c#socket client multiple BeginSend()未到达服务器   不可见的组件然后在Java中的窗格之间切换   java在应用程序类中使用静态接口安全吗?   java等待函数完成,直到回调到来   使用DataOutputStream时的java新行,Android   java服务对象的定义是什么?   基于视图的javahibernate复合密钥   java将varchar连接到char在JPA(oracle)中不起作用   如何在java中通过point类读取多个点?