heat-translator/samples/tests/data/test_tosca_get_functions_semantic.yaml
Yasufumi Ogawa 7febd72cce Move test samples to reduce setuptools warnings
Previously there are a lot of warning messages of setuptools in the log
files of tox jobs. This is mainly caused by test samples because these
are in python codes directories.

This patch moves test samples from under
{heat-translator_root}/translator/tests to under
{heat-translator_root}/samples/tests.

This patch also contains the following changes:
- Remove "skipsdist = True" from tox.ini
- Fixed usage.rst command example

Change-Id: Ibde711a4778e238076de328641da7b0edd1d4f4b
Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
Co-Authored-By: Yoshiro Watanabe <fj3838ct@fujitsu.com>
2024-11-21 09:45:09 +00:00

101 lines
2.6 KiB
YAML

tosca_definitions_version: tosca_simple_yaml_1_0
description: TOSCA template to test get_* functions semantic
node_types:
tosca.capabilities.custom.Endpoint:
derived_from: tosca.capabilities.Endpoint
attributes:
credential:
type: tosca.datatypes.Credential
tosca.capabilities.MyFeature:
derived_from: tosca.capabilities.Root
properties:
my_list:
type: list
my_map:
type: map
tosca.nodes.WebApplication.MyApp:
derived_from: tosca.nodes.WebApplication
requirements:
- myfeature:
capability: tosca.capabilities.MyFeature
node: tosca.nodes.MyDatabase
relationship: tosca.relationships.ConnectsTo
tosca.nodes.MyDatabase:
derived_from: tosca.nodes.Database
capabilities:
myfeature:
type: tosca.capabilities.MyFeature
tosca.nodes.custom.Compute:
derived_from: tosca.nodes.Compute
capabilities:
endpoint:
type: tosca.capabilities.custom.Endpoint
topology_template:
inputs:
map_val:
type: string
node_templates:
server:
type: tosca.nodes.custom.Compute
capabilities:
host:
properties:
num_cpus: 1
mem_size: 1 GB
os:
properties:
type: Linux
distribution: Ubuntu
version: 12.04
architecture: x86_64
mysql_database:
type: tosca.nodes.MyDatabase
requirements:
- host: server
capabilities:
myfeature:
properties:
my_list: [list_val_0]
my_map:
test_key: { get_input: map_val }
test_key_static: static_value
myapp:
type: tosca.nodes.WebApplication.MyApp
requirements:
- myfeature: mysql_database
- host: server
interfaces:
Standard:
configure:
implementation: myapp_configure.sh
inputs:
list_val: { get_property: [ SELF, myfeature, my_list, 0 ] }
outputs:
map_val:
description: map_val
value: { get_property: [ myapp, myfeature, my_map, test_key ] }
static_map_val:
value: { get_property: [ myapp, myfeature, my_map, test_key_static ] }
concat_map_val:
value: { concat: [ 'http://', { get_property: [ myapp, myfeature, my_map, test_key ] }, ':8080' ] }
test_list_of_functions:
value: [ { get_property: [ myapp, myfeature, my_map, test_key ] }, { get_property: [ myapp, myfeature, my_map, test_key_static ] } ]
# should not be translated : complex type
credential:
value: { get_attribute: [server, endpoint, credential] }