From ee58a24647df8eec2418735b038e5035bdffe10d Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Tue, 21 Aug 2018 09:19:57 -0400 Subject: Enable OVN scenarios As of Queens only HA OVN deployments are supported. Change-Id: I184c5a096fec9cbc3cf2ec06218700138ea3ed57 Signed-off-by: Tim Rozet --- apex/build_utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'apex/build_utils.py') diff --git a/apex/build_utils.py b/apex/build_utils.py index 78467875..7457e561 100644 --- a/apex/build_utils.py +++ b/apex/build_utils.py @@ -111,6 +111,19 @@ def strip_patch_sections(patch, sections=['releasenotes', 'tests']): return '\n'.join(tmp_patch) +def is_path_in_patch(patch, path): + """ + Checks if a particular path is modified in a patch diff + :param patch: patch diff + :param path: path to check for in diff + :return: Boolean + """ + for line in patch.split("\n"): + if re.match('^diff.*{}'.format(path), line): + return True + return False + + def get_patch(change_id, repo, branch, url=con.OPENSTACK_GERRIT): logging.info("Fetching patch for change id {}".format(change_id)) change = get_change(url, repo, branch, change_id) -- cgit 1.2.3-korg