From 2b5c5298fa623e2dd4aa0411e5212680c7d50d8e Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Wed, 13 Jul 2016 13:06:08 -0400 Subject: [PATCH] show ptl details in list-changes output Part of verifying that a release is OK is ensuring that the liaison or PTL has signed off. This patch adds information about the PTL to the list-changes output for easy reference. Change-Id: I1d88271d2b4a46280b13574c6e1682d8df5700bb Signed-off-by: Doug Hellmann --- openstack_releases/cmds/list_changes.py | 4 +++- openstack_releases/governance.py | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openstack_releases/cmds/list_changes.py b/openstack_releases/cmds/list_changes.py index 70096e8dec..c1114843b2 100644 --- a/openstack_releases/cmds/list_changes.py +++ b/openstack_releases/cmds/list_changes.py @@ -129,13 +129,14 @@ def main(): with open(filename, 'r') as f: deliverable_info = yaml.load(f.read()) - header('team info') + header('Team details') if 'team' in deliverable_info: team_name = deliverable_info['team'] team_dict = team_data.get(team_name) if team_dict: team = governance.Team(team_name, team_dict) print('found team %s' % team_name) + print(' PTL: %(name)s (%(irc)s)\n' % team.ptl) deliverable_name = os.path.basename(filename)[:-5] # remove .yaml deliverable = team.deliverables.get(deliverable_name) if deliverable: @@ -144,6 +145,7 @@ def main(): print('\nrepo %s\ntags:' % repo.name) for t in repo.tags: print(' %s' % t) + print('') else: print(('no deliverable %r found for team %r, ' 'cannot report on governance status') % diff --git a/openstack_releases/governance.py b/openstack_releases/governance.py index 788272f4aa..5ef10c19f3 100644 --- a/openstack_releases/governance.py +++ b/openstack_releases/governance.py @@ -51,6 +51,14 @@ class Team(object): def __init__(self, name, data): self.name = name self.data = data + # Protectively initialize the ptl data structure in case part + # of it is missing from the project list, then replace any + # values we do have from that data. + self.ptl = { + 'name': 'MISSING', + 'irc': 'MISSING', + } + self.ptl.update(data.get('ptl', {})) self.deliverables = { dn: Deliverable(dn, di, self) for dn, di in self.data.get('deliverables', {}).items()