使用oasis-tosca-yaml配置文件的应用拓扑

pytosca的Python项目详细描述


pytosca

[![生成状态](https://api.travis-ci.org/kapilt/pytosca.svg)](https://travis-ci.org/kapilt/pytosca

使用oasis tosca yaml simple profile 1.0的python库

这个图书馆最初是作为一个学习练习来实现的 用于评估标准的早期草稿。

tosca的一个现成的替代品是toscalib 嵌入到热转换器中。

https://github.com/openstack/heat-translator/tree/master/translator/toscalib

TOSCA建模

tosca标准在这里建模为三个不同的集合,即 根据标准与一组类型关联的元模型, 它可以通过任何给定的tosca文件进行扩展。节点模板 这是从tosca加载的元模型的实现 yaml文件。最终实现的节点资源由 一个编排器,并与相应的节点模板相关联。

此库选择使用本机python映射这些集合 语言构造,元模型对应于类,节点模板 这些类的实例。

运行单元测试

stdlib测试运行程序通过setuptools ala集成:

$ python setup.py test

或者,可以直接使用任何其他测试转轮。

执行

模板的执行通过绑定的三个阶段进行

输入绑定

资源绑定

绑定层

TOSCA注释

标准问题

[过时]

  • what does a relation callout binding in a template look like.
  • relation shorthand form is not defined properly in the meta model
  • page 13 and 14 has requirements: database but elsewhere its database_endpoint

Is this a typo. - wp_db_port: { get_ref_property: [ database_endpoint, database_endpoint, port ] }

  • page 9 points to an interface implementation artifact directly against the name of the interface instead of against the lifecycle operation.. there’s some abmiguity here.
  • can more than one interface be associated to a type

反馈

[过时]

  • os version should not be an integer, minimum it should be a float, ideally a string.

图书馆笔记

  • 定义按节点中的名称引用接口,但按关系中的类型引用接口。
  • 几个打字错误
  • 功能按错误名称匹配节点类型(应为types.nodes.root)

问题

  • how does inheritance work across types, what inherits (properties, lifecycle)
  • spelling of endpoint vs database endpoint.
  • delete lifecycle operation [ is it normative, may have to combine with deletion]
  • mapping lifecycle to machine operations.. is start automatically re-invoked on boot?
  • is stopped launched before reboot?
  • order of relation lifecycle events
  • the xml policy notion

绑定到变量

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

推荐PyPI第三方库


热门话题
安卓 studio安装的java Unity本机广告   java如何将映射转换为对象   java我试图使用rest控制器从h2数据库中检索记录,但它说没有数据集   反思为什么会抛出java。lang.InstanceException?   在opensuse中找不到Java/javac   java为Android上的谷歌地图添加了5900多个标记。如何有效地做   java如何在if语句中使用循环   java如何在JPA(Hibernate)中映射一对多关系和复合主键?   如何在Java中读取和写入外部进程?   Java线程。睡眠时间最短   java使用EclipseGradle插件如何离线托管和使用依赖项(库jar文件)   java为什么虚拟引用在排队时没有被清除?   java无法理解如何创建用于响铃报警的取消按钮   java解析不应通过注入容器错误发生   java Toast或ProgressDialog不显示   java在自定义对象上使用优先级队列的更好方法   java格式的。wmv文件。(或者任何视频文件都很好)   从页面调用另一个侦听器后,不会调用java JSF<f:ajax>侦听器   java注释ConfigApplicationContext不能多次刷新有什么原因吗?