heat-translator/samples/tests/data/test_host_assignment.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

81 lines
2.3 KiB
YAML

tosca_definitions_version: tosca_simple_yaml_1_0
description: >
A template to test host assignment for translated hot resources.
It makes sure if a resource depends on multiple hosts only the
one with the "HostedOn" relationship is picked as the host. In
this template, the translated resource 'app_collectd_create_deploy'
would depend on 'logstash_server' and 'app_server'. But it would
have "HostedOn" relationship with 'app_server', and that server
would be its host.
imports:
- custom_types/logstash.yaml
- custom_types/collectd.yaml
- custom_types/rsyslog.yaml
- custom_types/elasticsearch.yaml
dsl_definitions:
host_capabilities: &host_capabilities
# compute properties (flavor)
disk_size: 10 GB
num_cpus: 1
mem_size: 4096 MB
os_capabilities: &os_capabilities
architecture: x86_64
type: Linux
distribution: Ubuntu
version: 14.04
topology_template:
node_templates:
app_collectd:
type: tosca.nodes.SoftwareComponent.Collectd
requirements:
- host:
node: app_server
- log_endpoint:
node: logstash
capability: log_endpoint
relationship:
type: tosca.relationships.ConnectsTo
interfaces:
Configure:
pre_configure_target:
implementation: logstash/configure_collectd.py
interfaces:
Standard:
create: collectd/create.sh
configure:
implementation: collectd/config.py
inputs:
logstash_ip: { get_attribute: [logstash_server, private_address] }
start: collectd/start.sh
logstash:
type: tosca.nodes.SoftwareComponent.Logstash
requirements:
- host:
node: logstash_server
interfaces:
Standard:
create: logstash/create.sh
start: logstash/start.sh
app_server:
type: tosca.nodes.Compute
capabilities:
os:
properties: *os_capabilities
host:
properties: *host_capabilities
logstash_server:
type: tosca.nodes.Compute
capabilities:
os:
properties: *os_capabilities
host:
properties: *host_capabilities