summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmit Saha <asaha@redhat.com>2014-06-18 20:38:01 +1000
committerAmit Saha <asaha@redhat.com>2014-06-18 20:41:02 +1000
commit3748f14d708232ebb924dd1dd459bbd82b300028 (patch)
tree4cf1bb934a4aa56c8c5ace5d1ea25f3b902f17e5
parent0d76be78b24e4eb09bb9a8ac57907d99a2e2e6a4 (diff)
bkr system-release: Accept multiple systems
-rw-r--r--Client/src/bkr/client/commands/cmd_system_release.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Client/src/bkr/client/commands/cmd_system_release.py b/Client/src/bkr/client/commands/cmd_system_release.py
index 6e832d4..0aedc5a 100644
--- a/Client/src/bkr/client/commands/cmd_system_release.py
+++ b/Client/src/bkr/client/commands/cmd_system_release.py
@@ -15,7 +15,7 @@ bkr system-release: Release a reserved Beaker system
Synopsis
--------
-:program:`bkr system-release` [*options*] <fqdn>
+:program:`bkr system-release` [*options*] <fqdn>...
Description
-----------
@@ -47,6 +47,10 @@ it::
# do some work on the system
bkr system-release system1.example.invalid
+Release more than one system::
+
+ bkr system-release system1.example.invalid system2.example.invalid
+
See also
--------
@@ -60,12 +64,9 @@ class System_Release(BeakerCommand):
enabled = True
def options(self):
- self.parser.usage = "%%prog %s [options] <fqdn>" % self.normalized_name
+ self.parser.usage = "%%prog %s [options] <fqdn>..." % self.normalized_name
def run(self, *args, **kwargs):
- if len(args) != 1:
- self.parser.error('Exactly one system fqdn must be given')
- fqdn = args[0]
-
self.set_hub(**kwargs)
- self.hub.systems.release(fqdn)
+ for fqdn in args:
+ self.hub.systems.release(fqdn)