From: Deepika Upadhyay Date: Fri, 23 Jul 2021 14:13:05 +0000 (+0000) Subject: suite: add flavor in base build_config X-Git-Tag: 1.2.0~232^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1d8869bee16911e92498467a87e7eb1420eb37e9;p=teuthology.git suite: add flavor in base build_config build flavor remains common for all jobs and is something that is good to look into while our jobs are being scheduled This will be useful when changing from default flavor to ones in available (crimson/jaeger) by using --flavor arg teuthology/suite/test: update unit tests to test build flavor Signed-off-by: Deepika Upadhyay --- diff --git a/teuthology/suite/placeholder.py b/teuthology/suite/placeholder.py index 413854172..30f9283e5 100644 --- a/teuthology/suite/placeholder.py +++ b/teuthology/suite/placeholder.py @@ -72,6 +72,7 @@ dict_templ = { 'debug osd': 20 } }, + 'flavor': Placeholder('flavor'), 'log-whitelist': ['\(MDS_ALL_DOWN\)', '\(MDS_UP_LESS_THAN_MAX\)'], 'log-ignorelist': ['\(MDS_ALL_DOWN\)', @@ -91,6 +92,7 @@ dict_templ = { 'install': { 'ceph': { 'sha1': Placeholder('ceph_hash'), + 'flavor': Placeholder('flavor'), } }, 'workunit': { diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index fda03bb7b..6f51b98d7 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -121,6 +121,7 @@ class Run(object): archive_upload_key=config.archive_upload_key, suite_repo=config.get_ceph_qa_suite_git_url(), suite_relpath=self.args.suite_relpath, + flavor=self.args.flavor, ) return self.build_base_config() diff --git a/teuthology/suite/test/test_placeholder.py b/teuthology/suite/test/test_placeholder.py index 3427439fd..acf1b6a44 100644 --- a/teuthology/suite/test/test_placeholder.py +++ b/teuthology/suite/test/test_placeholder.py @@ -22,6 +22,7 @@ class TestPlaceholder(object): suite_repo='https://example.com/ceph/suite.git', suite_relpath='', ceph_repo='https://example.com/ceph/ceph.git', + flavor='default' ) output_dict = substitute_placeholders(dict_templ, input_dict) assert output_dict['suite'] == 'suite' @@ -48,6 +49,7 @@ class TestPlaceholder(object): suite_repo='https://example.com/ceph/suite.git', suite_relpath='', ceph_repo='https://example.com/ceph/ceph.git', + flavor=None, ) output_dict = substitute_placeholders(dict_templ, input_dict) assert 'os_type' not in output_dict