From 319f8cd41ef8a7cb7aa6adec717c5083a32ff8ce Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 9 Jan 2017 09:56:29 -0500 Subject: [PATCH] fix aclmanager groups subcommand Update the portion of aclmanager that modifies the gerrit groups to pull the list of repositories properly. Change-Id: Ib4b78de738517e9d6bd9176a9e4ad61203f22036 Signed-off-by: Doug Hellmann --- tools/aclmanager.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tools/aclmanager.py b/tools/aclmanager.py index 46391db953..5dfa94beb1 100755 --- a/tools/aclmanager.py +++ b/tools/aclmanager.py @@ -23,11 +23,16 @@ import os import sys import requests +from requests.packages import urllib3 import yaml import openstack_releases from openstack_releases import deliverable +# Turn of warnings about bad SSL config. +# https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings +urllib3.disable_warnings() + GERRIT_URL = 'https://review.openstack.org/' EXCEPTIONS = ['openstack/training-labs', @@ -146,7 +151,7 @@ def modify_gerrit_groups(args): # Build the list of calls to make print('Computing the list of modifications') calls = set() - for team, _ in repositories_list(): + for team, repo in repositories_list(args.deliverables_dir, args.series): group = '%s-release-branch' % team for (verb, memberformat) in actions: member = memberformat(team) @@ -173,16 +178,16 @@ def main(args=sys.argv[1:]): default=False, help='do not actually do anything', action='store_true') + parser.add_argument( + '--deliverables-dir', + default=openstack_releases.deliverable_dir, + help='location of deliverable files', + ) subparsers = parser.add_subparsers(title='commands') do_acls = subparsers.add_parser( 'acls', help='patch ACL files') - do_acls.add_argument( - '--deliverables-dir', - default=openstack_releases.deliverable_dir, - help='location of deliverable files', - ) do_acls.add_argument( 'repository', help='location of the local project-config repository') @@ -198,6 +203,9 @@ def main(args=sys.argv[1:]): 'stage', choices=['pre_release', 'post_release'], help='type of modification to push') + do_groups.add_argument( + 'series', + help='series to modify groups for') do_groups.add_argument( 'username', help='gerrit HTTP username')