From f5c3a09535dd724f2db9e843e3578ebc5008302f Mon Sep 17 00:00:00 2001 From: Ilya Shakhat Date: Mon, 5 Nov 2018 14:47:57 +0100 Subject: [PATCH] Do not list test scenarios in CLI help Scenarios under `test/` subfolder are used for integration testing or as samples. Skip them in CLI help and keep only production-ready. Change-Id: I69a428480055c825aa3b590f02b4c09b346a6012 --- doc/source/catalog.rst | 72 +++++++++++++++++++------- doc/source/tools/shaker-all-in-one.txt | 3 +- doc/source/tools/shaker-spot.txt | 3 +- doc/source/tools/shaker.txt | 3 +- etc/shaker.conf | 3 +- shaker/engine/config.py | 3 +- shaker/engine/utils.py | 4 +- 7 files changed, 60 insertions(+), 31 deletions(-) diff --git a/doc/source/catalog.rst b/doc/source/catalog.rst index cdb832e..2d37db6 100644 --- a/doc/source/catalog.rst +++ b/doc/source/catalog.rst @@ -17,26 +17,6 @@ processes. To use this scenario specify parameter ``--scenario misc/instance_metadata``. Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/misc/instance_metadata.yaml -.. _scenario_static_agents: - -Static agents -^^^^^^^^^^^^^ -In this scenario Shaker runs tests on pre-deployed static agents. The scenario -can be used for Shaker integration testing. - -To use this scenario specify parameter ``--scenario misc/static_agent``. -Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/misc/static_agent.yaml - -.. _scenario_paired_static_agents: - -Paired static agents -^^^^^^^^^^^^^^^^^^^^ -In this scenario Shaker runs tests on pre-deployed pair of static agents. The -scenario can be used for Shaker integration testing. - -To use this scenario specify parameter ``--scenario misc/static_agents_pair``. -Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/misc/static_agents_pair.yaml - .. _scenario_openstack_l2_cross_az: OpenStack L2 Cross-AZ @@ -422,6 +402,48 @@ overridden by command-line parameter, e.g. ``--matrix "{host: 172.10.1.2}"``. To use this scenario specify parameter ``--scenario spot/udp``. Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/spot/udp.yaml +.. _scenario_sample_tcp_test_with_environment_file: + +Sample TCP Test with Environment File +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +This test definition demonstrates the use of an environment file. In this +scenario Shaker launches pairs of instances in the same tenant network. Every +instance is hosted on a separate compute node, 1 compute node is utilized. The +traffic goes within the tenant network (L2 domain) + +To use this scenario specify parameter ``--scenario test/sample_with_env``. +Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/test/sample_with_env.yaml + +.. _scenario_static_agents: + +Static agents +^^^^^^^^^^^^^ +In this scenario Shaker runs tests in spot mode. The scenario can be used for +Shaker integration testing. + +To use this scenario specify parameter ``--scenario test/spot``. +Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/test/spot.yaml + +.. _scenario_static_agents: + +Static agents +^^^^^^^^^^^^^ +In this scenario Shaker runs tests on pre-deployed static agents. The scenario +can be used for Shaker integration testing. + +To use this scenario specify parameter ``--scenario test/static_agent``. +Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/test/static_agent.yaml + +.. _scenario_paired_static_agents: + +Paired static agents +^^^^^^^^^^^^^^^^^^^^ +In this scenario Shaker runs tests on pre-deployed pair of static agents. The +scenario can be used for Shaker integration testing. + +To use this scenario specify parameter ``--scenario test/static_agents_pair``. +Scenario source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/test/static_agents_pair.yaml + Heat Templates -------------- @@ -521,3 +543,13 @@ the same L2 domain. Template source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/openstack/qos/l2_qos.hot +.. _template_test_l2_with_env: + +test/l2_with_env +^^^^^^^^^^^^^^^^ +This Heat template creates a new Neutron network, a router to the external +network and plugs instances into this new network. All instances are located in +the same L2 domain. + +Template source is available at: https://github.com/openstack/shaker/blob/master/shaker/scenarios/test/l2_with_env.hot + diff --git a/doc/source/tools/shaker-all-in-one.txt b/doc/source/tools/shaker-all-in-one.txt index bd04ceb..fbeffdb 100644 --- a/doc/source/tools/shaker-all-in-one.txt +++ b/doc/source/tools/shaker-all-in-one.txt @@ -198,8 +198,7 @@ optional arguments: "interactive". --scenario SCENARIO Comma-separated list of scenarios to play. Each entity can be a file name or one of aliases: - "misc/instance_metadata", "misc/static_agent", - "misc/static_agents_pair", + "misc/instance_metadata", "openstack/cross_az/full_l2", "openstack/cross_az/full_l3_east_west", "openstack/cross_az/full_l3_north_south", diff --git a/doc/source/tools/shaker-spot.txt b/doc/source/tools/shaker-spot.txt index 555b37b..a3bfafb 100644 --- a/doc/source/tools/shaker-spot.txt +++ b/doc/source/tools/shaker-spot.txt @@ -77,8 +77,7 @@ optional arguments: "interactive". --scenario SCENARIO Comma-separated list of scenarios to play. Each entity can be a file name or one of aliases: - "misc/instance_metadata", "misc/static_agent", - "misc/static_agents_pair", + "misc/instance_metadata", "openstack/cross_az/full_l2", "openstack/cross_az/full_l3_east_west", "openstack/cross_az/full_l3_north_south", diff --git a/doc/source/tools/shaker.txt b/doc/source/tools/shaker.txt index 26a9996..8f9e619 100644 --- a/doc/source/tools/shaker.txt +++ b/doc/source/tools/shaker.txt @@ -158,8 +158,7 @@ optional arguments: "interactive". --scenario SCENARIO Comma-separated list of scenarios to play. Each entity can be a file name or one of aliases: - "misc/instance_metadata", "misc/static_agent", - "misc/static_agents_pair", + "misc/instance_metadata", "openstack/cross_az/full_l2", "openstack/cross_az/full_l3_east_west", "openstack/cross_az/full_l3_north_south", diff --git a/etc/shaker.conf b/etc/shaker.conf index e322000..7ea741d 100644 --- a/etc/shaker.conf +++ b/etc/shaker.conf @@ -192,8 +192,7 @@ #cleanup_on_error = true # Comma-separated list of scenarios to play. Each entity can be a file name or -# one of aliases: "misc/instance_metadata", "misc/static_agent", -# "misc/static_agents_pair", "openstack/cross_az/full_l2", +# one of aliases: "misc/instance_metadata", "openstack/cross_az/full_l2", # "openstack/cross_az/full_l3_east_west", # "openstack/cross_az/full_l3_north_south", "openstack/cross_az/perf_l2", # "openstack/cross_az/perf_l3_east_west", diff --git a/shaker/engine/config.py b/shaker/engine/config.py index af06d0c..b47598b 100644 --- a/shaker/engine/config.py +++ b/shaker/engine/config.py @@ -190,7 +190,8 @@ SCENARIO_OPTS = [ 'Comma-separated list of scenarios to play. Each entity ' 'can be a file name or one of aliases: ' '%s. Defaults to env[SHAKER_SCENARIO].', SCENARIOS, - type_filter=lambda x: x.endswith('.yaml'))), + type_filter=lambda x: (x.endswith('.yaml') + and not x.startswith('test/')))), cfg.Opt('matrix', default=utils.env('SHAKER_MATRIX'), type=Yaml(), diff --git a/shaker/engine/utils.py b/shaker/engine/utils.py index 4645355..24ae50e 100644 --- a/shaker/engine/utils.py +++ b/shaker/engine/utils.py @@ -193,11 +193,11 @@ def make_help_options(message, base, type_filter=None): files = itertools.chain.from_iterable( [map(functools.partial(os.path.join, root), files) for root, dirs, files in os.walk(path)]) # list of files in a tree + files = [os.path.relpath(f, start=path) for f in files] # to relative if type_filter: files = (f for f in files if type_filter(f)) # filtered list - rel_files = map(functools.partial(os.path.relpath, start=path), files) return message % ', '.join('"%s"' % f.partition('.')[0] - for f in sorted(rel_files)) + for f in sorted(files)) def algebraic_product(**kwargs):