Enable ordered nodes graph
In order to give an ability to consume TOSCA graph in more advanced way, it is necessary to implement an ability to extract ordered graph from TOSCA graph.
So, here's an example of a template and its graph:
tosca_definitio
description: Attempts to authorize to OpenStack
#######
# Imports
#######
imports:
- types.yaml
topology_template:
#######
# Inputs
#######
inputs:
keystone_
type: string
default: ''
keystone_
type: string
default: ''
keystone_
type: string
default: ''
keystone_url:
type: string
default: ''
openstack_
type: string
default: ''
#######
# Node templates
#######
node_templates:
openstack_
type: tosca.openstack
properties:
username: { get_input: keystone_username }
password: { get_input: keystone_password }
auth_url: { get_input: keystone_url }
region: { get_input: openstack_region }
openstack_
type: tosca.openstack
properties:
username: { get_input: keystone_username }
password: { get_input: keystone_password }
auth_url: { get_input: keystone_url }
region: { get_input: openstack_region }
requirements:
- dependency:
node: openstack_auth_2
openstack_
type: tosca.openstack
properties:
username: { get_input: keystone_username }
password: { get_input: keystone_password }
auth_url: { get_input: keystone_url }
region: { get_input: openstack_region }
requirements:
- dependency:
node: openstack_auth_1
openstack_
type: tosca.openstack
properties:
username: { get_input: keystone_username }
password: { get_input: keystone_password }
auth_url: { get_input: keystone_url }
region: { get_input: openstack_region }
requirements:
- dependency:
node: openstack_auth_3
and its ordered graph might have next view:
-------------- Parent: 'openstack_auth_2', Child-Of: None
-------
-------
-------
Basically, ordered graph is a list of binary trees where the root of each tree is a Node that doesn't have any childs.
It would be useful for developers who building orchestration frameworks around TOSCA and this parser.
From TOSCA standard feature described above does not violate any TOSCA demands
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Denis Makogon
- Direction:
- Needs approval
- Assignee:
- Denis Makogon
- Definition:
- Pending Approval
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
(spzala) Denis thanks for creating this BP. Reviewing it.