add mode to list-deliverables to show repo names
Sometimes we want the repository names, not the deliverable names. Add a switch to list-deliverables to give that output. Change-Id: Iaf0cd77237c0b1892aaa0864eb356012c57f036c Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
@@ -21,12 +21,19 @@ from openstack_releases import deliverable
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument(
|
||||
output_mode = parser.add_mutually_exclusive_group()
|
||||
output_mode.add_argument(
|
||||
'-v', '--verbose',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='show more than the deliverable name',
|
||||
)
|
||||
output_mode.add_argument(
|
||||
'-r', '--repos',
|
||||
action='store_true',
|
||||
default=False,
|
||||
help='show the repository names not deliverable names',
|
||||
)
|
||||
parser.add_argument(
|
||||
'--team',
|
||||
help='the name of the project team, such as "Nova" or "Oslo"',
|
||||
@@ -128,5 +135,8 @@ def main():
|
||||
continue
|
||||
if args.verbose:
|
||||
print('{:30} {:15} {}'.format(deliv.name, deliv.latest_release, deliv.team))
|
||||
elif args.repos:
|
||||
for r in sorted(deliv.repos):
|
||||
print(r)
|
||||
else:
|
||||
print(deliv.name)
|
||||
|
||||
Reference in New Issue
Block a user