diff options
author | Tim Rozet <trozet@redhat.com> | 2018-08-21 09:19:57 -0400 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-09-27 22:03:57 -0400 |
commit | ee58a24647df8eec2418735b038e5035bdffe10d (patch) | |
tree | e54a9a9293f94c1fc185d33554a3328068f23fae /apex/build_utils.py | |
parent | 82bf9da27ea0c973068720d440e3391084e8a9d9 (diff) |
Enable OVN scenarios
As of Queens only HA OVN deployments are supported.
Change-Id: I184c5a096fec9cbc3cf2ec06218700138ea3ed57
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/build_utils.py')
-rw-r--r-- | apex/build_utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
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) |