From e7ff8c56e8eade67b95e049c49b8332211dfc4a5 Mon Sep 17 00:00:00 2001 From: Bill Peck Date: Nov 01 2010 15:10:08 +0000 Subject: bz646520 - Retention feature was added without allowing cmdline option. Also fixed bkr.client helpers to allow setting the guestname in guest recipes. --- diff --git a/Client/src/bkr/client/__init__.py b/Client/src/bkr/client/__init__.py index 181a502..5fdd493 100644 --- a/Client/src/bkr/client/__init__.py +++ b/Client/src/bkr/client/__init__.py @@ -77,6 +77,11 @@ class BeakerWorkflow(BeakerCommand): help="Pick latest distro matching this tag for job", ) self.parser.add_option( + "--retention_tag", + default="Scratch", + help="Specify data retention policy for this job, defaults to Scratch", + ) + self.parser.add_option( "--repo", action="append", default=[], @@ -315,6 +320,8 @@ class BeakerRecipeSet(BeakerBase): def __init__(self, *args, **kwargs): self.node = self.doc.createElement('recipeSet') self.node.setAttribute('priority', kwargs.get('priority', '')) + if kwargs.get('retention_tag'): + self.node.setAttribute('retention_tag', kwargs.get('retention_tag')) def addRecipe(self, recipe): """ properly add a recipe to this recipeSet """ @@ -520,3 +527,11 @@ class BeakerGuestRecipe(BeakerRecipeBase): guestargs = property(get_guestargs, set_guestargs) + def set_guestname(self, value): + return self.node.setAttribute('guestname', value) + + def get_guestname(self): + return self.node.getAttribute('guestname') + + guestname = property(get_guestname, set_guestname) +