aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/test/resources
diff options
context:
space:
mode:
authorshiria <shiri.amichai@amdocs.com>2018-06-04 11:07:29 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-06-05 14:31:34 +0000
commit09c6320df7f768e42edeaedd7ba69e6fb13d433d (patch)
tree92883e0297c3d47ab039685ca91f2f47a1dbcd46 /openecomp-be/lib/openecomp-tosca-lib/src/test/resources
parentd9cae980e80021dfad0bc9366d32d2cf996cfa90 (diff)
fix get flat node type
update node type interface update return value to object which include the type hierarchy Change-Id: I97623c7bbad0223a174370d13aabf4c3efe9c21e Issue-ID: SDC-1394 Signed-off-by: shiria <shiri.amichai@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/test/resources')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateInterfaceInheritanceTest.yaml232
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml3
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/_index.yml37
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/artifacts.yml55
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/capabilities.yml230
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/data.yml191
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/groups.yml30
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/interfaces.yml61
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/nodes.yml371
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/policies.yml43
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/relationships.yml106
11 files changed, 1359 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateInterfaceInheritanceTest.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateInterfaceInheritanceTest.yaml
new file mode 100644
index 0000000000..4abc7ca681
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/analyzerService/ServiceTemplateInterfaceInheritanceTest.yaml
@@ -0,0 +1,232 @@
+tosca_definitions_version: tosca_simple_yaml_1_0_0
+metadata:
+ template_name: nested
+imports:
+- NovaServerGlobalTypes:
+ file: NovaServerGlobalTypesServiceTemplate.yaml
+node_types:
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
+ properties:
+ admin_pass:
+ description: The administrator password for the server
+ type: string
+ status: SUPPORTED
+ default: overridden default value
+ required: false
+ new_property:
+ description: new property
+ type: string
+ status: SUPPORTED
+ required: false
+ interfaces:
+ Standard:
+ type: tosca.interfaces.node.lifecycle.Standard
+ inputs:
+ url_path:
+ type: string
+ interfaceID:
+ type: string
+ create:
+ inputs:
+ peering:
+ type: string
+ config:
+ inputs:
+ name:
+ type: string
+ org.openecomp.resource.vfc.nodes.heat.cmaui_image_extend:
+ derived_from: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ interfaces:
+ Standard:
+ inputs:
+ url_path:
+ type: string
+ required: false
+ type: tosca.interfaces.node.lifecycle.Standard
+ create:
+ inputs:
+ peeringSessions:
+ type: string
+ name:
+ type: string
+ start:
+ inputs:
+ time:
+ type: string
+
+data_types:
+ org.openecomp.datatypes.heat.network.MyAddressPair:
+ derived_from: org.openecomp.datatypes.heat.network.AddressPair
+ description: My MAC/IP address pairs
+ properties:
+ mac_address:
+ description: MAC address
+ type: string
+ status: SUPPORTED
+ required: false
+ default: overridden default value
+ new_property:
+ description: new property
+ type: string
+ status: SUPPORTED
+ required: false
+ org.openecomp.datatypes.heat.network.MyNewAddressPair:
+ derived_from: org.openecomp.datatypes.heat.network.MyAddressPair
+ description: My new MAC/IP address pairs
+ properties:
+ mac_address:
+ description: MAC address
+ type: string
+ status: SUPPORTED
+ required: true
+ default: overridden default value
+topology_template:
+ inputs:
+ cmaui_names:
+ hidden: false
+ immutable: false
+ type: list
+ description: CMAUI1, CMAUI2 server names
+ entry_schema:
+ type: String
+ p1:
+ hidden: false
+ immutable: false
+ type: string
+ description: UID of OAM network
+ cmaui_image:
+ hidden: false
+ immutable: false
+ type: string
+ description: Image for CMAUI server
+ cmaui_flavor:
+ hidden: false
+ immutable: false
+ type: string
+ description: Flavor for CMAUI server
+ security_group_name:
+ hidden: false
+ immutable: false
+ description: not impotrtant
+ availability_zone_0:
+ label: availabilityzone name
+ hidden: false
+ immutable: false
+ type: string
+ description: availabilityzone name
+ node_templates:
+ server_cmaui:
+ type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
+ properties:
+ flavor:
+ get_input: cmaui_flavor
+ availability_zone:
+ get_input: availability_zone_0
+ image:
+ get_input: cmaui_image
+ name:
+ get_input:
+ - cmaui_names
+ - 0
+ cmaui_port_0:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 0
+ network:
+ get_input: p1
+ requirements:
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ cmaui1_port_1:
+ type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
+ properties:
+ replacement_policy: AUTO
+ security_groups:
+ - get_input: security_group_name
+ fixed_ips:
+ - subnet: subnetNameVal
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ - subnet: subnetNameVal2
+ ip_address:
+ get_input:
+ - cmaui_oam_ips
+ - 1
+ network: jsa_net
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net1
+ relationship: tosca.relationships.network.LinksTo
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ node: jsa_net2
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ node: server_cmaui
+ relationship: tosca.relationships.network.BindsTo
+ jsa_net1:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ jsa_net2:
+ type: org.openecomp.resource.vl.nodes.heat.network.neutron.Net
+ properties:
+ shared: true
+ network_name:
+ get_input: jsa_net_name
+ groups:
+ nested:
+ type: org.openecomp.groups.heat.HeatStack
+ properties:
+ heat_file: ../Artifacts/nested.yml
+ description: cmaui server template for vMMSC
+ members:
+ - server_cmaui
+ - cmaui_port_0
+ substitution_mappings:
+ node_type: org.openecomp.resource.abstract.nodes.heat.nested
+ capabilities:
+ host_server_cmaui:
+ - server_cmaui
+ - host
+ os_server_cmaui:
+ - server_cmaui
+ - os
+ endpoint_server_cmaui:
+ - server_cmaui
+ - endpoint
+ binding_server_cmaui:
+ - server_cmaui
+ - binding
+ scalable_server_cmaui:
+ - server_cmaui
+ - scalable
+ attachment_cmaui_port_0:
+ - cmaui_port_0
+ - attachment
+ requirements:
+ local_storage_server_cmaui:
+ - server_cmaui
+ - local_storage
+ link_cmaui_port_0:
+ - cmaui_port_0
+ - link
+ link_cmaui_port_invalid:
+ - cmaui_port_9
+ - link
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
index 1a183e9c50..5b85d5047b 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/CommonGlobalTypesServiceTemplate.yaml
@@ -3,6 +3,9 @@ metadata:
template_name: CommonGlobalTypes
template_version: 1.0.0
description: TOSCA Global Types
+imports:
+- toscaIndex:
+ file: _index.yml
data_types:
org.openecomp.datatypes.heat.network.AddressPair:
derived_from: tosca.datatypes.Root
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/_index.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/_index.yml
new file mode 100644
index 0000000000..1ad0aa3a2d
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/_index.yml
@@ -0,0 +1,37 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: _index.yml
+ version: '1.0'
+
+imports:
+- capabilities:
+ file: capabilities.yml
+- nodes:
+ file: nodes.yml
+- relationships:
+ file: relationships.yml
+- groups:
+ file: groups.yml
+- data:
+ file: data.yml
+- interfaces:
+ file: interfaces.yml
+- artifacts:
+ file: artifacts.yml
+- policies:
+ file: policies.yml \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/artifacts.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/artifacts.yml
new file mode 100644
index 0000000000..8f69e5ebb7
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/artifacts.yml
@@ -0,0 +1,55 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: artifacts.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+artifact_types:
+ tosca.artifacts.Root:
+ description: This is the default (root) TOSCA Artifact Type definition that all other TOSCA base Artifact Types derive from.
+
+ tosca.artifacts.Deployment.Image:
+ derived_from: tosca.artifacts.Deployment
+ description: This artifact type represents a parent type for any "image" which is an opaque packaging of a TOSCA Node's deployment (whether real or virtual) whose contents are typically already installed and pre-configured (i.e., "stateful") and prepared to be run on a known target container.
+
+ tosca.artifacts.Implementation.Bash:
+ derived_from: tosca.artifacts.Implementation
+ description: This artifact type represents a Bash script type that contains Bash commands that can be executed on the Unix Bash shell.
+
+ tosca.artifacts.Deployment.Image.VM:
+ derived_from: tosca.artifacts.Deployment
+ description: This artifact represents the parent type for all Virtual Machine (VM) image and container formatted deployment artifacts. These images contain a stateful capture of a machine (e.g., server) including operating system and installed software along with any configurations and can be run on another machine using a hypervisor which virtualizes typical server (i.e., hardware) resources.
+
+ tosca.artifacts.Implementation.Python:
+ derived_from: tosca.artifacts.Implementation
+ description: This artifact type represents a Python file that contains Python language constructs that can be executed within a Python interpreter.
+
+ tosca.artifacts.Deployment:
+ derived_from: tosca.artifacts.Root
+ description: This artifact type represents the parent type for all deployment artifacts in TOSCA. This class of artifacts typically represents a binary packaging of an application or service that is used to install/create or deploy it as part of a node's lifecycle.
+
+ 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 (i.e., it is not treated as either an implementation or deployment artifact type).
+
+ tosca.artifacts.Implementation:
+ derived_from: tosca.artifacts.Root
+ description: This artifact type represents the parent type for all implementation artifacts in TOSCA. These artifacts are used to implement operations of TOSCA interfaces either directly (e.g., scripts) or indirectly (e.g., config. files).
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/capabilities.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/capabilities.yml
new file mode 100644
index 0000000000..31653d927a
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/capabilities.yml
@@ -0,0 +1,230 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: capabilities.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+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.Node:
+ derived_from: tosca.capabilities.Root
+ description: The Node capability indicates the base capabilities of a TOSCA Node Type.
+
+ tosca.capabilities.Container:
+ derived_from: tosca.capabilities.Root
+ description: The Container capability, when included on a Node Type or Template definition, indicates that the node can act as a container for (or a host for) one or more other declared Node Types.
+ properties:
+ num_cpus:
+ description: Number of (actual or virtual) CPUs associated with the Compute node.
+ type: integer
+ required: false
+ constraints:
+ - greater_or_equal: 1
+ cpu_frequency:
+ description: Specifies the operating frequency of CPU's core. This property expresses the expected frequency of one (1) CPU as provided by the property "num_cpus".
+ type: scalar-unit.frequency
+ required: false
+ constraints:
+ - greater_or_equal: 0.1 GHz
+ disk_size:
+ description: Size of the local disk available to applications running on the Compute node (default unit is MB).
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 MB
+ mem_size:
+ description: Size of memory available to applications running on the Compute node (default unit is MB).
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 MB
+
+ tosca.capabilities.Endpoint:
+ derived_from: tosca.capabilities.Root
+ description: This is the default TOSCA type that should be used or extended to define a network endpoint capability. This includes the information to express a basic endpoint with a single port or a complex endpoint with multiple ports. By default the Endpoint is assumed to represent an address on a private network unless otherwise specified.
+ properties:
+ protocol:
+ description: 'The name of the protocol (i.e., the protocol prefix) that the
+ endpoint accepts (any OSI Layer 4-7 protocols). Examples: http, https, ftp,
+ tcp, udp, etc.'
+ type: string
+ default: tcp
+ required: true
+ port:
+ description: The optional port of the endpoint.
+ type: tosca.datatypes.network.PortDef
+ required: false
+ secure:
+ description: Requests for the endpoint to be secure and use credentials supplied on the ConnectsTo relationship.
+ type: boolean
+ default: false
+ required: false
+ url_path:
+ description: The optional URL path of the endpoint's address if applicable for the protocol.
+ type: string
+ required: false
+ port_name:
+ description: The optional name (or ID) of the network port this endpoint should be bound to.
+ type: string
+ required: false
+ network_name:
+ description: 'The optional name (or ID) of the network this endpoint should
+ be bound to. network_name: PRIVATE | PUBLIC | <network_name> | <network_id>.'
+ type: string
+ default: PRIVATE
+ required: false
+ initiator:
+ description: The optional indicator of the direction of the connection.
+ type: string
+ default: source
+ required: false
+ constraints:
+ - valid_values:
+ - source
+ - target
+ - peer
+ ports:
+ description: The optional map of ports the Endpoint supports (if more than one).
+ type: map
+ entry_schema:
+ type: tosca.datatypes.network.PortSpec
+ required: false
+ constraints:
+ - min_length: 1
+ attributes:
+ ip_address:
+ description: 'Note: This is the IP address as propagated up by the associated
+ node''s host (Compute) container.'
+ type: string
+
+ tosca.capabilities.Endpoint.Public:
+ derived_from: tosca.capabilities.Endpoint
+ description: |-
+ This capability represents a public endpoint which is accessible to the general internet (and its public IP address ranges).
+ This public endpoint capability also can be used to create a floating (IP) address that the underlying network assigns from a pool allocated from the application's underlying public network. This floating address is managed by the underlying network such that can be routed an application's private address and remains reliable to internet clients.
+ properties:
+ network_name:
+ type: string
+ default: PUBLIC
+ constraints:
+ - equal: PUBLIC
+
+ tosca.capabilities.Endpoint.Admin:
+ derived_from: tosca.capabilities.Endpoint
+ description: This is the default TOSCA type that should be used or extended to define a specialized administrator endpoint capability.
+ properties:
+ secure:
+ description: Requests for the endpoint to be secure and use credentials supplied on the ConnectsTo relationship.
+ type: boolean
+ default: true
+ constraints:
+ - equal: true
+
+ tosca.capabilities.Endpoint.Database:
+ 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 an attachment capability of a (logical) infrastructure device node (e.g., BlockStorage node).
+
+ tosca.capabilities.OperatingSystem:
+ derived_from: tosca.capabilities.Root
+ description: This is the default TOSCA type that should be used to express an Operating System capability for a node.
+ properties:
+ architecture:
+ description: 'The Operating System (OS) architecture. Examples of valid values
+ include: x86_32, x86_64, etc.'
+ type: string
+ required: false
+ type:
+ description: 'The Operating System (OS) type. Examples of valid values include:
+ linux, aix, mac, windows, etc.'
+ type: string
+ required: false
+ distribution:
+ description: 'The Operating System (OS) distribution. Examples of valid values
+ for a "type" of "Linux" would include: debian, fedora, rhel and ubuntu.'
+ type: string
+ required: false
+ version:
+ description: The Operating System version.
+ type: version
+ required: false
+
+ tosca.capabilities.Scalable:
+ derived_from: tosca.capabilities.Root
+ description: This is the default TOSCA type that should be used to express a scalability capability for a node.
+ properties:
+ min_instances:
+ description: This property is used to indicate the minimum number of instances that should be created for the associated TOSCA Node Template by a TOSCA orchestrator.
+ type: integer
+ default: 1
+ max_instances:
+ description: This property is used to indicate the maximum number of instances that should be created for the associated TOSCA Node Template by a TOSCA orchestrator.
+ type: integer
+ default: 1
+ default_instances:
+ description: 'An optional property that indicates the requested default number
+ of instances that should be the starting number of instances a TOSCA orchestrator
+ should attempt to allocate. Note: The value for this property MUST be in
+ the range between the values set for "min_instances" and "max_instances"
+ properties.'
+ type: integer
+ required: false
+
+ tosca.capabilities.network.Bindable:
+ derived_from: tosca.capabilities.Node
+ description: A node type that includes the Bindable capability indicates that it can be bound to a logical network association via a network port.
+
+ tosca.capabilities.network.Linkable:
+ derived_from: tosca.capabilities.Node
+ description: A node type that includes the Linkable capability indicates that it can be pointed by tosca.relationships.network.LinksTo relationship type.
+
+ tosca.capabilities.Container.Docker:
+ derived_from: tosca.capabilities.Container
+ properties:
+ version:
+ type: list
+ entry_schema:
+ type: version
+ required: false
+ publish_all:
+ type: boolean
+ default: false
+ required: false
+ publish_ports:
+ type: list
+ entry_schema:
+ type: PortSpec
+ required: false
+ expose_ports:
+ type: list
+ entry_schema:
+ type: PortSpec
+ required: false
+ volumes:
+ type: list
+ entry_schema:
+ type: string
+ required: false
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/data.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/data.yml
new file mode 100644
index 0000000000..3197845dfd
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/data.yml
@@ -0,0 +1,191 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: data.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+data_types:
+ tosca.datatypes.Root:
+ description: The TOSCA root Data Type all other TOSCA base Data Types derive from
+
+ string:
+ derived_from: tosca.datatypes.Root
+
+ integer:
+ derived_from: tosca.datatypes.Root
+
+ boolean:
+ derived_from: tosca.datatypes.Root
+
+ float:
+ derived_from: tosca.datatypes.Root
+
+ range:
+ derived_from: tosca.datatypes.Root
+
+ list:
+ derived_from: tosca.datatypes.Root
+
+ map:
+ derived_from: tosca.datatypes.Root
+
+ timestamp:
+ derived_from: tosca.datatypes.Root
+
+ version:
+ derived_from: tosca.datatypes.Root
+
+ scalar-unit.size:
+ derived_from: tosca.datatypes.Root
+
+ scalar-unit.frequency:
+ derived_from: tosca.datatypes.Root
+
+ scalar-unit.time:
+ derived_from: tosca.datatypes.Root
+
+ tosca.datatypes.network.NetworkInfo:
+ derived_from: tosca.datatypes.Root
+ description: The Network type is a complex TOSCA data type used to describe logical network information.
+ properties:
+ network_name:
+ description: The name of the logical network. e.g., "public", "private", "admin". etc.
+ type: string
+ required: false
+ network_id:
+ description: The unique ID of for the network generated by the network provider.
+ type: string
+ required: false
+ addresses:
+ description: The list of IP addresses assigned from the underlying network.
+ type: list
+ entry_schema:
+ type: string
+ required: false
+
+ tosca.datatypes.TimeInterval:
+ derived_from: tosca.datatypes.Root
+ properties:
+ start_time:
+ type: timestamp
+ required: true
+ end_time:
+ type: timestamp
+ required: true
+
+ tosca.datatypes.network.PortSpec:
+ derived_from: tosca.datatypes.Root
+ description: The PortSpec type is a complex TOSCA data Type used when describing port specifications for a network connection.
+ properties:
+ protocol:
+ description: The required protocol used on the port.
+ type: string
+ default: tcp
+ constraints:
+ - valid_values:
+ - udp
+ - tcp
+ - igmp
+ source:
+ description: The optional source port.
+ type: tosca.datatypes.network.PortDef
+ required: false
+ source_range:
+ description: The optional range for source port.
+ type: range
+ required: false
+ constraints:
+ - in_range:
+ - 1
+ - 65535
+ target:
+ description: The optional target port.
+ type: tosca.datatypes.network.PortDef
+ required: false
+ target_range:
+ description: The optional range for target port.
+ type: range
+ required: false
+ constraints:
+ - in_range:
+ - 1
+ - 65535
+
+ tosca.datatypes.network.PortDef:
+ derived_from: integer
+ description: The PortDef type is a TOSCA data Type used to define a network port.
+ constraints:
+ - in_range:
+ - 1
+ - 65535
+
+ tosca.datatypes.network.PortInfo:
+ derived_from: tosca.datatypes.Root
+ description: The PortInfo type is a complex TOSCA data type used to describe network port information.
+ properties:
+ port_name:
+ description: The logical network port name.
+ type: string
+ required: false
+ port_id:
+ description: The unique ID for the network port generated by the network provider.
+ type: string
+ required: false
+ network_id:
+ description: The unique ID for the network.
+ type: string
+ required: false
+ mac_address:
+ description: The unique media access control address (MAC address) assigned to the port.
+ type: string
+ required: false
+ addresses:
+ description: The list of IP address(es) assigned to the port.
+ type: list
+ entry_schema:
+ type: string
+ required: false
+
+ tosca.datatypes.Credential:
+ derived_from: tosca.datatypes.Root
+ description: The Credential type is a complex TOSCA data Type used when describing authorization credentials used to access network accessible resources.
+ properties:
+ protocol:
+ description: The optional protocol name.
+ type: string
+ required: false
+ token_type:
+ description: The required token type.
+ type: string
+ default: password
+ token:
+ description: The required token used as a credential for authorization or access to a networked resource.
+ type: string
+ keys:
+ description: The optional list of protocol-specific keys or assertions.
+ type: map
+ entry_schema:
+ type: string
+ required: false
+ user:
+ description: The optional user (name or ID) used for non-token based credentials.
+ type: string
+ required: false
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/groups.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/groups.yml
new file mode 100644
index 0000000000..e7e7417baa
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/groups.yml
@@ -0,0 +1,30 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: groups.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+group_types:
+ tosca.groups.Root:
+ description: This is the default (root) TOSCA Group Type definition that all other TOSCA base Group Types derive from.
+ interfaces:
+ Standard:
+ type: tosca.interfaces.node.lifecycle.Standard
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/interfaces.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/interfaces.yml
new file mode 100644
index 0000000000..75a8760791
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/interfaces.yml
@@ -0,0 +1,61 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: interfaces.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+interface_types:
+ tosca.interfaces.Root:
+ description: This is the default (root) TOSCA Interface Type definition that all other TOSCA Interface Types derive from.
+
+ tosca.interfaces.node.lifecycle.Standard:
+ derived_from: tosca.interfaces.Root
+ description: This lifecycle interface defines the essential, normative operations that TOSCA nodes may support.
+ stop:
+ description: Standard lifecycle stop operation.
+ start:
+ description: Standard lifecycle start operation.
+ create:
+ description: Standard lifecycle create operation.
+ configure:
+ description: Standard lifecycle configure operation.
+ delete:
+ description: Standard lifecycle delete operation.
+
+ tosca.interfaces.relationship.Configure:
+ derived_from: tosca.interfaces.Root
+ 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.
+ target_changed:
+ description: Operation to notify source some property or attribute of the target changed
+ remove_target:
+ description: Operation to remove a target node. \ No newline at end of file
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/nodes.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/nodes.yml
new file mode 100644
index 0000000000..ec06d6dd52
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/nodes.yml
@@ -0,0 +1,371 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: nodes.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+node_types:
+ tosca.nodes.Root:
+ description: The TOSCA Root Node Type is the default type that all other TOSCA base Node Types derive from. This allows for all TOSCA nodes to have a consistent set of features for modeling and management (e.g., consistent definitions for requirements, capabilities and lifecycle interfaces).
+ attributes:
+ tosca_id:
+ description: A unique identifier of the realized instance of a Node Template that derives from any TOSCA normative type.
+ type: string
+ tosca_name:
+ description: This attribute reflects the name of the Node Template as defined in the TOSCA service template. This name is not unique to the realized instance model of corresponding deployed application as each template in the model can result in one or more instances (e.g., scaled) when orchestrated to a provider environment.
+ type: string
+ state:
+ description: The state of the node instance.
+ type: string
+ default: initial
+ capabilities:
+ feature:
+ type: tosca.capabilities.Node
+ requirements:
+ - dependency:
+ capability: tosca.capabilities.Node
+ node: tosca.nodes.Root
+ relationship: tosca.relationships.DependsOn
+ occurrences:
+ - 0
+ - UNBOUNDED
+ interfaces:
+ Standard:
+ type: tosca.interfaces.node.lifecycle.Standard
+
+ tosca.nodes.ObjectStorage:
+ 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.
+ properties:
+ name:
+ description: The logical name of the object store (or container).
+ type: string
+ size:
+ description: The requested initial storage size (default unit is in Gigabytes).
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 GB
+ maxsize:
+ description: The requested maximum storage size (default unit is in Gigabytes).
+ type: scalar-unit.size
+ required: false
+ constraints:
+ - greater_or_equal: 0 GB
+ capabilities:
+ storage_endpoint:
+ type: tosca.capabilities.Endpoint
+
+ tosca.nodes.DBMS:
+ derived_from: tosca.nodes.SoftwareComponent
+ description: The TOSCA DBMS node represents a typical relational, SQL Database Management System software component or service.
+ properties:
+ root_password:
+ description: The optional root password for the DBMS server.
+ type: string
+ required: false
+ port:
+ description: The DBMS server's port.
+ type: integer
+ required: false
+ capabilities:
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.Database
+
+ 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.
+ properties:
+ context_root:
+ description: The web application's context root which designates the application's URL path within the web server it is hosted on.
+ type: string
+ required: false
+ capabilities:
+ app_endpoint:
+ type: tosca.capabilities.Endpoint
+ requirements:
+ - host:
+ capability: tosca.capabilities.Container
+ node: tosca.nodes.WebServer
+ relationship: tosca.relationships.HostedOn
+
+ tosca.nodes.Compute:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA Compute node represents one or more real or virtual processors of software applications or services along with other essential local resources. Collectively, the resources the compute node represents can logically be viewed as a (real or virtual) "server".
+ attributes:
+ private_address:
+ description: The primary private IP address assigned by the cloud provider that applications may use to access the Compute node.
+ type: string
+ public_address:
+ description: The primary public IP address assigned by the cloud provider that applications may use to access the Compute node.
+ type: string
+ networks:
+ description: The list of logical networks assigned to the compute host instance and information about them.
+ type: map
+ entry_schema:
+ type: tosca.datatypes.network.NetworkInfo
+ ports:
+ description: The list of logical ports assigned to the compute host instance and information about them.
+ type: map
+ entry_schema:
+ type: tosca.datatypes.network.PortInfo
+ capabilities:
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.SoftwareComponent
+ binding:
+ type: tosca.capabilities.network.Bindable
+ os:
+ type: tosca.capabilities.OperatingSystem
+ scalable:
+ type: tosca.capabilities.Scalable
+ endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ requirements:
+ - local_storage:
+ capability: tosca.capabilities.Attachment
+ node: tosca.nodes.BlockStorage
+ relationship: tosca.relationships.AttachesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.network.Network:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA Network node represents a simple, logical network service.
+ properties:
+ ip_version:
+ description: The IP version of the requested network.
+ type: integer
+ default: 4
+ required: false
+ constraints:
+ - valid_values:
+ - 4
+ - 6
+ cidr:
+ description: The cidr block of the requested network.
+ type: string
+ required: false
+ start_ip:
+ description: The IP address to be used as the 1st one in a pool of addresses derived from the cidr block full IP range.
+ type: string
+ required: false
+ end_ip:
+ description: The IP address to be used as the last one in a pool of addresses derived from the cidr block full IP range.
+ type: string
+ required: false
+ gateway_ip:
+ description: The gateway IP address.
+ type: string
+ required: false
+ network_name:
+ description: An Identifier that represents an existing Network instance in the underlying cloud infrastructure - OR - be used as the name of the new created network.
+ type: string
+ required: false
+ network_id:
+ description: An Identifier that represents an existing Network instance in the underlying cloud infrastructure. This property is mutually exclusive with all other properties except network_name.
+ type: string
+ required: false
+ segmentation_id:
+ description: A segmentation identifier in the underlying cloud infrastructure (e.g., VLAN id, GRE tunnel id). If the segmentation_id is specified, the network_type or physical_network properties should be provided as well.
+ type: string
+ required: false
+ network_type:
+ description: Optionally, specifies the nature of the physical network in the underlying cloud infrastructure. Examples are flat, vlan, gre or vxlan. For flat and vlan types, physical_network should be provided too.
+ type: string
+ required: false
+ physical_network:
+ description: Optionally, identifies the physical network on top of which the network is implemented, e.g. physnet1. This property is required if network_type is flat or vlan.
+ type: string
+ required: false
+ dhcp_enabled:
+ description: Indicates the TOSCA container to create a virtual network instance with or without a DHCP service.
+ type: boolean
+ default: true
+ required: false
+ capabilities:
+ link:
+ type: tosca.capabilities.network.Linkable
+
+ tosca.nodes.WebServer:
+ derived_from: tosca.nodes.SoftwareComponent
+ description: This 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:
+ data_endpoint:
+ type: tosca.capabilities.Endpoint
+ admin_endpoint:
+ type: tosca.capabilities.Endpoint.Admin
+ host:
+ type: tosca.capabilities.Container
+ valid_source_types:
+ - tosca.nodes.WebApplication
+
+ tosca.nodes.Container.Application:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA Container Application node represents an application that requires Container-level virtualization technology.
+ requirements:
+ - host:
+ capability: tosca.capabilities.Container
+ relationship: tosca.relationships.HostedOn
+
+ tosca.nodes.Container.Runtime:
+ derived_from: tosca.nodes.SoftwareComponent
+ description: The TOSCA Container Runtime node represents operating system-level virtualization technology used to run multiple application services on a single Compute host.
+ capabilities:
+ host:
+ type: tosca.capabilities.Container
+ scalable:
+ type: tosca.capabilities.Scalable
+
+ tosca.nodes.SoftwareComponent:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA SoftwareComponent node represents a generic software component that can be managed and run by a TOSCA Compute Node Type.
+ properties:
+ component_version:
+ description: The optional software component's version.
+ type: version
+ required: false
+ admin_credential:
+ description: The optional credential that can be used to authenticate to the software component.
+ type: tosca.datatypes.Credential
+ required: false
+ requirements:
+ - host:
+ capability: tosca.capabilities.Container
+ node: tosca.nodes.Compute
+ relationship: tosca.relationships.HostedOn
+
+ tosca.nodes.BlockStorage:
+ derived_from: tosca.nodes.Root
+ description: ''
+ properties:
+ size:
+ description: The requested storage size (default unit is MB).
+ type: scalar-unit.size
+ constraints:
+ - greater_or_equal: 1 MB
+ volume_id:
+ description: ID of an existing volume (that is in the accessible scope of the requesting application).
+ type: string
+ required: false
+ snapshot_id:
+ description: Some identifier that represents an existing snapshot that should be used when creating the block storage (volume).
+ type: string
+ required: false
+ capabilities:
+ attachment:
+ type: tosca.capabilities.Attachment
+
+ tosca.nodes.network.Port:
+ derived_from: tosca.nodes.Root
+ description: |-
+ The TOSCA Port node represents a logical entity that associates between Compute and Network normative types.
+ The Port node type effectively represents a single virtual NIC on the Compute node instance.
+ properties:
+ ip_address:
+ description: Allow the user to set a fixed IP address. Note that this address is a request to the provider which they will attempt to fulfill but may not be able to dependent on the network the port is associated with.
+ type: string
+ required: false
+ order:
+ description: 'The order of the NIC on the compute instance (e.g. eth2). Note:
+ when binding more than one port to a single compute (aka multi vNICs) and
+ ordering is desired, it is *mandatory* that all ports will be set with an
+ order value and. The order values must represent a positive, arithmetic
+ progression that starts with 0 (e.g. 0, 1, 2, ..., n).'
+ type: integer
+ default: 0
+ required: false
+ constraints:
+ - greater_or_equal: 0
+ is_default:
+ description: Set is_default=true to apply a default gateway route on the running compute instance to the associated network gateway. Only one port that is associated to single compute node can set as default=true.
+ type: boolean
+ default: false
+ required: false
+ ip_range_start:
+ description: Defines the starting IP of a range to be allocated for the compute instances that are associated by this Port. Without setting this property the IP allocation is done from the entire CIDR block of the network.
+ type: string
+ required: false
+ ip_range_end:
+ description: Defines the ending IP of a range to be allocated for the compute instances that are associated by this Port. Without setting this property the IP allocation is done from the entire CIDR block of the network.
+ type: string
+ required: false
+ attributes:
+ ip_address:
+ description: The IP address would be assigned to the associated compute instance.
+ type: string
+ requirements:
+ - link:
+ capability: tosca.capabilities.network.Linkable
+ relationship: tosca.relationships.network.LinksTo
+ - binding:
+ capability: tosca.capabilities.network.Bindable
+ relationship: tosca.relationships.network.BindsTo
+
+ tosca.nodes.LoadBalancer:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA Load Balancer node represents logical function that be used in conjunction with a Floating Address to distribute an application's traffic (load) across a number of instances of the application (e.g., for a clustered or scaled application).
+ capabilities:
+ client:
+ description: The Floating (IP) client's on the public network can connect to.
+ type: tosca.capabilities.Endpoint.Public
+ occurrences:
+ - 0
+ - UNBOUNDED
+ requirements:
+ - application:
+ capability: tosca.capabilities.Endpoint
+ relationship: tosca.relationships.RoutesTo
+ occurrences:
+ - 0
+ - UNBOUNDED
+
+ tosca.nodes.Database:
+ derived_from: tosca.nodes.Root
+ description: The TOSCA Database node represents a logical database that can be managed and hosted by a TOSCA DBMS node.
+ properties:
+ name:
+ description: The logical database Name.
+ type: string
+ port:
+ description: The port the database service will use to listen for incoming data and requests.
+ type: integer
+ required: false
+ user:
+ description: The special user account used for database administration.
+ type: string
+ required: false
+ password:
+ description: The password associated with the user account provided in the 'user' property.
+ type: string
+ required: false
+ capabilities:
+ database_endpoint:
+ type: tosca.capabilities.Endpoint.Database
+ requirements:
+ - host:
+ capability: tosca.capabilities.Container
+ node: tosca.nodes.DBMS
+ relationship: tosca.relationships.HostedOn
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/policies.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/policies.yml
new file mode 100644
index 0000000000..e2819c5360
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/policies.yml
@@ -0,0 +1,43 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: policies.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+policy_types:
+ tosca.policies.Root:
+ description: This is the default (root) TOSCA Policy Type definition that all other TOSCA base Policy Types derive from.
+
+ tosca.policies.Update:
+ derived_from: tosca.policies.Root
+ description: This is the default (root) TOSCA Policy Type definition that is used to govern update of TOSCA nodes or groups of nodes.
+
+ tosca.policies.Placement:
+ derived_from: tosca.policies.Root
+ description: This is the default (root) TOSCA Policy Type definition that is used to govern placement of TOSCA nodes or groups of nodes.
+
+ tosca.policies.Performance:
+ derived_from: tosca.policies.Root
+ description: This is the default (root) TOSCA Policy Type definition that is used to declare performance requirements for TOSCA nodes or groups of nodes.
+
+ tosca.policies.Scaling:
+ derived_from: tosca.policies.Root
+ description: This is the default (root) TOSCA Policy Type definition that is used to govern scaling of TOSCA nodes or groups of nodes.
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/relationships.yml b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/relationships.yml
new file mode 100644
index 0000000000..648626ba7c
--- /dev/null
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/resources/mock/globalServiceTemplates/relationships.yml
@@ -0,0 +1,106 @@
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+tosca_definitions_version: tosca_simple_yaml_1_1
+
+metadata:
+ filename: relationships.yml
+ version: '1.0'
+
+imports:
+- tosca_index:
+ file: _index.yml
+
+relationship_types:
+ tosca.relationships.Root:
+ description: This is the default (root) TOSCA Relationship Type definition that all other TOSCA Relationship Types derive from.
+ attributes:
+ tosca_id:
+ description: A unique identifier of the realized instance of a Relationship Template that derives from any TOSCA normative type.
+ type: string
+ tosca_name:
+ description: This attribute reflects the name of the Relationship Template as defined in the TOSCA service template. This name is not unique to the realized instance model of corresponding deployed application as each template in the model can result in one or more instances (e.g., scaled) when orchestrated to a provider environment.
+ type: string
+ state:
+ description: The state of the relationship instance.
+ type: string
+ default: initial
+ interfaces:
+ Configure:
+ type: tosca.interfaces.relationship.Configure
+
+ tosca.relationships.RoutesTo:
+ derived_from: tosca.relationships.ConnectsTo
+ description: This type represents an intentional network routing between two Endpoints in different networks.
+ valid_target_types:
+ - tosca.capabilities.Endpoint
+
+ tosca.relationships.network.LinksTo:
+ derived_from: tosca.relationships.DependsOn
+ description: This relationship type represents an association relationship between Port and Network node types.
+ valid_target_types:
+ - tosca.capabilities.network.Linkable
+
+ tosca.relationships.AttachesTo:
+ derived_from: tosca.relationships.Root
+ description: This type represents an attachment relationship between two nodes. For example, an AttachesTo relationship type would be used for attaching a storage node to a Compute node.
+ valid_target_types:
+ - tosca.capabilities.Attachment
+ properties:
+ location:
+ description: 'The relative location (e.g., path on the file system), which
+ provides the root location to address an attached node. e.g., a mount point
+ / path such as ''/usr/data''. Note: The user must provide it and it cannot
+ be "root".'
+ type: string
+ constraints:
+ - min_length: 1
+ device:
+ description: The logical device name which for the attached device (which is represented by the target node in the model). e.g., '/dev/hda1'.
+ type: string
+ required: false
+ attributes:
+ device:
+ description: 'The logical name of the device as exposed to the instance. Note:
+ A runtime property that gets set when the model gets instantiated by the
+ orchestrator.'
+ type: string
+
+ tosca.relationships.network.BindsTo:
+ derived_from: tosca.relationships.DependsOn
+ description: This type represents a network association relationship between Port and Compute node types.
+ valid_target_types:
+ - tosca.capabilities.network.Bindable
+
+ tosca.relationships.HostedOn:
+ derived_from: tosca.relationships.Root
+ description: This type represents a hosting relationship between two nodes.
+ valid_target_types:
+ - tosca.capabilities.Container
+
+ tosca.relationships.DependsOn:
+ derived_from: tosca.relationships.Root
+ description: This type represents a general dependency relationship between two nodes.
+ valid_target_types:
+ - tosca.capabilities.Node
+
+ tosca.relationships.ConnectsTo:
+ derived_from: tosca.relationships.Root
+ description: This type represents a network connection relationship between two nodes.
+ valid_target_types:
+ - tosca.capabilities.Endpoint
+ properties:
+ credential:
+ type: tosca.datatypes.Credential
+ required: false