From 451a3400b76511393c62a444f588a4ed15f4a549 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 10:28:42 +0200 Subject: Initial OpenECOMP SDC commit Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b Signed-off-by: Michael Lando --- .../resources/CI/components/apache/apache-type.yml | 50 ++++++ .../CI/components/apache/images/apache.png | Bin 0 -> 10518 bytes .../CI/components/apache/scripts/install_apache.sh | 53 +++++++ .../CI/components/apache/scripts/start_apache.sh | 10 ++ .../normativeTypes/DBMS/images/relational_db.png | Bin 0 -> 51853 bytes .../normativeTypes/DBMS/normative-types-DBMS.yml | 36 +++++ .../normativeTypes/blockStorage/images/volume.png | Bin 0 -> 16643 bytes .../blockStorage/normative-types-blockStorage.yml | 40 +++++ .../normativeTypes/compute/images/compute.png | Bin 0 -> 61345 bytes .../compute/normative-types-compute.yml | 77 ++++++++++ .../database/images/relational_db.png | Bin 0 -> 51853 bytes .../database/normative-types-database.yml | 41 +++++ .../normativeTypes/network/images/network.png | Bin 0 -> 159707 bytes .../network/normative-types-network.yml | 39 +++++ .../objectStorage/images/objectstore.png | Bin 0 -> 4354 bytes .../normative-types-objectStorage.yml | 35 +++++ .../components/normativeTypes/root/images/root.png | Bin 0 -> 5335 bytes .../normativeTypes/root/normative-types-root.yml | 168 +++++++++++++++++++++ .../softwareComponent/images/software.png | Bin 0 -> 55407 bytes .../normative-types-softwareComponent.yml | 25 +++ .../webApplication/images/network.png | Bin 0 -> 159707 bytes .../normative-types-webApplication.yml | 21 +++ .../webServer/normative-types-webServer.yml | 24 +++ 23 files changed, 619 insertions(+) create mode 100644 asdc-tests/src/test/resources/CI/components/apache/apache-type.yml create mode 100644 asdc-tests/src/test/resources/CI/components/apache/images/apache.png create mode 100644 asdc-tests/src/test/resources/CI/components/apache/scripts/install_apache.sh create mode 100644 asdc-tests/src/test/resources/CI/components/apache/scripts/start_apache.sh create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/images/relational_db.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/normative-types-DBMS.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/images/volume.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/normative-types-blockStorage.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/compute/images/compute.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/compute/normative-types-compute.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/database/images/relational_db.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/database/normative-types-database.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/network/images/network.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/network/normative-types-network.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/images/objectstore.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/normative-types-objectStorage.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/root/images/root.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/root/normative-types-root.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/images/software.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/normative-types-softwareComponent.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/images/network.png create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/normative-types-webApplication.yml create mode 100644 asdc-tests/src/test/resources/CI/components/normativeTypes/webServer/normative-types-webServer.yml (limited to 'asdc-tests/src/test/resources/CI/components') diff --git a/asdc-tests/src/test/resources/CI/components/apache/apache-type.yml b/asdc-tests/src/test/resources/CI/components/apache/apache-type.yml new file mode 100644 index 0000000000..360b1a2d60 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/apache/apache-type.yml @@ -0,0 +1,50 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 +description: TOSCA simple profile with Apache. +template_name: apache-type +template_version: 2.0.0-SNAPSHOT +template_author: FastConnect + +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-webServer:1.0.0.wd03-SNAPSHOT" + +node_types: + alien.nodes.Apache: + derived_from: tosca.nodes.WebServer + description: > + The TOSCA Apache Node Type represents an apache component + that can be managed and run by a TOSCA Compute Node Type. + capabilities: + host: + type: alien.capabilities.ApacheContainer + properties: + valid_node_types: [ tosca.nodes.WebApplication ] + tags: + icon: /images/apache.png + properties: + version: + type: version + default: 2.4 + constraints: + - equal: 2.4 + port: + type: integer + description: Port for the Apache server + default: 80 + constraints: + - greater_or_equal: 1 + document_root: + type: string + default: "/var/www" + interfaces: + Standard: + create: + inputs: + PORT: { get_property: [SELF, port] } + DOC_ROOT: { get_property: [SELF, document_root] } + implementation: scripts/install_apache.sh + start: scripts/start_apache.sh + +capability_types: + alien.capabilities.ApacheContainer: + derived_from: tosca.capabilities.Container diff --git a/asdc-tests/src/test/resources/CI/components/apache/images/apache.png b/asdc-tests/src/test/resources/CI/components/apache/images/apache.png new file mode 100644 index 0000000000..8e9f402d90 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/apache/images/apache.png differ diff --git a/asdc-tests/src/test/resources/CI/components/apache/scripts/install_apache.sh b/asdc-tests/src/test/resources/CI/components/apache/scripts/install_apache.sh new file mode 100644 index 0000000000..a77f9a13f8 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/apache/scripts/install_apache.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +echo "Using apt-get. Installing apache2 on one of the following : Debian, Ubuntu, Mint" +LOCK="/tmp/lockaptget" +DEFAULT_PORT=80 + +while true; do + if mkdir "${LOCK}" &>/dev/null; then + echo "Apache take the lock" + break; + fi + echo "Waiting the end of one of our recipes..." + sleep 0.5 +done + +while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do + echo "Waiting for other software managers to finish..." + sleep 0.5 +done + +sudo rm -f /var/lib/dpkg/lock +sudo apt-get update || (sleep 15; sudo apt-get update || exit ${1}) +sudo apt-get install -y -q apache2 || exit ${1} +rm -rf "${LOCK}" + +sudo /etc/init.d/apache2 stop +if [ ! -d $DOC_ROOT ]; then + eval "sudo mkdir -p $DOC_ROOT" +fi +eval "sudo chown -R www-data:www-data $DOC_ROOT" + +if [[ ("$PORT" == "$DEFAULT_PORT") ]]; then + echo "Use default port for Apache : $DEFAULT_PORT" +else + echo "Replacing port $DEFAULT_PORT with $PORT..." + sudo sed -i -e "s/$DEFAULT_PORT/$PORT/g" /etc/apache2/ports.conf || exit ${1} +fi + +echo "Change config of apache2" +if sudo test -f "/etc/apache2/sites-available/default"; then + echo "Change the DocumentRoot of apache2 on Ubuntu < 14.04" + sudo sed -i -e "s#DocumentRoot /var/www#DocumentRoot $DOC_ROOT#g" /etc/apache2/sites-available/default +fi +if sudo test -f "/etc/apache2/sites-available/000-default.conf"; then + echo "Change the DocumentRoot of Apache2 on Ubuntu >= 14.04" + sudo sed -i -e "s#DocumentRoot /var/www/html#DocumentRoot $DOC_ROOT#g" /etc/apache2/sites-available/000-default.conf +fi + +sudo bash -c "echo ServerName localhost >> /etc/apache2/apache2.conf" + +echo "Start apache2 whith new conf" +sudo /etc/init.d/apache2 start +echo "End of $0" diff --git a/asdc-tests/src/test/resources/CI/components/apache/scripts/start_apache.sh b/asdc-tests/src/test/resources/CI/components/apache/scripts/start_apache.sh new file mode 100644 index 0000000000..478c56edf5 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/apache/scripts/start_apache.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +service="apache2" + +if (( $(ps -ef | grep -v grep | grep $service | wc -l) > 0 )) +then + sudo /etc/init.d/$service restart +else + sudo /etc/init.d/$service start +fi diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/images/relational_db.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/images/relational_db.png new file mode 100644 index 0000000000..a7a632effd Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/images/relational_db.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/normative-types-DBMS.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/normative-types-DBMS.yml new file mode 100644 index 0000000000..4a924672fc --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/DBMS/normative-types-DBMS.yml @@ -0,0 +1,36 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-DBMS +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-softwareComponent:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.DBMS: + abstract: true + derived_from: tosca.nodes.SoftwareComponent + description: > + The TOSCA DBMS node represents a typical relational, SQL Database Management System software component or service. + tags: + icon: /images/relational_db.png + properties: + dbms_root_password: + type: string + required: false + description: the root password for the DBMS service. + dbms_port: + type: integer + required: false + description: the port the DBMS service will listen to for data and requests + capabilities: + host: + type: tosca.capabilities.Container + properties: + valid_node_types: [tosca.nodes.Database] + endpoint: + type: tosca.capabilities.DatabaseEndpoint + diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/images/volume.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/images/volume.png new file mode 100644 index 0000000000..16fa17bd70 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/images/volume.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/normative-types-blockStorage.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/normative-types-blockStorage.yml new file mode 100644 index 0000000000..df942b9f4f --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/blockStorage/normative-types-blockStorage.yml @@ -0,0 +1,40 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-blockStorage +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.BlockStorage: + derived_from: tosca.nodes.Root + description: > + The TOSCA BlockStorage node currently represents a server-local block storage device (i.e., not shared) + offering evenly sized blocks of data from which raw storage volumes can be created. + tags: + icon: /images/volume.png + properties: + size: + type: integer + required: false + constraints: + - greater_than: 0 + description: The requested storage size in MegaBytes (MB). + volume_id: + type: string + required: false + description: ID of an existing volume (that is in the accessible scope of the requesting application). + snapshot_id: + type: string + required: false + description: Some identifier that represents an existing snapshot that should be used when creating the block storage (volume). + attributes: + volume_id: + type: string + description: ID provided by the orchestrator for newly created volumes. + requirements: + attachment: + type: tosca.capabilities.Attachment diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/images/compute.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/images/compute.png new file mode 100644 index 0000000000..7d5297eed3 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/images/compute.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/normative-types-compute.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/normative-types-compute.yml new file mode 100644 index 0000000000..3a972a81e0 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/compute/normative-types-compute.yml @@ -0,0 +1,77 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-compute +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + +node_types: + # Infrastructure components + tosca.nodes.Compute: + derived_from: tosca.nodes.Root + description: > + Represents a real or virtual machine or ‘server’. Informations specified on the Compute + node will be used to find the machine that fits the given requirements in the cloud + available machines. If no sizing informations are specified the cloud’s provider default + machine will be used. It is strongly recommended to specify the required cpus and memory + at least. + tags: + icon: /images/compute.png + properties: + num_cpus: + type: integer + required: false + constraints: + - greater_than: 0 + description: Number of (actual or virtual) CPUs associated with the Compute node. + mem_size: + type: integer + required: false + constraints: + - greater_than: 0 + description: Size of memory, in Megabytes (MB), available to applications running on the Compute node. + disk_size: + type: integer + required: false + constraints: + - greater_than: 0 + description: Size of the local disk, in Gigabytes (GB), available to applications running on the Compute node. + os_arch: + type: string + constraints: + - valid_values: ["x86_32", "x86_64"] + description: The host Operating System (OS) architecture. + os_type: + type: string + constraints: + - valid_values: ["linux", "aix", "mac os", "windows"] + description: The host Operating System (OS) type. + os_distribution: + type: string + required: false + description: The host Operating System (OS) distribution. + os_version: + type: string + required: false + description: The host Operating System version. + attributes: + ip_address: + type: string + description: > + The primary IP address assigned by the cloud provider that applications may use to access the Compute node. + Note: This is used by the platform provider to convey the primary address used to access the compute node. Future working drafts will address implementations that support floating or multiple IP addresses. + requirements: + network: + type: tosca.capabilities.Connectivity + lower_bound: 0 + upper_bound: unbounded + capabilities: + host: + type: tosca.capabilities.Container + properties: + valid_node_types: [tosca.nodes.SoftwareComponent] + attach: tosca.capabilities.Attachment + scalable: tosca.capabilities.Scalable diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/database/images/relational_db.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/database/images/relational_db.png new file mode 100644 index 0000000000..a7a632effd Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/database/images/relational_db.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/database/normative-types-database.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/database/normative-types-database.yml new file mode 100644 index 0000000000..38bf5d11db --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/database/normative-types-database.yml @@ -0,0 +1,41 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-database +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-DBMS:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.Database: + derived_from: tosca.nodes.Root + description: > + Base type for the schema and content associated with a DBMS. + The TOSCA Database node represents a logical database that can be managed and hosted by a TOSCA DBMS node. + tags: + icon: /images/relational_db.png + properties: + db_user: + type: string + required: false + description: The special user account used for database administration. + db_password: + type: string + required: false + description: The password associated with the user account provided in the ‘db_user’ property. + db_port: + type: integer + required: false + description: The port on which the underlying database service will listen to data. + db_name: + type: string + required: false + description: The logical name of the database. + requirements: + - host: tosca.nodes.DBMS + relationship_type: tosca.relationships.HostedOn + capabilities: + database_endpoint: tosca.capabilities.DatabaseEndpoint diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/network/images/network.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/network/images/network.png new file mode 100644 index 0000000000..c8bf18f31a Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/network/images/network.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/network/normative-types-network.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/network/normative-types-network.yml new file mode 100644 index 0000000000..bb860f82be --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/network/normative-types-network.yml @@ -0,0 +1,39 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-network +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.Network: + derived_from: tosca.nodes.Root + description: > + The TOSCA Network node represents a simple, logical network service. + properties: + ip_version: + type: integer + required: false + default: 4 + constraints: + - valid_values: [ 4, 6 ] + cidr: + type: string + required: false + gateway_ip: + type: string + required: false + network_name: + type: string + required: false + network_id: + type: string + required: false + capabilities: + connection: + type: tosca.capabilities.Connectivity + tags: + icon: /images/network.png diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/images/objectstore.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/images/objectstore.png new file mode 100644 index 0000000000..2b2063c4f7 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/images/objectstore.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/normative-types-objectStorage.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/normative-types-objectStorage.yml new file mode 100644 index 0000000000..a56fad5363 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/objectStorage/normative-types-objectStorage.yml @@ -0,0 +1,35 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-objectStorage +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.ObjectStorage: + abstract: true + derived_from: tosca.nodes.Root + description: > + The TOSCA ObjectStorage node represents storage that provides the ability to store data as objects (or BLOBs of data) + without consideration for the underlying filesystem or devices. + tags: + icon: /images/objectstore.png + properties: + store_name: + type: string + description: The logical name of the object store (or container). + store_size: + type: integer + required: false + constraints: + - greater_or_equal: 0 + description: The requested initial storage size in Gigabytes. + store_maxsize: + type: integer + required: false + constraints: + - greater_than: 0 + description: The requested maximum storage size in Gigabytes. diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/root/images/root.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/root/images/root.png new file mode 100644 index 0000000000..170f1c3c27 Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/root/images/root.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/root/normative-types-root.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/root/normative-types-root.yml new file mode 100644 index 0000000000..7f4c16c260 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/root/normative-types-root.yml @@ -0,0 +1,168 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-root +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. + +node_types: + tosca.nodes.Root: + abstract: true + description: > + This is the default (root) TOSCA Node Type that all other TOSCA nodes should extends. + This allows all TOSCA nodes to have a consistent set of features for modeling and management + (e.g, consistent definitions for requirements, capabilities, and lifecycle interfaces). + tags: + icon: /images/root.png + attributes: + tosca_id: + type: string + tosca_name: + type: string + requirements: + dependency: + type: tosca.capabilities.Root + lower_bound: 0 + upper_bound: unbounded + capabilities: + root: + type: tosca.capabilities.Root + interfaces: + tosca.interfaces.node.lifecycle.Standard: + description: > + This lifecycle interface defines the essential, normative operations that TOSCA nodes may support. + create: + description: Standard lifecycle create operation. + configure: + description: Standard lifecycle configure operation (pre-start). + start: + description: Standard lifecycle start operation. + post_start: + description: Standard lifecycle post-configure operation (post-start) + stop: + description: Standard lifecycle stop operation. + delete: + description: Standard lifecycle delete operation. + + +capability_types: + tosca.capabilities.Root: + description: This is the default (root) TOSCA Capability Type definition that all other TOSCA Capability Types derive from. + tosca.capabilities.Container: + derived_from: tosca.capabilities.Root + properties: + valid_node_types: + type: string + required: true + description: > + A list of one or more names of Node Types that are supported as containees that declare the Container type as a Capability. + tosca.capabilities.Endpoint: + derived_from: tosca.capabilities.Root + properties: + protocol: + type: string + default: tcp + port: + type: integer + required: false + constraints: + - greater_or_equal: 1 + - less_or_equal: 65535 + secure: + type: boolean + default: false + url_path: + type: string + required: false + tosca.capabilities.DatabaseEndpoint: + derived_from: tosca.capabilities.Endpoint + description: This is the default TOSCA type that should be used or extended to define a specialized database endpoint capability. + tosca.capabilities.Attachment: + derived_from: tosca.capabilities.Root + description: This is the default TOSCA type that should be used or extended to define a network endpoint capability. + tosca.capabilities.Scalable: + derived_from: tosca.capabilities.Root + properties: + min_intances: + type: integer + default: 1 + max_intances: + type: integer + default: 1 + default_instances: + type: integer + default: 1 + tosca.capabilities.Connectivity: + derived_from: tosca.capabilities.Root + +relationship_types: + tosca.relationships.Root: + abstract: true + description: This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from. + valid_targets: [ tosca.capabilities.Root ] + attributes: + tosca_id: + type: string + tosca_name: + type: string + interfaces: + tosca.interfaces.relationship.Configure: + description: > + The lifecycle interfaces define the essential, normative operations that each TOSCA Relationship Types may support. + pre_configure_source: + description: Operation to pre-configure the source endpoint. + pre_configure_target: + description: Operation to pre-configure the target endpoint. + post_configure_source: + description: Operation to post-configure the source endpoint. + post_configure_target: + description: Operation to post-configure the target endpoint. + add_target: + description: Operation to notify the source node of a target node being added via a relationship. + add_source: + description: Operation to notify the target node of a source node which is now available via a relationship. + remove_target: + description: Operation to notify the source node of a target node being removed from a relationship. + remove_source: + description: Operation to notify the target node of a source node being removed from a relationship. + target_changed: + description: Operation to notify source some property or attribute of the target. + source_changed: + description: Operation to notify target some property or attribute of the source. + tosca.relationships.DependsOn: + derived_from: tosca.relationships.Root + description: > + A generic depends on relationship. + tosca.relationships.HostedOn: + derived_from: tosca.relationships.DependsOn + description: Relationship to use to describe that the source is hosted (installed/ deployed) on the target node. + valid_targets: [ tosca.capabilities.Container ] + tosca.relationships.ConnectsTo: + derived_from: tosca.relationships.DependsOn + valid_targets: [ tosca.capabilities.Endpoint ] + tosca.relationships.AttachTo: + derived_from: tosca.relationships.Root + valid_targets: [ tosca.capabilities.Attachment ] + properties: + location: + type: string + constraints: + - min_length: 1 + device: + type: string + required: false + tosca.relationships.Network: + derived_from: tosca.relationships.Root + valid_sources: [ tosca.capabilities.Connectivity ] + valid_targets: [ tosca.capabilities.Connectivity ] + +artifact_types: + tosca.artifacts.Root: + description: The TOSCA Artifact Type all other TOSCA Artifact Types derive from. + tosca.artifacts.File: + derived_from: tosca.artifacts.Root + description: This artifact type is used when an artifact definition needs to have its associated file simply treated as a file and no special handling/handlers are invoked. + tosca.artifacts.ShellScript: + description: A shell script (.sh file) + file_ext: [ sh ] diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/images/software.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/images/software.png new file mode 100644 index 0000000000..dc9c53245d Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/images/software.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/normative-types-softwareComponent.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/normative-types-softwareComponent.yml new file mode 100644 index 0000000000..04e04af640 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/softwareComponent/normative-types-softwareComponent.yml @@ -0,0 +1,25 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-softwareComponent +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-compute:1.0.0.wd03-SNAPSHOT" + +node_types: + + tosca.nodes.SoftwareComponent: + abstract: true + derived_from: tosca.nodes.Root + description: > + The TOSCA SoftwareComponent Node Type represents a generic software component + that can be managed and run by a TOSCA Compute Node Type. + requirements: + - host: tosca.nodes.Compute + type: tosca.relationships.HostedOn + tags: + icon: /images/software.png + diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/images/network.png b/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/images/network.png new file mode 100644 index 0000000000..c8bf18f31a Binary files /dev/null and b/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/images/network.png differ diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/normative-types-webApplication.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/normative-types-webApplication.yml new file mode 100644 index 0000000000..ded008ebdf --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/webApplication/normative-types-webApplication.yml @@ -0,0 +1,21 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-webApplication +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-webServer:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.WebApplication: + derived_from: tosca.nodes.Root + 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. + tags: + icon: /images/network.png + requirements: + - host: tosca.nodes.WebServer + type: tosca.relationships.HostedOn diff --git a/asdc-tests/src/test/resources/CI/components/normativeTypes/webServer/normative-types-webServer.yml b/asdc-tests/src/test/resources/CI/components/normativeTypes/webServer/normative-types-webServer.yml new file mode 100644 index 0000000000..1c2e4b2ea5 --- /dev/null +++ b/asdc-tests/src/test/resources/CI/components/normativeTypes/webServer/normative-types-webServer.yml @@ -0,0 +1,24 @@ +tosca_definitions_version: tosca_simple_yaml_1_0_0_wd03 + +template_name: tosca-normative-types-webServer +template_author: TOSCA TC +template_version: 1.0.0.wd03-SNAPSHOT + +description: Contains the normative types definition. +imports: + - "tosca-normative-types-root:1.0.0.wd03-SNAPSHOT" + - "tosca-normative-types-softwareComponent:1.0.0.wd03-SNAPSHOT" + +node_types: + tosca.nodes.WebServer: + abstract: true + derived_from: tosca.nodes.SoftwareComponent + description: > + The TOSCA WebServer Node Type represents an abstract software component or service that is capable of hosting and providing management operations for one or more WebApplication nodes + capabilities: + app_endpoint: tosca.capabilities.Endpoint + secure_endpoint: tosca.capabilities.Endpoint + host: + type: tosca.capabilities.Container + properties: + valid_node_types: [ tosca.nodes.WebApplication ] -- cgit 1.2.3-korg