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>
This commit is contained in:
parent
809f7c0580
commit
7febd72cce
doc/source
samples
docker
tests/data
artifacts
collectd
elasticsearch
kibana
logstash
mongodb
mysql
nodejs
rsyslog
ssh
webserver
wordpress
autoscaling
csar_elk.zipcsar_hello_world.zipcsar_metadata_not_yaml.zipcsar_not_zip.zipcsar_single_instance_wordpress.zipcsar_wordpress_invalid_import_path.zipcsar_wordpress_invalid_script_url.zipcsar_wrong_metadata_file.zipcustom_types
collectd.yamlcustom_monitoring.yamlelasticsearch.yamlkibana.yamllogstash.yamlpaypalpizzastore_nodejs_app.yamlrsyslog.yamlsenlin_cluster_policies.yamlwordpress.yaml
etsi_nfv
etsi_nfv_sol001_common_types.yamletsi_nfv_sol001_vnfd_types.yamltosca_nfv_blockstorage.yamltosca_nfv_check_cp_order.yamltosca_nfv_cp.yamltosca_nfv_cp_with_extended_vnic_type.yamltosca_nfv_non_leaf_in_vl.yamltosca_nfv_scaling_non_deltas_in_aspect_delta.yamltosca_nfv_scaling_non_target_vdu_in_aspect_delta.yamltosca_nfv_scaling_non_target_vdu_in_initial_delta.yamltosca_nfv_vdu.yamltosca_nfv_vdu_affinity_with_scope_nfvi.yamltosca_nfv_vdu_affinity_with_unsupported_scope.yamltosca_nfv_vdu_affinity_with_unsupported_targets.yamltosca_nfv_vdu_cp_vl_with_mixed_scaling.yamltosca_nfv_vdu_cp_with_scaling_multi_aspects.yamltosca_nfv_vdu_with_compute_requirements.yamltosca_nfv_vdu_with_invalid_compute_requirements.yamltosca_nfv_vdu_with_logical_node.yamltosca_nfv_vdu_with_unsupported_storage.yamltosca_nfv_vl.yamltosca_nfv_vl_with_unsupported_protocol.yamltosca_nfv_vnf.yamltosca_nfv_vnf_vdu_cp_vl_blockstorage_with_scaling.yaml
hot_output
autoscaling
etsi_nfv
hot_nfv_blockstorage.yamlhot_nfv_check_cp_order.yamlhot_nfv_cp.yamlhot_nfv_cp_with_extended_vnic_type.yamlhot_nfv_non_leaf_in_vl.yamlhot_nfv_vdu.yamlhot_nfv_vdu_affinity_with_scope_nfvi.yamlhot_nfv_vdu_affinity_with_unsupported_scope.yamlhot_nfv_vdu_affinity_with_unsupported_targets.yamlhot_nfv_vdu_with_compute_requirements.yamlhot_nfv_vdu_with_invalid_compute_requirements.yamlhot_nfv_vdu_with_logical_node.yamlhot_nfv_vdu_with_unsupported_storage.yamlhot_nfv_vl.yamlhot_nfv_vl_with_unsupported_protocol.yamlhot_nfv_vnf.yaml
scaling_non_deltas_in_aspect_delta
scaling_non_target_vdu_in_aspect_delta
@ -17,15 +17,15 @@ only supported template type at present. Currently you can use Heat-Translator i
|
||||
|
||||
Translate and get output on command line. For example: ::
|
||||
|
||||
openstack translate template --template-file /home/openstack/heat-translator/translator/tests/data/tosca_helloworld.yaml --template-type tosca
|
||||
openstack translate template --template-file /home/openstack/heat-translator/samples/tests/data/tosca_helloworld.yaml --template-type tosca
|
||||
|
||||
Translate and save output of translated file to a desired destination. For example: ::
|
||||
|
||||
openstack translate template --template-file /home/openstack/heat-translator/translator/tests/data/tosca_helloworld.yaml --template-type tosca --output-file /tmp/hot_hello_world.yaml
|
||||
openstack translate template --template-file /home/openstack/heat-translator/samples/tests/data/tosca_helloworld.yaml --template-type tosca --output-file /tmp/hot_hello_world.yaml
|
||||
|
||||
Do not translate but only validate template file. For example: ::
|
||||
|
||||
openstack translate template --template-file /home/openstack/heat-translator/translator/tests/data/tosca_helloworld.yaml --template-type tosca --validate-only=true
|
||||
openstack translate template --template-file /home/openstack/heat-translator/samples/tests/data/tosca_helloworld.yaml --template-type tosca --validate-only=true
|
||||
|
||||
You can learn more about available options by running following help command::
|
||||
|
||||
@ -46,12 +46,12 @@ system or via URL.
|
||||
|
||||
For example, a TOSCA hello world template can be translated by running the following command from the project location::
|
||||
|
||||
python heat_translator.py --template-file=translator/tests/data/tosca_helloworld.yaml
|
||||
python heat_translator.py --template-file=samples/tests/data/tosca_helloworld.yaml
|
||||
|
||||
This should produce a translated Heat Orchestration Template on the command line. The translated content can be saved to a desired file by setting --output-file=<path>.
|
||||
For example: ::
|
||||
|
||||
python heat_translator.py --template-file=translator/tests/data/tosca_helloworld.yaml --template-type=tosca --output-file=/tmp/hot_helloworld.yaml
|
||||
python heat_translator.py --template-file=samples/tests/data/tosca_helloworld.yaml --template-type=tosca --output-file=/tmp/hot_helloworld.yaml
|
||||
|
||||
An optional argument can be provided to handle user inputs parameters. Also, a template file can only be validated instead of translation by using --validate-only=true
|
||||
optional argument. The command below shows an example usage::
|
||||
@ -61,7 +61,7 @@ optional argument. The command below shows an example usage::
|
||||
Alternatively, you can install a particular release of Heat-Translator as available at https://pypi.org/project/heat-translator.
|
||||
In this case, you can simply run translation via CLI entry point::
|
||||
|
||||
heat-translator --template-file=translator/tests/data/tosca_helloworld.yaml --template-type=tosca
|
||||
heat-translator --template-file=samples/tests/data/tosca_helloworld.yaml --template-type=tosca
|
||||
|
||||
Things To Consider
|
||||
------------------
|
||||
@ -77,14 +77,14 @@ Things To Consider
|
||||
* The ``flavor`` and ``image`` properties of ``OS::Nova::Server`` resource is irrelevant to the TOSCA specification and can not be used in the TOSCA
|
||||
template as such. Heat-Translator sets these properties in the translated template based on constraints defined per TOSCA Compute OS and HOST
|
||||
capabilities. However, user may required to use these properties in template in certain circumstances, so in that case, TOSCA Compute can be extended
|
||||
with these properties and later used in the node template. For a good example, refer to the ``translator/tests/data/test_tosca_flavor_and_image.yaml`` test
|
||||
with these properties and later used in the node template. For a good example, refer to the ``samples/tests/data/test_tosca_flavor_and_image.yaml`` test
|
||||
template.
|
||||
* The Heat-Translator can be used to automatically deploy translated TOSCA template given that your environment has python-heatclient and python-keystoneclient.
|
||||
This can be achieved by providing ``--deploy`` argument to the Heat-Translator. You can provide desired stack name by providing it as ``--stack-name <name>``
|
||||
argument. If you do not provide ``--stack-name``, an unique name will be created and used.
|
||||
Below is an example command to deploy translated template with a desired stack name::
|
||||
|
||||
heat-translator --template-file translator/tests/data/tosca_helloworld.yaml --stack-name mystack --deploy
|
||||
heat-translator --template-file samples/tests/data/tosca_helloworld.yaml --stack-name mystack --deploy
|
||||
|
||||
* The Heat-Translator supports translation of TOSCA templates to Heat Senlin
|
||||
resources (e.g. ``OS::Senlin::Cluster``) but that requires to use a specific
|
||||
@ -92,8 +92,8 @@ Things To Consider
|
||||
The ``tosca.policies.Scaling.Cluster`` is a custom type that derives from
|
||||
``tosca.policies.Scaling``. For example usage, refer to the
|
||||
``tosca_cluster_autoscaling.yaml`` and ``hot_cluster_autoscaling.yaml``
|
||||
provided under the ``translator/tests/data/autoscaling`` and
|
||||
``translator/tests/data/hot_output/autoscaling`` directories respectively in
|
||||
provided under the ``samples/tests/data/autoscaling`` and
|
||||
``samples/tests/data/hot_output/autoscaling`` directories respectively in
|
||||
the heat-translator project (``https://github.com/openstack/heat-translator``).
|
||||
When you use ``tosca.policies.Scaling`` normative node type, the
|
||||
Heat-Translator will translate it to ``OS::Heat::AutoScalingGroup`` Heat
|
||||
@ -118,4 +118,4 @@ Things To Consider
|
||||
|
||||
Below is an example of how to use this on the command line::
|
||||
|
||||
heat-translator --template-file translator/tests/data/autoscaling/tosca_autoscaling.yaml --output-file /tmp/hot.yaml
|
||||
heat-translator --template-file samples/tests/data/autoscaling/tosca_autoscaling.yaml --output-file /tmp/hot.yaml
|
||||
|
0
translator/tests/data/artifacts/mongodb/config.sh → samples/tests/data/artifacts/mongodb/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/config.sh → samples/tests/data/artifacts/mongodb/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/create.sh → samples/tests/data/artifacts/mongodb/create.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/create.sh → samples/tests/data/artifacts/mongodb/create.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/create_database.sh → samples/tests/data/artifacts/mongodb/create_database.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/create_database.sh → samples/tests/data/artifacts/mongodb/create_database.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/start.sh → samples/tests/data/artifacts/mongodb/start.sh
Normal file → Executable file
0
translator/tests/data/artifacts/mongodb/start.sh → samples/tests/data/artifacts/mongodb/start.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/config.sh → samples/tests/data/artifacts/nodejs/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/config.sh → samples/tests/data/artifacts/nodejs/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/create.sh → samples/tests/data/artifacts/nodejs/create.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/create.sh → samples/tests/data/artifacts/nodejs/create.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/start.sh → samples/tests/data/artifacts/nodejs/start.sh
Normal file → Executable file
0
translator/tests/data/artifacts/nodejs/start.sh → samples/tests/data/artifacts/nodejs/start.sh
Normal file → Executable file
0
translator/tests/data/artifacts/rsyslog/config.sh → samples/tests/data/artifacts/rsyslog/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/rsyslog/config.sh → samples/tests/data/artifacts/rsyslog/config.sh
Normal file → Executable file
0
translator/tests/data/artifacts/ssh/ssh_generate_keys.sh → samples/tests/data/artifacts/ssh/ssh_generate_keys.sh
Normal file → Executable file
0
translator/tests/data/artifacts/ssh/ssh_generate_keys.sh → samples/tests/data/artifacts/ssh/ssh_generate_keys.sh
Normal file → Executable file
0
translator/tests/data/artifacts/ssh/ssh_import_public_key.sh → samples/tests/data/artifacts/ssh/ssh_import_public_key.sh
Normal file → Executable file
0
translator/tests/data/artifacts/ssh/ssh_import_public_key.sh → samples/tests/data/artifacts/ssh/ssh_import_public_key.sh
Normal file → Executable file
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user