From ae5fcc0dd1d19c750cba8d9bf16545f5a7802287 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Mon, 13 Aug 2018 14:51:09 -0400 Subject: Allow common patches file This patch adds allowing for common patches that should be applied to every scenario to be included. It by default pulls in a file in the deploy directory 'common-patches.yaml', but can optionally be overridden. This patch also includes a patch upstream to fix OSCLI not working anymore due to breakage with the Cinder version in the overcloudrc. Change-Id: I97b9efb937deff07e085b9ef75b9799fb65bfc57 Signed-off-by: Tim Rozet --- apex/common/utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apex/common') diff --git a/apex/common/utils.py b/apex/common/utils.py index 013c7ac8..464aaf28 100644 --- a/apex/common/utils.py +++ b/apex/common/utils.py @@ -272,3 +272,12 @@ def edit_tht_env(env_file, section, settings): with open(env_file, 'w') as fh: yaml.safe_dump(data, fh, default_flow_style=False) logging.debug("Data written to env file {}:\n{}".format(env_file, data)) + + +def unique(tmp_list): + assert isinstance(tmp_list, list) + uniq_list = [] + for x in tmp_list: + if x not in uniq_list: + uniq_list.append(x) + return uniq_list -- cgit 1.2.3-korg