Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions tosca_definitions/tosca_simple_yaml_1_0/types/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,32 @@ node_types:
Standard:
type: tosca.interfaces.node.lifecycle.Standard

workflows:
install:
steps:
install_sequence:
activities:
- set_state: creating
- call_operation: tosca.interfaces.node.lifecycle.Standard.create
- set_state: created
- set_state: configuring
- call_operation: tosca.interfaces.node.lifecycle.Standard.configure
- set_state: configured
- set_state: starting
- call_operation: tosca.interfaces.node.lifecycle.Standard.start
- set_state: started
uninstall:
steps:
uninstall_sequence:
activities:
- set_state: stopping
- call_operation: tosca.interfaces.node.lifecycle.Standard.stop
- set_state: stopped
- set_state: deleting
- call_operation: tosca.interfaces.node.lifecycle.Standard.delete
- set_state: deleted

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# steps:
# install_sequence:
# activities:
# - set_state: creating
# - call_operation: tosca.interfaces.node.lifecycle.Standard.create
# - set_state: created
# - set_state: configuring
# - call_operation: tosca.interfaces.node.lifecycle.Standard.configure
# - set_state: configured
# - set_state: starting
# - call_operation: tosca.interfaces.node.lifecycle.Standard.start
# - set_state: started
# uninstall:
# steps:
# uninstall_sequence:
# activities:
# - set_state: stopping
# - call_operation: tosca.interfaces.node.lifecycle.Standard.stop
# - set_state: stopped
# - set_state: deleting
# - call_operation: tosca.interfaces.node.lifecycle.Standard.delete
# - set_state: deleted


#section: 5.9.2 tosca.nodes.Compute
Expand Down
70 changes: 37 additions & 33 deletions tosca_definitions/tosca_simple_yaml_1_0/types/relationships.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ relationship_types:

valid_target_types: [ tosca.capabilities.Node ]

workflows:
install:
source_weaving:
- before: creating
wait_target: started

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - before: creating
# wait_target: started

#section: 5.7.3 tosca.relationships.HostedOn
#url: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/csprd02/TOSCA-Simple-Profile-YAML-v1.1-csprd02.html#DEFN_TYPE_RELATIONSHIPS_HOSTEDON
Expand All @@ -44,12 +45,14 @@ relationship_types:

valid_target_types: [ tosca.capabilities.Container ]

workflows:
install:
source_weaving:
- before: creating
wait_target: started

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - before: creating
# wait_target: started

#section: 5.7.4 tosca.relationships.ConnectsTo
#url: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/csprd02/TOSCA-Simple-Profile-YAML-v1.1-csprd02.html#DEFN_TYPE_RELATIONSHIPS_CONNECTSTO
tosca.relationships.ConnectsTo:
Expand All @@ -62,27 +65,28 @@ relationship_types:
type: tosca.datatypes.Credential
required: false

workflows:
install:
source_weaving:
- after: configuring
wait_target: started
activity: tosca.interfaces.relationships.Configure.pre_configure_source
- before: configured
activity: tosca.interfaces.relationships.Configure.post_configure_source
- before: starting
wait_target: started
- after: started
activity: tosca.interfaces.relationships.Configure.add_target
target_weaving:
- after: configuring
after_source: created
activity: tosca.interfaces.relationships.Configure.pre_configure_target
- before: configured
activity: tosca.interfaces.relationships.Configure.post_configure_target
- after: started
activity: tosca.interfaces.relationships.Configure.add_source

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - after: configuring
# wait_target: started
# activity: tosca.interfaces.relationships.Configure.pre_configure_source
# - before: configured
# activity: tosca.interfaces.relationships.Configure.post_configure_source
# - before: starting
# wait_target: started
# - after: started
# activity: tosca.interfaces.relationships.Configure.add_target
# target_weaving:
# - after: configuring
# after_source: created
# activity: tosca.interfaces.relationships.Configure.pre_configure_target
# - before: configured
# activity: tosca.interfaces.relationships.Configure.post_configure_target
# - after: started
# activity: tosca.interfaces.relationships.Configure.add_source

#section: 5.7.5 tosca.relationships.AttachesTo
#url: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.1/csprd02/TOSCA-Simple-Profile-YAML-v1.1-csprd02.html#DEFN_TYPE_RELATIONSHIPS_ATTACHTO
Expand Down
58 changes: 31 additions & 27 deletions tosca_definitions/tosca_simple_yaml_1_2/types/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,40 +42,44 @@ node_types:
Standard:
type: tosca.interfaces.node.lifecycle.Standard

workflows:
install:
steps:
install_sequence:
activities:
- set_state: creating
- call_operation: tosca.interfaces.node.lifecycle.Standard.create
- set_state: created
- set_state: configuring
- call_operation: tosca.interfaces.node.lifecycle.Standard.configure
- set_state: configured
- set_state: starting
- call_operation: tosca.interfaces.node.lifecycle.Standard.start
- set_state: started
uninstall:
steps:
uninstall_sequence:
activities:
- set_state: stopping
- call_operation: tosca.interfaces.node.lifecycle.Standard.stop
- set_state: stopped
- set_state: deleting
- call_operation: tosca.interfaces.node.lifecycle.Standard.delete
- set_state: deleted
# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# steps:
# install_sequence:
# activities:
# - set_state: creating
# - call_operation: tosca.interfaces.node.lifecycle.Standard.create
# - set_state: created
# - set_state: configuring
# - call_operation: tosca.interfaces.node.lifecycle.Standard.configure
# - set_state: configured
# - set_state: starting
# - call_operation: tosca.interfaces.node.lifecycle.Standard.start
# - set_state: started
# uninstall:
# steps:
# uninstall_sequence:
# activities:
# - set_state: stopping
# - call_operation: tosca.interfaces.node.lifecycle.Standard.stop
# - set_state: stopped
# - set_state: deleting
# - call_operation: tosca.interfaces.node.lifecycle.Standard.delete
# - set_state: deleted

