用于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无法获得正确的温度转换输出   java如何使用vlcj版本4.7.0制作用于音频流的HeadlesMediaPlayer?   java密钥斗篷无法获取访问令牌   java Uribacon的BeaconLayout是什么?   mysql的java Spring数据xml配置   java从使用布局的页面适配器中删除特定位置页面。刷卡   java使用安卓从web目录读取文件   java使用Sikuli导出应用程序   swing JAVA如何更新已绘制的字符串?   java Worker任务在WildFly中多次生成   爪哇12小时制(上午/下午)   java生成Google地图发布密钥   java如何在IntelliJ中将maven模块的groupId添加到名称/表示中   java Selenium WebDriver标识输入标记内的Td value元素   java如何将JAXWS中的Date@webgram映射到xsd:Date而不是xsd:datetime?   java Remove arraylist字符串停止随机函数   java使用googlehttpclientxml解析xml:使用XmlObjectParser解析xml元素内容和属性   java如何在array response 2中获取特定的响应数据   java我无法为安卓导入或使用AdView