Skip to main content

PyTosca

[![Build Status](https://api.travis-ci.org/kapilt/pytosca.svg)](https://travis-ci.org/kapilt/pytosca)

A python library for using OASIS Tosca YAML Simple Profile 1.0

This library was initially implemented as a learning exercise for evaluating an early draft of the standard.

A readily available alternative for tosca is the one toscalib embedded in the heat-translator.

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

Tosca Modeling

The TOSCA standard is modeled here as three distinct collections, The meta model which per the standard is associated with a set of types, and which is extensible by any given tosca file. The node templates which are the actualization of the meta model as loaded from a tosca yaml file. Finally the realized node resoures which are created by an orchestrator and associated to their corresponding node templates.

This library chooses to map these collections using native python language constructs, meta models correspond to classes, node templates to instances of those classes.

Running Unit Tests

The stdlib test runner is integrated via setuptools ala:

$ python setup.py test

Alternatively any other test runner can be used directly.

Execution

The execution of the template takes place through three phases of binding

Input binding

Resource binding

The binding tier

tosca notes

Standards Questions

[outdated]

  • 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

Feedback

[outdated]

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

library notes

  • definition references interfaces by name in node, but by type in relation.

  • a couple of typos

  • capability matches node_type by bad name (should be types.nodes.Root)

questions

  • 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

Binding to variables

Metadata

Release files for pytosca 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytosca 0.2.1
File Size Uploaded
pytosca-0.2.1.tar.gz 12.1 kB Details

Release files / pytosca-0.2.1.tar.gz

Download URL pytosca-0.2.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0c4a7ad6e70e5de8f23a98e4a6601ccbf538d4d629690e47d2e10906364fa0cb
BLAKE2b-256 checksum
How to use checksums
10309e59385bd49f8d7f3b4975baac234ffffe83923d2337e788c03c36913928
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page