#section: 5.9.2 tosca.nodes.Abstract.Compute
tosca.nodes.Abstract.Compute:
derived_from: tosca.nodes.Root
capabilities:
host:
type: tosca.capabilities.Compute
valid_source_types: []


# Following is an inconsistency in the TOSCA 1.2 specification as Page 97 says that
# valid_source_types is "An optional list of one or more valid names of Node Type ..."
# valid_source_types: []


#section: 5.9.3 tosca.nodes.Compute
tosca.nodes.Compute:
derived_from: tosca.nodes.Abstract.Compute
Expand Down
68 changes: 36 additions & 32 deletions tosca_definitions/tosca_simple_yaml_1_2/types/relationships.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,27 @@ relationship_types:

valid_target_types: [ tosca.capabilities.Node ]

workflows:
install:
source_weaving:
- before: creating
wait_target: started

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - before: creating
# wait_target: started

#section: 5.7.3 tosca.relationships.HostedOn
tosca.relationships.HostedOn:
derived_from: tosca.relationships.Root

valid_target_types: [ tosca.capabilities.Container ]

workflows:
install:
source_weaving:
- before: creating
wait_target: started
# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - before: creating
# wait_target: started

#section: 5.7.4 tosca.relationships.ConnectsTo
tosca.relationships.ConnectsTo:
Expand All @@ -59,27 +62,28 @@ relationship_types:
type: tosca.datatypes.Credential
required: false

workflows:
install:
source_weaving:
- after: configuring
wait_target: started
activity: tosca.interfaces.relationships.Configure.pre_configure_source
- before: configured
activity: tosca.interfaces.relationships.Configure.post_configure_source
- before: starting
wait_target: started
- after: started
activity: tosca.interfaces.relationships.Configure.add_target
target_weaving:
- after: configuring
after_source: created
activity: tosca.interfaces.relationships.Configure.pre_configure_target
- before: configured
activity: tosca.interfaces.relationships.Configure.post_configure_target
- after: started
activity: tosca.interfaces.relationships.Configure.add_source

# workflows is not a keyword of node type declaration.
#
# workflows:
# install:
# source_weaving:
# - after: configuring
# wait_target: started
# activity: tosca.interfaces.relationships.Configure.pre_configure_source
# - before: configured
# activity: tosca.interfaces.relationships.Configure.post_configure_source
# - before: starting
# wait_target: started
# - after: started
# activity: tosca.interfaces.relationships.Configure.add_target
# target_weaving:
# - after: configuring
# after_source: created
# activity: tosca.interfaces.relationships.Configure.pre_configure_target
# - before: configured
# activity: tosca.interfaces.relationships.Configure.post_configure_target
# - after: started
# activity: tosca.interfaces.relationships.Configure.add_source

#section: 5.7.5 tosca.relationships.AttachesTo
tosca.relationships.AttachesTo:
Expand Down
31 changes: 22 additions & 9 deletions tosca_definitions/tosca_simple_yaml_1_2/types/tosca_types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,25 @@ metadata:
description: TOSCA 1.2 normative types

imports:
- tosca_artifact_types: tosca_simple_yaml_1_2/artifacts.yaml
- tosca_data_types: tosca_simple_yaml_1_2/datatypes.yaml
- tosca_capability_types: tosca_simple_yaml_1_2/capabilities.yaml
- tosca_interfaces_types: tosca_simple_yaml_1_2/interfaces.yaml
- tosca_node_types: tosca_simple_yaml_1_2/nodes.yaml
- tosca_relationship_types: tosca_simple_yaml_1_2/relationships.yaml
- tosca_group_types: tosca_simple_yaml_1_2/groups.yaml
- tosca_policy_types: tosca_simple_yaml_1_2/policies.yaml

# Following syntax was in TOSCA 1.0 but is not still present in TOSCA 1.2.
#
# - tosca_artifact_types: tosca_simple_yaml_1_2/artifacts.yaml
# - tosca_data_types: tosca_simple_yaml_1_2/datatypes.yaml
# - tosca_capability_types: tosca_simple_yaml_1_2/capabilities.yaml
# - tosca_interfaces_types: tosca_simple_yaml_1_2/interfaces.yaml
# - tosca_node_types: tosca_simple_yaml_1_2/nodes.yaml
# - tosca_relationship_types: tosca_simple_yaml_1_2/relationships.yaml
# - tosca_group_types: tosca_simple_yaml_1_2/groups.yaml
# - tosca_policy_types: tosca_simple_yaml_1_2/policies.yaml
#
# Moreover the imported files are in the same directory than this file.
# So tosca_simple_yaml_1_2/ is not appropriate.
#
- artifacts.yaml
- datatypes.yaml
- capabilities.yaml
- interfaces.yaml
- nodes.yaml
- relationships.yaml
- groups.yaml
- policies.yaml