ARIA-88 Add TOSCA use-case examples
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/787d7e7e Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/787d7e7e Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/787d7e7e Branch: refs/heads/ARIA-88-tosca-examples Commit: 787d7e7e6d210adba96dc0057fdf43f4c0034658 Parents: b619335 Author: Tal Liron <[email protected]> Authored: Wed Feb 15 12:48:56 2017 -0600 Committer: Tal Liron <[email protected]> Committed: Thu Feb 16 08:49:52 2017 -0600 ---------------------------------------------------------------------- MANIFEST.in | 1 + aria/parser/modeling/instance_elements.py | 4 +- aria/parser/modeling/model_elements.py | 10 +- .../block-storage-1/block-storage-1.yaml | 68 +++++ .../block-storage-2/block-storage-2.yaml | 75 +++++ .../block-storage-3/block-storage-3.yaml | 68 +++++ .../block-storage-4/block-storage-4.yaml | 96 ++++++ .../block-storage-5/block-storage-5.yaml | 109 +++++++ .../block-storage-6/block-storage-6.yaml | 102 +++++++ .../use-cases/compute-1/compute-1.yaml | 42 +++ .../use-cases/container-1/container-1.yaml | 68 +++++ .../multi-tier-1/custom_types/collectd.yaml | 10 + .../custom_types/elasticsearch.yaml | 6 + .../multi-tier-1/custom_types/kibana.yaml | 10 + .../multi-tier-1/custom_types/logstash.yaml | 10 + .../multi-tier-1/custom_types/rsyslog.yaml | 10 + .../use-cases/multi-tier-1/multi-tier-1.yaml | 237 +++++++++++++++ .../use-cases/network-1/network-1.yaml | 49 +++ .../use-cases/network-2/network-2.yaml | 46 +++ .../use-cases/network-3/network-3.yaml | 81 +++++ .../use-cases/network-4/network-4.yaml | 70 +++++ .../use-cases/non-normative-types.yaml | 177 +++++++++++ .../object-storage-1/object-storage-1.yaml | 24 ++ .../software-component-1.yaml | 54 ++++ .../webserver-dbms-1/webserver-dbms-1.yaml | 122 ++++++++ .../paypalpizzastore_nodejs_app.yaml | 15 + .../webserver-dbms-2/webserver-dbms-2.yaml | 115 +++++++ .../profiles/tosca-simple-1.0/artifacts.yaml | 12 +- .../profiles/tosca-simple-1.0/capabilities.yaml | 4 +- .../profiles/tosca-simple-1.0/data.yaml | 4 +- .../profiles/tosca-simple-1.0/groups.yaml | 2 +- .../profiles/tosca-simple-1.0/interfaces.yaml | 2 +- .../profiles/tosca-simple-1.0/nodes.yaml | 11 +- .../profiles/tosca-simple-1.0/policies.yaml | 10 +- .../tosca-simple-1.0/relationships.yaml | 4 +- .../tosca-simple-nfv-1.0/capabilities.yaml | 3 +- .../profiles/tosca-simple-nfv-1.0/data.yaml | 2 +- .../profiles/tosca-simple-nfv-1.0/groups.yaml | 2 +- .../profiles/tosca-simple-nfv-1.0/nodes.yaml | 12 +- .../simple_v1_0/assignments.py | 2 +- .../simple_v1_0/functions.py | 18 +- .../aria_extension_tosca/simple_v1_0/misc.py | 1 + .../simple_v1_0/modeling/__init__.py | 13 +- .../simple_v1_0/modeling/requirements.py | 29 +- .../presentation/field_validators.py | 18 +- tests/end2end/test_parser.py | 40 --- tests/end2end/test_tosca_simple_v1_0.py | 112 +++++++ tests/parser/service_templates.py | 20 +- tests/parser/utils.py | 9 +- .../tosca-simple-1.0/node-cellar/inputs.yaml | 3 + .../node-cellar/node-cellar.yaml | 299 +++++++++++++++++++ .../node-cellar/types/aria.yaml | 93 ++++++ .../node-cellar/types/mongodb.yaml | 73 +++++ .../node-cellar/types/nginx.yaml | 27 ++ .../node-cellar/types/nodejs.yaml | 69 +++++ .../node-cellar/types/openstack.yaml | 201 +++++++++++++ .../tosca-simple-1.0/node-cellar/types/os.yaml | 75 +++++ .../tosca-simple-1.0/node-cellar/workflows.py | 16 + .../service_templates/node-cellar/inputs.yaml | 3 - .../node-cellar/node-cellar.yaml | 299 ------------------- .../node-cellar/types/aria.yaml | 93 ------ .../node-cellar/types/mongodb.yaml | 73 ----- .../node-cellar/types/nginx.yaml | 27 -- .../node-cellar/types/nodejs.yaml | 69 ----- .../node-cellar/types/openstack.yaml | 201 ------------- .../service_templates/node-cellar/types/os.yaml | 75 ----- .../service_templates/node-cellar/workflows.py | 16 - 67 files changed, 2737 insertions(+), 984 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/MANIFEST.in ---------------------------------------------------------------------- diff --git a/MANIFEST.in b/MANIFEST.in index f9bd145..d934e18 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ include requirements.txt +recursive-include examples * http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/aria/parser/modeling/instance_elements.py ---------------------------------------------------------------------- diff --git a/aria/parser/modeling/instance_elements.py b/aria/parser/modeling/instance_elements.py index 523de0b..8310d62 100644 --- a/aria/parser/modeling/instance_elements.py +++ b/aria/parser/modeling/instance_elements.py @@ -451,8 +451,8 @@ class Relationship(Element): template_name=None): if name is not None and not isinstance(name, basestring): raise ValueError('name must be a string or None') - if (source_requirement_index is not None and - (not isinstance(source_requirement_index, int) or (source_requirement_index < 0))): + if source_requirement_index is not None and \ + (not isinstance(source_requirement_index, int) or (source_requirement_index < 0)): raise ValueError('source_requirement_index must be int > 0') if type_name is not None and not isinstance(type_name, basestring): raise ValueError('type_name must be a string or None') http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/aria/parser/modeling/model_elements.py ---------------------------------------------------------------------- diff --git a/aria/parser/modeling/model_elements.py b/aria/parser/modeling/model_elements.py index 7346a54..69da60e 100644 --- a/aria/parser/modeling/model_elements.py +++ b/aria/parser/modeling/model_elements.py @@ -296,9 +296,8 @@ class RequirementTemplate(ModelElement): if target_capability_name is not None and not isinstance(target_capability_name, basestring): raise ValueError('target_capability_name must be a string or None') - if target_node_type_name is not None and target_node_template_name is not None \ - or target_node_type_name is None and target_node_template_name is None: - raise ValueError('must set either target_node_type_name or target_node_template_name') + if target_node_type_name is not None and target_node_template_name is not None: + raise ValueError('can set either target_node_type_name or target_node_template_name') if target_capability_type_name is not None and target_capability_name is not None: raise ValueError('can set either target_capability_type_name or target_capability_name') @@ -552,8 +551,7 @@ class RelationshipTemplate(ModelElement): raise ValueError('type_name must be a string or None') if (template_name is not None) and (not isinstance(template_name, basestring)): raise ValueError('template_name must be a string or None') - if type_name is not None and template_name is not None \ - or type_name is None and template_name is None: + if (type_name is None) and (template_name is None): raise ValueError('must set either type_name or template_name') self.type_name = type_name @@ -576,7 +574,7 @@ class RelationshipTemplate(ModelElement): ('target_interface_templates', as_raw_list(self.target_interface_templates)))) def instantiate(self, context, container): - relationship = Relationship(self.type_name, self.template_name) + relationship = Relationship(name=self.template_name, type_name=self.type_name) instantiate_dict(context, container, relationship.properties, self.properties) instantiate_dict(context, container, http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml new file mode 100644 index 0000000..ff6dc92 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-1/block-storage-1.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using the normative AttachesTo + Relationship Type. + +metadata: + template_name: block-storage-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 1 GB + os: + properties: + architecture: x86_64 + type: linux + distribution: fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_attribute: [ my_storage, volume_id ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml new file mode 100644 index 0000000..09c30a7 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-2/block-storage-2.yaml @@ -0,0 +1,75 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using a custom AttachesTo Relationship + Type. + +metadata: + template_name: block-storage-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyCustomAttachesTo: + derived_from: AttachesTo + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + # Declare custom AttachesTo type using the 'relationship' keyword + relationship: + type: MyCustomAttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + + volume_id: + description: The volume id of the block storage instance. + value: { get_attribute: [ my_storage, volume_id ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml new file mode 100644 index 0000000..3018fe9 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-3/block-storage-3.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with server and attached block storage using a named Relationship Template + for the storage attachment. + +metadata: + template_name: block-storage-3 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + description: Size of the storage to be created. + default: 1 GB + storage_location: + type: string + description: Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + # Declare template to use with 'relationship' keyword + relationship: storage_attachment + + my_storage: + type: BlockStorage + properties: + size: { get_input: storage_size } + + relationship_templates: + + storage_attachment: + type: AttachesTo + properties: + location: { get_input: storage_location } + + outputs: + private_ip: + description: The private IP address of the newly created compute instance. + value: { get_attribute: [ my_server, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_attribute: [ my_storage, volume_id ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml new file mode 100644 index 0000000..0693ddd --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-4/block-storage-4.yaml @@ -0,0 +1,96 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a Single Block Storage node shared by 2-Tier Application with custom + AttachesTo Type and implied relationships. + +metadata: + template_name: block-storage-4 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyAttachesTo: + derived_from: tosca.relationships.AttachesTo + properties: + location: + type: string + default: /default_location + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + + node_templates: + + my_web_app_tier_1: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: MyAttachesTo + + my_web_app_tier_2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: MyAttachesTo + properties: + location: /some_other_data_location + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + private_ip_1: + description: The private IP address of the application's first tier. + value: { get_attribute: [ my_web_app_tier_1, private_address ] } + private_ip_2: + description: The private IP address of the application's second tier. + value: { get_attribute: [ my_web_app_tier_2, private_address ] } + volume_id: + description: The volume id of the block storage instance. + value: { get_attribute: [ my_storage, volume_id ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml new file mode 100644 index 0000000..5f5cf71 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-5/block-storage-5.yaml @@ -0,0 +1,109 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a single Block Storage node shared by 2-Tier Application with custom + AttachesTo Type and explicit Relationship Templates. + +metadata: + template_name: block-storage-5 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +relationship_types: + + MyAttachesTo: + derived_from: tosca.relationships.AttachesTo + properties: + location: + type: string + default: /default_location + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: >- + Block storage mount point (filesystem path). + + node_templates: + + my_web_app_tier_1: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: storage_attachesto_1 + + my_web_app_tier_2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: storage_attachesto_2 + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + relationship_templates: + + storage_attachesto_1: + type: MyAttachesTo + properties: + location: /my_data_location + + storage_attachesto_2: + type: MyAttachesTo + properties: + location: /some_other_data_location + + outputs: + private_ip_1: + description: The private IP address of the application's first tier. + value: { get_attribute: [my_web_app_tier_1, private_address] } + private_ip_2: + description: The private IP address of the application's second tier. + value: { get_attribute: [my_web_app_tier_2, private_address] } + volume_id: + description: The volume id of the block storage instance. + value: { get_attribute: [my_storage, volume_id] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml b/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml new file mode 100644 index 0000000..808245b --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/block-storage-6/block-storage-6.yaml @@ -0,0 +1,102 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 2 servers each with different attached block storage. + +metadata: + template_name: block-storage-6 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + storage_size: + type: scalar-unit.size + default: 1 GB + description: Size of the storage to be created. + storage_snapshot_id: + type: string + description: >- + Optional identifier for an existing snapshot to use when creating storage. + storage_location: + type: string + description: >- + Block storage mount point (filesystem path). + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + my_server2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: Fedora + version: 18.0 + requirements: + - local_storage: + node: my_storage2 + relationship: + type: AttachesTo + properties: + location: { get_input: storage_location } + + my_storage2: + type: tosca.nodes.BlockStorage + properties: + size: { get_input: storage_size } + snapshot_id: { get_input: storage_snapshot_id } + + outputs: + server_ip_1: + description: The private IP address of the application's first server. + value: { get_attribute: [ my_server, private_address ] } + server_ip_2: + description: The private IP address of the application's second server. + value: { get_attribute: [ my_server2, private_address ] } + volume_id_1: + description: The volume id of the first block storage instance. + value: { get_attribute: [my_storage, volume_id] } + volume_id_2: + description: The volume id of the second block storage instance. + value: { get_attribute: [ my_storage2, volume_id ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml b/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml new file mode 100644 index 0000000..254d2b6 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/compute-1/compute-1.yaml @@ -0,0 +1,42 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile that just defines a single compute instance and selects a (guest) host + Operating System from the Compute node's properties. Note, this example does not include default + values on inputs properties. + +metadata: + template_name: compute-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + + node_templates: + + my_server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 1 GB + os: + properties: + architecture: x86_64 + type: Linux + distribution: ubuntu + version: 12.04 + + outputs: + private_ip: + description: The private IP address of the deployed server instance. + value: { get_attribute: [ my_server, private_address ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml b/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml new file mode 100644 index 0000000..f6f69fc --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/container-1/container-1.yaml @@ -0,0 +1,68 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with wordpress, web server and mysql on the same server. + +metadata: + template_name: compute-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +# Repositories to retrieve code artifacts from + +repositories: + + docker_hub: https://registry.hub.docker.com/ + +topology_template: + + inputs: + wp_host_port: + type: integer + description: The host port that maps to port 80 of the WordPress container. + db_root_pwd: + type: string + description: Root password for MySQL. + + node_templates: + + # The MYSQL container based on official MySQL image in Docker hub + + mysql_container: + type: tosca.nodes.Container.Application.Docker + # ARIA NOTE: moved to a requirement in the node type + #capabilities: + # # This is a capability that would mimic the Docker âlink feature + # database_link: tosca.capabilities.Docker.Link + artifacts: + my_image: + file: mysql + type: tosca.artifacts.Deployment.Image.Container.Docker + repository: docker_hub + interfaces: + Standard: + create: + implementation: my_image + inputs: + db_root_password: { get_input: db_root_pwd } + + # The WordPress container based on official WordPress image in Docker hub + + wordpress_container: + type: tosca.nodes.Container.Application.Docker + requirements: + - database_link: mysql_container + artifacts: + my_image: + file: wordpress + type: tosca.artifacts.Deployment.Image.Container.Docker + repository: docker_hub + interfaces: + Standard: + create: + implementation: my_image + inputs: + host_port: { get_input: wp_host_port } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml new file mode 100644 index 0000000..6d28899 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/collectd.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Collectd: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - collectd_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml new file mode 100644 index 0000000..32623d1 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/elasticsearch.yaml @@ -0,0 +1,6 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Elasticsearch: + derived_from: tosca.nodes.SoftwareComponent http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml new file mode 100644 index 0000000..7af00d0 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/kibana.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Kibana: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - search_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml new file mode 100644 index 0000000..a3eebbe --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/logstash.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Logstash: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - search_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml new file mode 100644 index 0000000..3bd7c2b --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/custom_types/rsyslog.yaml @@ -0,0 +1,10 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.SoftwareComponent.Rsyslog: + derived_from: tosca.nodes.SoftwareComponent + requirements: + - rsyslog_endpoint: + capability: tosca.capabilities.Endpoint + relationship: tosca.relationships.ConnectsTo http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml b/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml new file mode 100644 index 0000000..3485e49 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/multi-tier-1/multi-tier-1.yaml @@ -0,0 +1,237 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + This TOSCA simple profile deploys nodejs, mongodb, elasticsearch, logstash and kibana each on a + separate server with monitoring enabled for nodejs server where a sample nodejs application is + running. The syslog and collectd are installed on a nodejs server. + +metadata: + template_name: multi-tier-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml # ARIA NOTE: moved + - custom_types/elasticsearch.yaml + - custom_types/logstash.yaml + - custom_types/kibana.yaml + - custom_types/collectd.yaml + - custom_types/rsyslog.yaml + +dsl_definitions: + + host_capabilities: &host_capabilities + # container properties (flavor) + disk_size: 10 GB + num_cpus: { get_input: my_cpus } + mem_size: 4096 MB + os_capabilities: &os_capabilities + architecture: x86_64 + type: Linux + distribution: Ubuntu + version: 14.04 + +topology_template: + + inputs: + my_cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + github_url: + type: string + description: The URL to download nodejs. + default: https://github.com/sample.git + + node_templates: + + paypal_pizzastore: + type: tosca.nodes.WebApplication.PayPalPizzaStore + properties: + github_url: { get_input: github_url } + requirements: + - host: nodejs + - database_connection: mongo_db + interfaces: + Standard: + configure: + implementation: scripts/nodejs/configure.sh + inputs: + github_url: { get_property: [ SELF, github_url ] } + mongodb_ip: { get_attribute: [mongo_server, private_address] } + start: scripts/nodejs/start.sh + + nodejs: + type: tosca.nodes.WebServer.Nodejs + requirements: + - host: app_server + interfaces: + Standard: + create: scripts/nodejs/create.sh + + mongo_db: + type: tosca.nodes.Database + properties: + name: 'pizzastore' # ARIA NOTE: missing in spec + requirements: + - host: mongo_dbms + interfaces: + Standard: + create: create_database.sh + + mongo_dbms: + type: tosca.nodes.DBMS + requirements: + - host: mongo_server + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/mongodb/create.sh + configure: + implementation: scripts/mongodb/config.sh + inputs: + mongodb_ip: { get_attribute: [mongo_server, ip_address] } + start: scripts/mongodb/start.sh + + elasticsearch: + type: tosca.nodes.SoftwareComponent.Elasticsearch + requirements: + - host: elasticsearch_server + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/elasticsearch/create.sh + start: scripts/elasticsearch/start.sh + + logstash: + type: tosca.nodes.SoftwareComponent.Logstash + requirements: + - host: logstash_server + # ARIA NOTE: mangled in the spec + - search_endpoint: + node: elasticsearch + relationship: + interfaces: + Configure: + pre_configure_source: + implementation: python/logstash/configure_elasticsearch.py + inputs: + elasticsearch_ip: { get_attribute: [elasticsearch_server, ip_address] } + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/lostash/create.sh + configure: scripts/logstash/config.sh + start: scripts/logstash/start.sh + + kibana: + type: tosca.nodes.SoftwareComponent.Kibana + requirements: + - host: kibana_server + - search_endpoint: elasticsearch + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/kibana/create.sh + configure: + implementation: scripts/kibana/config.sh + inputs: + elasticsearch_ip: { get_attribute: [ elasticsearch_server, ip_address ] } + kibana_ip: { get_attribute: [ kibana_server, ip_address ] } + start: scripts/kibana/start.sh + + app_collectd: + type: tosca.nodes.SoftwareComponent.Collectd + requirements: + - host: app_server + # ARIA NOTE: mangled in the spec + - collectd_endpoint: + node: logstash + relationship: + interfaces: + Configure: + pre_configure_target: + implementation: python/logstash/configure_collectd.py + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/collectd/create.sh + configure: + implementation: python/collectd/config.py + inputs: + logstash_ip: { get_attribute: [ logstash_server, ip_address ] } + start: scripts/collectd/start.sh + + app_rsyslog: + type: tosca.nodes.SoftwareComponent.Rsyslog + requirements: + - host: app_server + # ARIA NOTE: mangled in the spec + - rsyslog_endpoint: + node: logstash + relationship: + interfaces: + Configure: + pre_configure_target: + implementation: python/logstash/configure_rsyslog.py + interfaces: + Standard: # ARIA NOTE: wrong in spec + create: scripts/rsyslog/create.sh + configure: + implementation: scripts/rsyslog/config.sh + inputs: + logstash_ip: { get_attribute: [ logstash_server, ip_address ] } + start: scripts/rsyslog/start.sh + + app_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + mongo_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + elasticsearch_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + logstash_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + kibana_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: *host_capabilities + os: + properties: *os_capabilities + + outputs: + nodejs_url: + description: URL for the nodejs server. + value: { get_attribute: [ app_server, private_address ] } + mongodb_url: + description: URL for the mongodb server. + value: { get_attribute: [ mongo_server, private_address ] } + elasticsearch_url: + description: URL for the elasticsearch server. + value: { get_attribute: [ elasticsearch_server, private_address ] } + logstash_url: + description: URL for the logstash server. + value: { get_attribute: [ logstash_server, private_address ] } + kibana_url: + description: URL for the kibana server. + value: { get_attribute: [ kibana_server, private_address ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml b/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml new file mode 100644 index 0000000..c66964f --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/network-1/network-1.yaml @@ -0,0 +1,49 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to a new network. + +metadata: + template_name: network-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + network_name: { get_input: network_name } + ip_version: 4 + cidr: '192.168.0.0/24' + start_ip: '192.168.0.50' + end_ip: '192.168.0.200' + gateway_ip: '192.168.0.1' + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: my_server + - link: my_network http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml b/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml new file mode 100644 index 0000000..017950d --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/network-2/network-2.yaml @@ -0,0 +1,46 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to an existing network. + +metadata: + template_name: network-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + network_name: { get_input: network_name } + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: + node: my_server + - link: + node: my_network http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml b/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml new file mode 100644 index 0000000..5fa40b7 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/network-3/network-3.yaml @@ -0,0 +1,81 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 2 servers bound to the 1 network. + +metadata: + template_name: network-3 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + network_name: + type: string + description: Network name + network_cidr: + type: string + default: 10.0.0.0/24 + description: CIDR for the network + network_start_ip: + type: string + default: 10.0.0.100 + description: Start IP for the allocation pool + network_end_ip: + type: string + default: 10.0.0.150 + description: End IP for the allocation pool + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_server2: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network: + type: tosca.nodes.network.Network + properties: + ip_version: 4 + cidr: { get_input: network_cidr } + network_name: { get_input: network_name } + start_ip: { get_input: network_start_ip } + end_ip: { get_input: network_end_ip } + + my_port: + type: tosca.nodes.network.Port + requirements: + - binding: my_server + - link: my_network + + my_port2: + type: tosca.nodes.network.Port + requirements: + - binding: my_server2 + - link: my_network http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml b/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml new file mode 100644 index 0000000..5b51117 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/network-4/network-4.yaml @@ -0,0 +1,70 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with 1 server bound to 3 networks. + +metadata: + template_name: network-4 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + node_templates: + + my_server: + type: tosca.nodes.Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: 1 + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: Linux + distribution: CirrOS + version: 0.3.2 + + my_network1: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.1.0/24' + network_name: net1 + + my_network2: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.2.0/24' + network_name: net2 + + my_network3: + type: tosca.nodes.network.Network + properties: + cidr: '192.168.3.0/24' + network_name: net3 + + my_port1: + type: tosca.nodes.network.Port + properties: + order: 0 + requirements: + - binding: my_server + - link: my_network1 + + my_port2: + type: tosca.nodes.network.Port + properties: + order: 1 + requirements: + - binding: my_server + - link: my_network2 + + my_port3: + type: tosca.nodes.network.Port + properties: + order: 2 + requirements: + - binding: my_server + - link: my_network3 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml b/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml new file mode 100644 index 0000000..fa826f5 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/non-normative-types.yaml @@ -0,0 +1,177 @@ + +artifact_types: + + tosca.artifacts.Deployment.Image.Container.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.1 + derived_from: tosca.artifacts.Deployment.Image + description: Docker Container Image + + tosca.artifacts.Deployment.Image.VM.ISO: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.2 + derived_from: tosca.artifacts.Deployment.Image.VM + description: Virtual Machine (VM) image in ISO disk format + mime_type: application/octet-stream + file_ext: [ iso ] + + tosca.artifacts.Deployment.Image.VM.QCOW2: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.1.3 + derived_from: tosca.artifacts.Deployment.Image.VM + description: Virtual Machine (VM) image in QCOW v2 standard disk format + mime_type: application/octet-stream + file_ext: [ qcow2 ] + +capability_types: + + tosca.capabilities.Container.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.2.1 + derived_from: tosca.capabilities.Container + description: The type indicates capabilities of a Docker runtime environment (client). + properties: + version: + description: >- + The Docker version capability (i.e., the versions supported by the capability). + type: list + required: false + entry_schema: version + publish_all: + description: >- + Indicates that all ports (ranges) listed in the dockerfile using the EXPOSE keyword be + published. + type: boolean + default: false + required: false + publish_ports: + description: >- + List of ports mappings from source (Docker container) to target (host) ports to publish. + type: list + entry_schema: PortSpec + required: false + expose_ports: + description: >- + List of ports mappings from source (Docker container) to expose to other Docker containers + (not accessible outside host). + type: list + entry_schema: PortSpec + required: false + volumes: + description: >- + The dockerfile VOLUME command which is used to enable access from the Docker container to + a directory on the host machine. + type: list + entry_schema: string + required: false + # ARIA NOTE: these are missing in the spec + host_id: + description: >- + The optional identifier of an existing host resource that should be used to run this + container on. + type: string + required: false + volume_id: + description: >- + The optional identifier of an existing storage volume (resource) that should be used to + create the container's mount point(s) on. + type: string + required: false + + # ARIA NOTE: missing in spec + tosca.capabilities.Docker.Link: + derived_from: tosca.capabilities.Root + description: This is a capability that would mimic the Docker âlink feature + +node_types: + + tosca.nodes.Database.MySQL: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.1 + derived_from: tosca.nodes.Database + requirements: + - host: + capability: tosca.capabilities.Container # ARIA NOTE: missing in spec + node: tosca.nodes.DBMS.MySQL + + tosca.nodes.DBMS.MySQL: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.2 + derived_from: tosca.nodes.DBMS + properties: + port: + description: reflect the default MySQL server port + type: integer # AIRA NOTE: missing in spec + default: 3306 + root_password: + # MySQL requires a root_password for configuration + # Override parent DBMS definition to make this property required + type: string # AIRA NOTE: missing in spec + required: true + capabilities: + # Further constrain the 'host' capability to only allow MySQL databases + host: + type: tosca.capabilities.Container # ARIA NOTE: missing in spec + valid_source_types: [ tosca.nodes.Database.MySQL ] + + tosca.nodes.WebServer.Apache: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.3 + derived_from: tosca.nodes.WebServer + + tosca.nodes.WebApplication.WordPress: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.4 + derived_from: tosca.nodes.WebApplication + properties: + admin_user: + type: string + required: false # ARIA NOTE: missing in spec + admin_password: + type: string + required: false # ARIA NOTE: missing in spec + db_host: + type: string + required: false # ARIA NOTE: missing in spec + requirements: + - database_endpoint: + capability: tosca.capabilities.Endpoint.Database + node: tosca.nodes.Database + relationship: tosca.relationships.ConnectsTo + + tosca.nodes.WebServer.Nodejs: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.5 + derived_from: tosca.nodes.WebServer + properties: + # Property to supply the desired implementation in the Github repository + github_url: + required: no + type: string + description: location of the application on the github. + default: https://github.com/mmm/testnode.git + interfaces: + Standard: + inputs: + github_url: + type: string + + tosca.nodes.Container.Application.Docker: + _extensions: + specification: tosca-simple-1.0 + specification_section: 8.3.6 + derived_from: tosca.nodes.Container.Application + requirements: + - host: + capability: tosca.capabilities.Container.Docker + - database_link: # ARIA NOTE: missing in spec + capability: tosca.capabilities.Docker.Link http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml b/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml new file mode 100644 index 0000000..c55a4db --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/object-storage-1/object-storage-1.yaml @@ -0,0 +1,24 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA template for creating an object storage service. + +metadata: + template_name: object-storage-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +topology_template: + + inputs: + objectstore_name: + type: string + + node_templates: + + obj_store_server: + type: tosca.nodes.ObjectStorage + properties: + name: { get_input: objectstore_name } + size: 4096 MB + maxsize: 20 GB http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml b/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml new file mode 100644 index 0000000..fc1cfd7 --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/software-component-1/software-component-1.yaml @@ -0,0 +1,54 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA Simple Profile with a SoftwareComponent node with a declared Virtual machine (VM) deployment + artifact that automatically deploys to its host Compute node. + +metadata: + template_name: software-component-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +topology_template: + + # ARIA NOTE: missing in spec + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + + node_templates: + + my_virtual_machine: + type: SoftwareComponent + artifacts: + my_vm_image: + file: images/fedora-18-x86_64.qcow2 + type: tosca.artifacts.Deployment.Image.VM.QCOW2 + requirements: + - host: my_server + # Automatically deploy the VM image referenced on the create operation + interfaces: + Standard: + create: my_vm_image + + # Compute instance with no Operating System guest host + my_server: + type: Compute + capabilities: + # Note: no guest OperatingSystem requirements as these are in the image. + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4 GB + + outputs: + private_ip: + description: The private IP address of the deployed server instance. + value: { get_attribute: [ my_server, private_address ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml b/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml new file mode 100644 index 0000000..faf109d --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/webserver-dbms-1/webserver-dbms-1.yaml @@ -0,0 +1,122 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with WordPress, a web server, a MySQL DBMS hosting the application's database + content on the same server. Does not have input defaults or constraints. + +metadata: + template_name: webserver-dbms-1 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - ../non-normative-types.yaml + +topology_template: + + inputs: + cpus: + type: integer + description: Number of CPUs for the server. + db_name: + type: string + description: The name of the database. + db_user: + type: string + description: The username of the DB user. + db_pwd: + type: string + description: The WordPress database admin account password. + db_root_pwd: + type: string + description: Root password for MySQL. + db_port: + type: PortDef + description: Port for the MySQL database + # ARIA NOTE: missing in spec + context_root: + type: string + description: Context root for WordPress. + + node_templates: + + wordpress: + type: tosca.nodes.WebApplication.WordPress + properties: + context_root: { get_input: context_root } + requirements: + - host: webserver + - database_endpoint: mysql_database + interfaces: + Standard: + create: wordpress_install.sh + configure: + implementation: wordpress_configure.sh + inputs: + wp_db_name: { get_property: [ mysql_database, name ] } + wp_db_user: { get_property: [ mysql_database, user ] } + wp_db_password: { get_property: [ mysql_database, password ] } + # In my own template, find requirement/capability, find port property + wp_db_port: { get_property: [ SELF, database_endpoint, port ] } + + mysql_database: + type: Database + properties: + name: { get_input: db_name } + user: { get_input: db_user } + password: { get_input: db_pwd } + port: { get_input: db_port } + capabilities: + database_endpoint: + properties: + port: { get_input: db_port } + requirements: + - host: mysql_dbms + interfaces: + Standard: + configure: mysql_database_configure.sh + + mysql_dbms: + type: DBMS + properties: + root_password: { get_input: db_root_pwd } + port: { get_input: db_port } + requirements: + - host: server + interfaces: + Standard: + # ARIA NOTE: not declared in spec + #inputs: + # db_root_password: { get_property: [ mysql_dbms, root_password ] } + create: mysql_dbms_install.sh + start: mysql_dbms_start.sh + configure: mysql_dbms_configure.sh + + webserver: + type: WebServer + requirements: + - host: server + interfaces: + Standard: + create: webserver_install.sh + start: webserver_start.sh + + server: + type: Compute + capabilities: + host: + properties: + disk_size: 10 GB + num_cpus: { get_input: cpus } + mem_size: 4096 MB + os: + properties: + architecture: x86_64 + type: linux + distribution: fedora + version: 17.0 + + outputs: + website_url: + description: URL for Wordpress wiki. + value: { get_attribute: [ server, public_address ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml b/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml new file mode 100644 index 0000000..4723a3f --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/custom_types/paypalpizzastore_nodejs_app.yaml @@ -0,0 +1,15 @@ +# ARIA NOTE: missing in spec + +node_types: + + tosca.nodes.WebApplication.PayPalPizzaStore: + derived_from: tosca.nodes.WebApplication + properties: + github_url: + type: string + requirements: + - database_connection: + capability: tosca.capabilities.Container + + tosca.nodes.WebServer.Nodejs: + derived_from: tosca.nodes.WebServer http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml ---------------------------------------------------------------------- diff --git a/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml b/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml new file mode 100644 index 0000000..66eab8e --- /dev/null +++ b/examples/tosca-simple-1.0/use-cases/webserver-dbms-2/webserver-dbms-2.yaml @@ -0,0 +1,115 @@ +tosca_definitions_version: tosca_simple_yaml_1_0 + +description: >- + TOSCA simple profile with a nodejs web server hosting a PayPal sample application which connects + to a mongodb database. + +metadata: + template_name: webserver-dbms-2 + template_author: TOSCA Simple Profile in YAML + template_version: '1.0' + +imports: + - custom_types/paypalpizzastore_nodejs_app.yaml + +dsl_definitions: + + ubuntu_node: &ubuntu_node + disk_size: 10 GB + num_cpus: { get_input: my_cpus } + mem_size: 4096 MB + os_capabilities: &os_capabilities + architecture: x86_64 + type: Linux + distribution: Ubuntu + version: 14.04 + +topology_template: + + inputs: + my_cpus: + type: integer + description: Number of CPUs for the server. + constraints: + - valid_values: [ 1, 2, 4, 8 ] + default: 1 + github_url: + type: string + description: The URL to download nodejs. + default: https://github.com/sample.git + + node_templates: + + paypal_pizzastore: + type: tosca.nodes.WebApplication.PayPalPizzaStore + properties: + github_url: { get_input: github_url } + requirements: + - host: nodejs + - database_connection: mongo_db + interfaces: + Standard: + configure: + implementation: scripts/nodejs/configure.sh + inputs: + github_url: { get_property: [ SELF, github_url ] } + mongodb_ip: { get_attribute: [mongo_server, private_address] } + start: scripts/nodejs/start.sh + + nodejs: + type: tosca.nodes.WebServer.Nodejs + requirements: + - host: app_server + interfaces: + Standard: + create: scripts/nodejs/create.sh + + mongo_db: + type: tosca.nodes.Database + properties: + name: 'pizzastore' # ARIA NOTE: missing in spec + requirements: + - host: mongo_dbms + interfaces: + Standard: + create: create_database.sh + + mongo_dbms: + type: tosca.nodes.DBMS + requirements: + - host: mongo_server + properties: + port: 27017 + interfaces: + Standard: # ARIA NOTE: mistaken in spec + create: mongodb/create.sh + configure: + implementation: mongodb/config.sh + inputs: + mongodb_ip: { get_attribute: [mongo_server, private_address] } + start: mongodb/start.sh + + mongo_server: + type: tosca.nodes.Compute + capabilities: + os: + properties: *os_capabilities + host: + properties: *ubuntu_node + + app_server: + type: tosca.nodes.Compute + capabilities: + os: + properties: *os_capabilities + host: + properties: *ubuntu_node + + outputs: + + nodejs_url: + description: URL for the nodejs server, http://<IP>:3000 + value: { get_attribute: [app_server, private_address] } + mongodb_url: + description: URL for the mongodb server. + value: { get_attribute: [ mongo_server, private_address ] } http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml index ef9e5f2..af99340 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/artifacts.yaml @@ -17,7 +17,7 @@ artifact_types: tosca.artifacts.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.3.1 @@ -41,7 +41,7 @@ artifact_types: tosca.artifacts.Deployment: _extensions: - shorthand_name: Deployment # ommitted in the spec (seems to be a mistake) + shorthand_name: Deployment # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Deployment specification: tosca-simple-1.0 specification_section: 5.3.3.1 @@ -67,7 +67,7 @@ artifact_types: tosca.artifacts.Deployment.Image.VM: _extensions: - shorthand_name: Deployment.VM # ommitted in the spec (seems to be a mistake) + shorthand_name: Deployment.VM # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Deployment.VM specification: tosca-simple-1.0 specification_section: 5.3.3.4 @@ -85,7 +85,7 @@ artifact_types: tosca.artifacts.Implementation: _extensions: - shorthand_name: Implementation # ommitted in the spec (seems to be a mistake) + shorthand_name: Implementation # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Implementation specification: tosca-simple-1.0 specification_section: 5.3.4.1 @@ -97,7 +97,7 @@ artifact_types: tosca.artifacts.Implementation.Bash: _extensions: - shorthand_name: Implementation.Bash # mistake in spec? shouldn't we have "Implementation." as prefix? + shorthand_name: Implementation.Bash # ARIA NOTE: mistake in spec? shouldn't we have "Implementation." as prefix? type_qualified_name: tosca:Implementation.Bash specification: tosca-simple-1.0 specification_section: 5.3.4.3 @@ -109,7 +109,7 @@ artifact_types: tosca.artifacts.Implementation.Python: _extensions: - shorthand_name: Implementation.Python # mistake in spec? shouldn't we have "Implementation." as prefix? + shorthand_name: Implementation.Python # ARIA NOTE: mistake in spec? shouldn't we have "Implementation." as prefix? type_qualified_name: tosca:Implementation.Python specification: tosca-simple-1.0 specification_section: 5.3.4.4 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml index 2578799..72f6f0e 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/capabilities.yaml @@ -17,7 +17,7 @@ capability_types: tosca.capabilities.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.4.1 @@ -296,7 +296,7 @@ capability_types: tosca.capabilities.network.Bindable: _extensions: - shorthand_name: Bindable # mistake in spec? has "network." as a prefix + shorthand_name: Bindable # ARIA NOTE: mistake in spec? has "network." as a prefix type_qualified_name: tosca:Bindable specification: tosca-simple-1.0 specification_section: 5.4.11 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml index ef787b7..5210aa0 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/data.yaml @@ -95,7 +95,7 @@ data_types: tosca.datatypes.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.2.1 @@ -220,7 +220,7 @@ data_types: specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#TYPE_TOSCA_DATA_PORTDEF' description: >- The PortDef type is a TOSCA data Type used to define a network port. - derived_from: integer # ARIA allows deriving from primitives; it's unclear if the TOSCA spec does + derived_from: integer # ARIA NOTE: we allow deriving from primitives constraints: - in_range: [ 1, 65535 ] http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml index a252a7c..31cfc55 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/groups.yaml @@ -17,7 +17,7 @@ group_types: tosca.groups.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.9.1 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml index dd84d43..de1d34f 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/interfaces.yaml @@ -17,7 +17,7 @@ interface_types: tosca.interfaces.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.7.3 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml index 2d1b407..414a388 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/nodes.yaml @@ -126,7 +126,7 @@ node_types: description: >- The Floating (IP) client's on the public network can connect to. type: tosca.capabilities.Endpoint.Public - occurrences: [ 0, UNBOUNDED ] # Note: it seems unnecessary to specify this, as it is the implied default + occurrences: [ 0, UNBOUNDED ] # ARIA NOTE: it seems unnecessary to specify this, as it is the implied default requirements: - application: capability: tosca.capabilities.Endpoint @@ -195,7 +195,7 @@ node_types: description: >- The TOSCA WebApplication node represents a software application that can be managed and run by a TOSCA WebServer node. Specific types of web applications such as Java, etc. could be derived from this type. - derived_from: tosca.nodes.SoftwareComponent # the spec says tosca.nodes.Root, but this seems to be a mistake + derived_from: tosca.nodes.SoftwareComponent # ARIA NOTE: the spec says tosca.nodes.Root properties: context_root: description: >- @@ -213,7 +213,7 @@ node_types: tosca.nodes.DBMS: _extensions: - shorthand_name: DBMS # ommitted in the spec (seems to be a mistake) + shorthand_name: DBMS # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:DBMS specification: tosca-simple-1.0 specification_section: 5.8.6 @@ -246,7 +246,7 @@ node_types: specification_url: 'http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.0/cos01/TOSCA-Simple-Profile-YAML-v1.0-cos01.html#DEFN_TYPE_NODES_DATABASE' description: >- The TOSCA Database node represents a logical database that can be managed and hosted by a TOSCA DBMS node. - derived_from: tosca.nodes.Root # note, it's *not* a SoftwareComponent + derived_from: tosca.nodes.Root # ARIA NOTE: it's *not* a SoftwareComponent properties: name: description: >- @@ -310,7 +310,8 @@ node_types: requirements: - host: capability: tosca.capabilities.Container - #node: tosca.nodes.Container # seems to be a mistake in the spec + # ARIA NOTE: seems a mistake in the spec + #node: tosca.nodes.Container relationship: tosca.relationships.HostedOn # http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml index d840b14..015d2b0 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/policies.yaml @@ -17,7 +17,7 @@ policy_types: tosca.policies.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.10.1 @@ -27,7 +27,7 @@ policy_types: tosca.policies.Placement: _extensions: - shorthand_name: Placement # ommitted in the spec (seems to be a mistake) + shorthand_name: Placement # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Placement specification: tosca-simple-1.0 specification_section: 5.10.2 @@ -38,7 +38,7 @@ policy_types: tosca.policies.Scaling: _extensions: - shorthand_name: Scaling # ommitted in the spec (seems to be a mistake) + shorthand_name: Scaling # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Scaling specification: tosca-simple-1.0 specification_section: 5.10.3 @@ -49,7 +49,7 @@ policy_types: tosca.policies.Update: _extensions: - shorthand_name: Update # ommitted in the spec (seems to be a mistake) + shorthand_name: Update # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Update specification: tosca-simple-1.0 specification_section: 5.10.4 @@ -60,7 +60,7 @@ policy_types: tosca.policies.Performance: _extensions: - shorthand_name: Performance # ommitted in the spec (seems to be a mistake) + shorthand_name: Performance # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Performance specification: tosca-simple-1.0 specification_section: 5.10.5 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml index 212ccfa..6ea4d12 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-1.0/relationships.yaml @@ -17,7 +17,7 @@ relationship_types: tosca.relationships.Root: _extensions: - shorthand_name: Root # ommitted in the spec (seems to be a mistake) + shorthand_name: Root # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:Root specification: tosca-simple-1.0 specification_section: 5.6.1 @@ -147,7 +147,7 @@ relationship_types: tosca.relationships.network.BindsTo: _extensions: - shorthand_name: network.BindsTo # mistake in spec? this seems different than the usual shorthand convention + shorthand_name: BindsTo # ARIA NOTE: the spec says "network.BindsTo" which seems wrong type_qualified_name: tosca:BindsTo specification: tosca-simple-1.0 specification_section: 7.5.5 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml index 7be18a6..6bc6b67 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/capabilities.yaml @@ -35,7 +35,8 @@ capability_types: * any page size maps to system default * custom MB value: sets TLB size to this specific value type: string - #constraints: # seems wrong in the spec + # ARIA NOTE: seems wrong in the spec + #constraints: # - [ normal, huge ] cpu_allocation: description: >- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml index 97467ba..89e3565 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/data.yaml @@ -57,7 +57,7 @@ data_types: tosca.datatypes.compute.Container.Architecture.NUMA: _extensions: - shorthand_name: Container.Architecture.NUMA # seems to be a mistake in the spec; the norm is to add a "Container.Architecture." prefix + shorthand_name: Container.Architecture.NUMA # ARIA NOTE: seems to be a mistake in the spec; the norm is to add a "Container.Architecture." prefix type_qualified_name: tosca:Container.Architecture.NUMA specification: tosca-simple-nfv-1.0 specification_section: 8.3.2 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/groups.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/groups.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/groups.yaml index 4a01519..5eb87c8 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/groups.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/groups.yaml @@ -17,7 +17,7 @@ group_types: tosca.groups.nfv.VNFFG: _extensions: - shorthand_name: VNFFG # the spec must be mistaken here, says "VL" + shorthand_name: VNFFG # ARIA NOTE: the spec must be mistaken here, says "VL" type_qualified_name: tosca:VNFFG specification: tosca-simple-nfv-1.0 specification_section: 10.6.1 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml index 5b9a653..0dfe38d 100644 --- a/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml +++ b/extensions/aria_extension_tosca/profiles/tosca-simple-nfv-1.0/nodes.yaml @@ -17,7 +17,7 @@ node_types: tosca.nodes.nfv.VNF: _extensions: - shorthand_name: VNF # ommitted in the spec (seems to be a mistake) + shorthand_name: VNF # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:VNF specification: tosca-simple-nfv-1.0 specification_section: 8.5.1 @@ -103,7 +103,7 @@ node_types: tosca.nodes.nfv.FP: _extensions: - shorthand_name: FP # the spec must be mistaken here, says "VL" + shorthand_name: FP # ARIA NOTE: the spec must be mistaken here, says "VL" type_qualified_name: tosca:FP specification: tosca-simple-nfv-1.0 specification_section: 10.5.1 @@ -147,7 +147,7 @@ node_types: tosca.nodes.nfv.VL.ELine: _extensions: - shorthand_name: VL.ELine # ommitted in the spec (seems to be a mistake) + shorthand_name: VL.ELine # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:VL.ELine specification: tosca-simple-nfv-1.0 specification_section: 9.2 @@ -158,11 +158,11 @@ node_types: capabilities: virtual_linkable: type: tosca.capabilities.nfv.VirtualLinkable - occurrences: [ 2, UNBOUNDED ] # the spec is wrong here, must be a range + occurrences: [ 2, UNBOUNDED ] # ARIA NOTE: the spec is wrong here, must be a range tosca.nodes.nfv.VL.ELAN: _extensions: - shorthand_name: VL.ELAN # ommitted in the spec (seems to be a mistake) + shorthand_name: VL.ELAN # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:VL.ELAN specification: tosca-simple-nfv-1.0 specification_section: 9.3 @@ -173,7 +173,7 @@ node_types: tosca.nodes.nfv.VL.ETree: _extensions: - shorthand_name: VL.ETree # ommitted in the spec (seems to be a mistake) + shorthand_name: VL.ETree # ARIA NOTE: ommitted in the spec type_qualified_name: tosca:VL.ETree specification: tosca-simple-nfv-1.0 specification_section: 9.4 http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/787d7e7e/extensions/aria_extension_tosca/simple_v1_0/assignments.py ---------------------------------------------------------------------- diff --git a/extensions/aria_extension_tosca/simple_v1_0/assignments.py b/extensions/aria_extension_tosca/simple_v1_0/assignments.py index 14fee96..2a39ed9 100644 --- a/extensions/aria_extension_tosca/simple_v1_0/assignments.py +++ b/extensions/aria_extension_tosca/simple_v1_0/assignments.py @@ -232,7 +232,7 @@ class RequirementAssignment(ExtensiblePresentation): * Relationship Type that the provider will use to select a type-compatible relationship template to relate the source node to the target node at runtime. - :rtype: :class:`RequirementRelationshipAssignment` + :rtype: :class:`RelationshipAssignment` """ @field_validator(node_filter_validator)
