rel-eng/packages/spacecmd | 2 -
spacecmd/spacecmd.spec | 5 +++
spacecmd/src/lib/configchannel.py | 48 ++++++++++++++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 2 deletions(-)
New commits:
commit 4f37c65b348fa7675c7b9a0de8de03faaee4415e
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Fri Mar 11 16:47:34 2011 -0500
Automatic commit of package [spacecmd] release [1.4.4-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index d8ec123..a641560 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.4.3-1 spacecmd/
+1.4.4-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 1313ab6..0302479 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.4.3
+Version: 1.4.4
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -61,6 +61,9 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Fri Mar 11 2011 Aron Parsons <aparsons(a)redhat.com> 1.4.4-1
+- added configchannel_verifyfile (aparsons(a)redhat.com)
+
* Fri Mar 11 2011 Aron Parsons <aparsons(a)redhat.com> 1.4.3-1
- fix invalid key name in errata_search (aparsons(a)redhat.com)
commit e31c4fb1e4bb89e5be3ae640c79f6015017ac687
Author: Aron Parsons <aparsons(a)redhat.com>
Date: Fri Mar 11 16:46:59 2011 -0500
spacecmd: added configchannel_verifyfile
diff --git a/spacecmd/src/lib/configchannel.py b/spacecmd/src/lib/configchannel.py
index 7f1a27c..5e7d3b3 100644
--- a/spacecmd/src/lib/configchannel.py
+++ b/spacecmd/src/lib/configchannel.py
@@ -660,4 +660,52 @@ def do_configchannel_removefiles(self, args):
if self.user_confirm('Remove these files [y/N]:'):
self.client.configchannel.deleteFiles(self.session, channel, files)
+####################
+
+def help_configchannel_verifyfile(self):
+ print 'configchannel_verifyfile: Verify a configuration file'
+ print 'usage: configchannel_verifyfile CHANNEL FILE <SYSTEMS>'
+ print
+ print self.HELP_SYSTEM_OPTS
+
+
+def complete_configchannel_verifyfile(self, text, line, beg, end):
+ parts = line.split(' ')
+
+ if len(parts) == 2:
+ return tab_completer(self.do_configchannel_list('', True), text)
+ elif len(parts) == 3:
+ channel = parts[1]
+ return tab_completer(self.do_configchannel_listfiles(channel, True),
+ text)
+ elif len(parts) > 3:
+ return self.tab_complete_systems(text)
+
+
+def do_configchannel_verifyfile(self, args):
+ (args, options) = parse_arguments(args)
+
+ if len(args) < 3:
+ self.help_configchannel_verifyfile()
+ return
+
+ channel = args[0]
+ path = args[1]
+
+ # use the systems listed in the SSM
+ if re.match('ssm', args[2], re.I):
+ systems = self.ssm.keys()
+ else:
+ systems = self.expand_systems(args[2:])
+
+ system_ids = [ self.get_system_id(s) for s in systems ]
+
+ action_id = \
+ self.client.configchannel.scheduleFileComparisons(self.session,
+ channel,
+ path,
+ system_ids)
+
+ logging.info('Action ID: %i' % action_id)
+
# vim:ts=4:expandtab:
Show replies by date