rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 5 ++++-
spacecmd/src/lib/custominfo.py | 28 ++++++++++++++++++++++++++++
3 files changed, 33 insertions(+), 2 deletions(-)
New commits:
commit 147bf594e2fbf968e47eb1eed50908d51d5ff29d
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Jul 23 11:54:33 2013 +0200
Automatic commit of package [spacecmd] release [2.1.1-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 3fbae7a..f9ca916 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-2.0.2-1 spacecmd/
+2.1.1-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 2ec0c3a..f167795 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 2.1.0
+Version: 2.1.1
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -64,6 +64,9 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Mon Jul 22 2013 Gregor Gruener <ggruner(a)redhat.com> 2.1.1-1
+- add new function custominfo_updatekey
+
* Thu Jul 18 2013 Miroslav Suchý <msuchy(a)redhat.com> 2.0.2-1
- 985530 - require python and python-simplejson
commit a60c774c0e497bb03e691fa332a74ff151a6845b
Author: Gregor Gruener <ggruner(a)redhat.com>
Date: Mon Jul 22 17:17:28 2013 +0200
add new function custominfo_updatekey
diff --git a/spacecmd/src/lib/custominfo.py b/spacecmd/src/lib/custominfo.py
index 4db33b3..3a6ea31 100644
--- a/spacecmd/src/lib/custominfo.py
+++ b/spacecmd/src/lib/custominfo.py
@@ -139,4 +139,32 @@ def do_custominfo_details(self, args):
print 'Modified: %s' % details.get('last_modified')
print 'System Count: %i' % details.get('system_count')
+####################
+
+def help_custominfo_updatekey(self):
+ print 'custominfo_updatekey: Update a custom key'
+ print 'usage: custominfo_updatekey [NAME] [DESCRIPTION]'
+
+def do_custominfo_updatekey(self, args):
+ (args, options) = parse_arguments(args)
+
+ if len(args) > 0:
+ key = args[0]
+ else:
+ key = ''
+
+ while key == '':
+ key = prompt_user('Name:')
+
+ if len(args) > 1:
+ description = ' '.join(args[1:])
+ else:
+ description = prompt_user('Description:')
+ if description == '':
+ description = key
+
+ self.client.system.custominfo.updateKey(self.session,
+ key,
+ description)
+
# vim:ts=4:expandtab: