Changes to 'refs/tags/spacecmd-1.9.4-1'
by aparsons
Tag 'spacecmd-1.9.4-1' created by Aron Parsons <aronparsons(a)gmail.com> at 2013-03-04 04:53 +0000
Tagging package [spacecmd] version [1.9.4-1] in directory [spacecmd/].
Changes since spacecmd-1.9.3-1:
Aron Parsons (3):
spacecmd: add functions to disable/enable activation keys
spacecmd: allow globbing in activationkey_{en,dis}able
Automatic commit of package [spacecmd] release [1.9.4-1].
---
rel-eng/packages/spacecmd | 2 -
spacecmd/spacecmd.spec | 6 +++-
spacecmd/src/lib/activationkey.py | 53 ++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 2 deletions(-)
---
11 years, 2 months
3 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2 -
spacecmd/spacecmd.spec | 6 +++-
spacecmd/src/lib/activationkey.py | 53 ++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 2 deletions(-)
New commits:
commit b93814b72e977b3fac4b398637173de75ee4c33e
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 23:53:56 2013 -0500
Automatic commit of package [spacecmd] release [1.9.4-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index 7a65d1e..9a55025 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.9.3-1 spacecmd/
+1.9.4-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 4adaafc..c931081 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.9.3
+Version: 1.9.4
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -60,6 +60,10 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Sun Mar 03 2013 Aron Parsons <aronparsons(a)gmail.com> 1.9.4-1
+- spacecmd: allow globbing in activationkey_{en,dis}able
+- spacecmd: add functions to disable/enable activation keys
+
* Sun Mar 03 2013 Aron Parsons <aronparsons(a)gmail.com> 1.9.3-1
- update email addresses in copyright notices
- update copyright years
commit 30c9c920061e6958e7893257590eab23736b22f7
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 23:53:18 2013 -0500
spacecmd: allow globbing in activationkey_{en,dis}able
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 78f386d..3014b8a 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -1456,9 +1456,11 @@ def do_activationkey_disable(self, args):
self.help_activationkey_disable()
return
+ keys = filter_results(self.do_activationkey_list('', True), args)
+
details = { 'disabled' : True }
- for akey in args:
+ for akey in keys:
self.client.activationkey.setDetails(self.session, akey, details)
####################
@@ -1481,9 +1483,11 @@ def do_activationkey_enable(self, args):
self.help_activationkey_enable()
return
+ keys = filter_results(self.do_activationkey_list('', True), args)
+
details = { 'disabled' : False }
- for akey in args:
+ for akey in keys:
self.client.activationkey.setDetails(self.session, akey, details)
# vim:ts=4:expandtab:
commit 7d24dc24b2f424ace26ec2cc0e179eb94ae41542
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 23:51:39 2013 -0500
spacecmd: add functions to disable/enable activation keys
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 3162d6d..78f386d 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -1436,5 +1436,54 @@ def do_activationkey_diff(self, args):
return diff( source_data, target_data, source_channel, target_channel )
+####################
+
+def help_activationkey_disable(self):
+ print 'activationkey_disable: Disable an activation key'
+ print
+ print 'usage: activationkey_disable KEY [KEY ...]'
+
+def complete_activationkey_disable(self, text, line, beg, end):
+ parts = line.split(' ')
+
+ if len(parts) >= 2:
+ return tab_completer(self.do_activationkey_list('', True), text)
+
+def do_activationkey_disable(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args) >= 1:
+ self.help_activationkey_disable()
+ return
+
+ details = { 'disabled' : True }
+
+ for akey in args:
+ self.client.activationkey.setDetails(self.session, akey, details)
+
+####################
+
+def help_activationkey_enable(self):
+ print 'activationkey_enable: Enable an activation key'
+ print
+ print 'usage: activationkey_enable KEY [KEY ...]'
+
+def complete_activationkey_enable(self, text, line, beg, end):
+ parts = line.split(' ')
+
+ if len(parts) >= 2:
+ return tab_completer(self.do_activationkey_list('', True), text)
+
+def do_activationkey_enable(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args) >= 1:
+ self.help_activationkey_enable()
+ return
+
+ details = { 'disabled' : False }
+
+ for akey in args:
+ self.client.activationkey.setDetails(self.session, akey, details)
# vim:ts=4:expandtab:
11 years, 2 months
Changes to 'refs/tags/spacecmd-1.9.3-1'
by aparsons
Tag 'spacecmd-1.9.3-1' created by Aron Parsons <aronparsons(a)gmail.com> at 2013-03-04 00:13 +0000
Tagging package [spacecmd] version [1.9.3-1] in directory [spacecmd/].
Changes since spacewalk-web-1.9.21-1:
Aron Parsons (19):
spacecmd: print the function's help message when -h in the argument list
spacecmd: don't reuse variable names in parse_arguments
spacecmd: don't exit when invalid arguments are passed to a function
spacecmd: print the name in the confirmation message of snippet_create
spacecmd: add a delay before regenerating the system cache after a delete
spacecmd: standardize the behavior for when a system ID is not returned
spacecmd: print a clearer error message when duplicate system names are found
spacecmd: return a unique set from expand_systems
spacecmd: print the list of systems in system_reboot
spacecmd: print the list of systems in system_runscript
spacecmd: remove some commented out code
spacecmd: add new function repo_delete
spacecmd: add new function repo_create
spacecmd: add new function repo_rename
spacecmd: add new function repo_updateurl
spacecmd: add new function softwarechannel_syncrepos
spacecmd: update copyright years
spacecmd: update email addresses in copyright notices
Automatic commit of package [spacecmd] release [1.9.3-1].
Jose Simonelli (1):
spacecmd: print file path in package_details
Stephen Herr (2):
fixing typo in build-props.xml
dwr is required for building now
Zailo Leite (1):
spacecmd: handle binary files correctly in configfile_getinfo
---
java/buildconf/build-props.xml | 4 -
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 24 ++++++-
spacecmd/src/bin/spacecmd | 2
spacecmd/src/doc/README | 2
spacecmd/src/doc/spacecmd.1 | 2
spacecmd/src/lib/activationkey.py | 4 -
spacecmd/src/lib/configchannel.py | 5 -
spacecmd/src/lib/cryptokey.py | 2
spacecmd/src/lib/custominfo.py | 2
spacecmd/src/lib/distribution.py | 2
spacecmd/src/lib/errata.py | 4 -
spacecmd/src/lib/filepreservation.py | 2
spacecmd/src/lib/group.py | 6 -
spacecmd/src/lib/kickstart.py | 4 -
spacecmd/src/lib/misc.py | 19 +++--
spacecmd/src/lib/optionparser.py | 29 ++++++++
spacecmd/src/lib/org.py | 2
spacecmd/src/lib/package.py | 3
spacecmd/src/lib/repo.py | 118 ++++++++++++++++++++++++++++++++++-
spacecmd/src/lib/report.py | 2
spacecmd/src/lib/schedule.py | 2
spacecmd/src/lib/shell.py | 4 -
spacecmd/src/lib/snippet.py | 3
spacecmd/src/lib/softwarechannel.py | 29 ++++++++
spacecmd/src/lib/ssm.py | 2
spacecmd/src/lib/system.py | 57 ++++++++--------
spacecmd/src/lib/user.py | 4 -
spacecmd/src/lib/utils.py | 12 +--
29 files changed, 278 insertions(+), 75 deletions(-)
---
11 years, 2 months
7 commits - rel-eng/packages spacecmd/spacecmd.spec spacecmd/src
by aparsons
rel-eng/packages/spacecmd | 2
spacecmd/spacecmd.spec | 24 +++++++++
spacecmd/src/bin/spacecmd | 2
spacecmd/src/doc/README | 2
spacecmd/src/doc/spacecmd.1 | 2
spacecmd/src/lib/activationkey.py | 4 -
spacecmd/src/lib/configchannel.py | 4 -
spacecmd/src/lib/cryptokey.py | 2
spacecmd/src/lib/custominfo.py | 2
spacecmd/src/lib/distribution.py | 2
spacecmd/src/lib/errata.py | 4 -
spacecmd/src/lib/filepreservation.py | 2
spacecmd/src/lib/group.py | 2
spacecmd/src/lib/kickstart.py | 4 -
spacecmd/src/lib/misc.py | 4 -
spacecmd/src/lib/org.py | 2
spacecmd/src/lib/package.py | 2
spacecmd/src/lib/repo.py | 88 ++++++++++++++++++++++++++++++++++-
spacecmd/src/lib/report.py | 2
spacecmd/src/lib/schedule.py | 2
spacecmd/src/lib/shell.py | 2
spacecmd/src/lib/snippet.py | 2
spacecmd/src/lib/softwarechannel.py | 29 ++++++++++-
spacecmd/src/lib/ssm.py | 2
spacecmd/src/lib/system.py | 4 -
spacecmd/src/lib/user.py | 4 -
spacecmd/src/lib/utils.py | 4 -
27 files changed, 169 insertions(+), 36 deletions(-)
New commits:
commit 283bfd0828d9f07244ea51321199ec29e3c60252
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:13:52 2013 -0500
Automatic commit of package [spacecmd] release [1.9.3-1].
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index a7c85e0..7a65d1e 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-1.9.2-1 spacecmd/
+1.9.3-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index 0ab4555..4adaafc 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 1.9.2
+Version: 1.9.3
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -60,6 +60,28 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Sun Mar 03 2013 Aron Parsons <aronparsons(a)gmail.com> 1.9.3-1
+- update email addresses in copyright notices
+- update copyright years
+- add new function softwarechannel_syncrepos
+- add new function repo_updateurl
+- add new function repo_rename
+- add new function repo_create
+- add new function repo_delete
+- remove some commented out code
+- print the list of systems in system_runscript
+- print the list of systems in system_reboot
+- return a unique set from expand_systems
+- print a clearer error message when duplicate system names are found
+- standardize the behavior for when a system ID is not returned
+- add a delay before regenerating the system cache after a delete
+- handle binary files correctly in configfile_getinfo
+- print the name in the confirmation message of snippet_create
+- don't exit when invalid arguments are passed to a function
+- don't reuse variable names in parse_arguments
+- print the function's help message when -h in the argument list
+- print file path in package_details
+
* Thu Feb 28 2013 Michael Mraka <michael.mraka(a)redhat.com> 1.9.2-1
- fixing broken export of configchannels with symlinks
commit 278b4a3065f5d3e30f1c1ade4b322410865645c0
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:13:12 2013 -0500
spacecmd: update email addresses in copyright notices
diff --git a/spacecmd/src/bin/spacecmd b/spacecmd/src/bin/spacecmd
index 1e87f27..1cc7d4c 100755
--- a/spacecmd/src/bin/spacecmd
+++ b/spacecmd/src/bin/spacecmd
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
""" spacecmd - a command line interface to Spacewalk """
diff --git a/spacecmd/src/doc/README b/spacecmd/src/doc/README
index 627c7d0..9d17b13 100644
--- a/spacecmd/src/doc/README
+++ b/spacecmd/src/doc/README
@@ -1,6 +1,6 @@
spacecmd - a command line interface to Spacewalk and Satellite servers
-Author: Aron Parsons <aron(a)redhat.com>
+Author: Aron Parsons <aronparsons(a)gmail.com>
Homepage: https://fedorahosted.org/spacewalk/wiki/spacecmd
# Requirements
diff --git a/spacecmd/src/doc/spacecmd.1 b/spacecmd/src/doc/spacecmd.1
index 045932e..1393376 100644
--- a/spacecmd/src/doc/spacecmd.1
+++ b/spacecmd/src/doc/spacecmd.1
@@ -225,4 +225,4 @@ https://fedorahosted.org/spacewalk/wiki/spacecmd
.nf
.fi
.SH AUTHOR
-spacecmd was written by Aron Parsons <aron(a)redhat.com>
+spacecmd was written by Aron Parsons <aronparsons(a)gmail.com>
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index f9422bb..3162d6d 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2011--2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/configchannel.py b/spacecmd/src/lib/configchannel.py
index 3fe88b9..e8bf556 100644
--- a/spacecmd/src/lib/configchannel.py
+++ b/spacecmd/src/lib/configchannel.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2011--2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/cryptokey.py b/spacecmd/src/lib/cryptokey.py
index efbaaff..68f22d5 100644
--- a/spacecmd/src/lib/cryptokey.py
+++ b/spacecmd/src/lib/cryptokey.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/custominfo.py b/spacecmd/src/lib/custominfo.py
index deaea27..4db33b3 100644
--- a/spacecmd/src/lib/custominfo.py
+++ b/spacecmd/src/lib/custominfo.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/distribution.py b/spacecmd/src/lib/distribution.py
index 552ae21..7e1a0ad 100644
--- a/spacecmd/src/lib/distribution.py
+++ b/spacecmd/src/lib/distribution.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/errata.py b/spacecmd/src/lib/errata.py
index b7bfb60..fbf46b4 100644
--- a/spacecmd/src/lib/errata.py
+++ b/spacecmd/src/lib/errata.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/filepreservation.py b/spacecmd/src/lib/filepreservation.py
index 9aea456..1f92a2c 100644
--- a/spacecmd/src/lib/filepreservation.py
+++ b/spacecmd/src/lib/filepreservation.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/group.py b/spacecmd/src/lib/group.py
index adbeb36..ab2fbfd 100644
--- a/spacecmd/src/lib/group.py
+++ b/spacecmd/src/lib/group.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/kickstart.py b/spacecmd/src/lib/kickstart.py
index 2b76d2b..ddb4fc8 100644
--- a/spacecmd/src/lib/kickstart.py
+++ b/spacecmd/src/lib/kickstart.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 86e02f5..6273eb4 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2011--2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/org.py b/spacecmd/src/lib/org.py
index 0460950..2cb12db 100644
--- a/spacecmd/src/lib/org.py
+++ b/spacecmd/src/lib/org.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/package.py b/spacecmd/src/lib/package.py
index ebf5d16..830c632 100644
--- a/spacecmd/src/lib/package.py
+++ b/spacecmd/src/lib/package.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/repo.py b/spacecmd/src/lib/repo.py
index f53829c..d6951a1 100644
--- a/spacecmd/src/lib/repo.py
+++ b/spacecmd/src/lib/repo.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2011 Aron Parsons <aron(a)redhat.com>
+# Copyright 2011 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index 9cc5dfb..b0faadc 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/schedule.py b/spacecmd/src/lib/schedule.py
index d921216..f193dd8 100644
--- a/spacecmd/src/lib/schedule.py
+++ b/spacecmd/src/lib/schedule.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/shell.py b/spacecmd/src/lib/shell.py
index cbe055c..64bcbee 100644
--- a/spacecmd/src/lib/shell.py
+++ b/spacecmd/src/lib/shell.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/snippet.py b/spacecmd/src/lib/snippet.py
index b74beb9..caeee75 100644
--- a/spacecmd/src/lib/snippet.py
+++ b/spacecmd/src/lib/snippet.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index 4651d31..e0b86d8 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2011--2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/ssm.py b/spacecmd/src/lib/ssm.py
index caf6879..2490ec7 100644
--- a/spacecmd/src/lib/ssm.py
+++ b/spacecmd/src/lib/ssm.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index fdd1040..b57ff72 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/user.py b/spacecmd/src/lib/user.py
index 63f9c49..688e76f 100644
--- a/spacecmd/src/lib/user.py
+++ b/spacecmd/src/lib/user.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2013 Red Hat, Inc.
#
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index aa88ac7..1e7aac9 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
# Copyright (c) 2011--2013 Red Hat, Inc.
#
commit 53d825a41c66744fe6e3ffdec22a966835af25a1
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:12:33 2013 -0500
spacecmd: update copyright years
diff --git a/spacecmd/src/bin/spacecmd b/spacecmd/src/bin/spacecmd
index 9094ce9..1e87f27 100755
--- a/spacecmd/src/bin/spacecmd
+++ b/spacecmd/src/bin/spacecmd
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
""" spacecmd - a command line interface to Spacewalk """
diff --git a/spacecmd/src/lib/activationkey.py b/spacecmd/src/lib/activationkey.py
index 904c59c..f9422bb 100644
--- a/spacecmd/src/lib/activationkey.py
+++ b/spacecmd/src/lib/activationkey.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2011--2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/configchannel.py b/spacecmd/src/lib/configchannel.py
index 8e3b4c5..3fe88b9 100644
--- a/spacecmd/src/lib/configchannel.py
+++ b/spacecmd/src/lib/configchannel.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2011--2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/cryptokey.py b/spacecmd/src/lib/cryptokey.py
index c59d718..efbaaff 100644
--- a/spacecmd/src/lib/cryptokey.py
+++ b/spacecmd/src/lib/cryptokey.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/custominfo.py b/spacecmd/src/lib/custominfo.py
index c505e51..deaea27 100644
--- a/spacecmd/src/lib/custominfo.py
+++ b/spacecmd/src/lib/custominfo.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/distribution.py b/spacecmd/src/lib/distribution.py
index 14b66ed..552ae21 100644
--- a/spacecmd/src/lib/distribution.py
+++ b/spacecmd/src/lib/distribution.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/errata.py b/spacecmd/src/lib/errata.py
index c2e2983..b7bfb60 100644
--- a/spacecmd/src/lib/errata.py
+++ b/spacecmd/src/lib/errata.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/filepreservation.py b/spacecmd/src/lib/filepreservation.py
index 0fae28f..9aea456 100644
--- a/spacecmd/src/lib/filepreservation.py
+++ b/spacecmd/src/lib/filepreservation.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/group.py b/spacecmd/src/lib/group.py
index 168716a..adbeb36 100644
--- a/spacecmd/src/lib/group.py
+++ b/spacecmd/src/lib/group.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/kickstart.py b/spacecmd/src/lib/kickstart.py
index 3ed6b4d..2b76d2b 100644
--- a/spacecmd/src/lib/kickstart.py
+++ b/spacecmd/src/lib/kickstart.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 6ca7a82..86e02f5 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2011--2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/org.py b/spacecmd/src/lib/org.py
index 8953936..0460950 100644
--- a/spacecmd/src/lib/org.py
+++ b/spacecmd/src/lib/org.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/package.py b/spacecmd/src/lib/package.py
index 7d7bfff..ebf5d16 100644
--- a/spacecmd/src/lib/package.py
+++ b/spacecmd/src/lib/package.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/report.py b/spacecmd/src/lib/report.py
index fb5cb83..9cc5dfb 100644
--- a/spacecmd/src/lib/report.py
+++ b/spacecmd/src/lib/report.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/schedule.py b/spacecmd/src/lib/schedule.py
index 00cc9b9..d921216 100644
--- a/spacecmd/src/lib/schedule.py
+++ b/spacecmd/src/lib/schedule.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/shell.py b/spacecmd/src/lib/shell.py
index 803c794..cbe055c 100644
--- a/spacecmd/src/lib/shell.py
+++ b/spacecmd/src/lib/shell.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/snippet.py b/spacecmd/src/lib/snippet.py
index 884875f..b74beb9 100644
--- a/spacecmd/src/lib/snippet.py
+++ b/spacecmd/src/lib/snippet.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index f92b1c9..4651d31 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2011--2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/ssm.py b/spacecmd/src/lib/ssm.py
index cf21c99..caf6879 100644
--- a/spacecmd/src/lib/ssm.py
+++ b/spacecmd/src/lib/ssm.py
@@ -15,7 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 074d0d1..fdd1040 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/user.py b/spacecmd/src/lib/user.py
index 5271619..63f9c49 100644
--- a/spacecmd/src/lib/user.py
+++ b/spacecmd/src/lib/user.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index 0f4c569..aa88ac7 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -15,8 +15,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-# Copyright 2010 Aron Parsons <aron(a)redhat.com>
-# Copyright (c) 2011--2012 Red Hat, Inc.
+# Copyright 2013 Aron Parsons <aron(a)redhat.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
#
# NOTE: the 'self' variable is an instance of SpacewalkShell
commit 55072ea5a2fa856c8b21a687dac54be553269661
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:10:05 2013 -0500
spacecmd: add new function softwarechannel_syncrepos
diff --git a/spacecmd/src/lib/softwarechannel.py b/spacecmd/src/lib/softwarechannel.py
index b5a4bd1..f92b1c9 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -1573,4 +1573,29 @@ def do_softwarechannel_sync(self, args):
target_channel,
list(target_only) )
+####################
+
+def help_softwarechannel_syncrepos(self):
+ print 'softwarechannel_syncrepos: '
+ print 'Sync users repos for a software channel'
+ print
+ print 'usage: softwarechannel_syncrepos <CHANNEL ...>'
+
+def complete_softwarechannel_syncrepos(self, text, line, beg, end):
+ return tab_completer(self.do_softwarechannel_list('', True), text)
+
+def do_softwarechannel_syncrepos(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args):
+ self.help_softwarechannel_syncrepos()
+ return
+
+ # allow globbing of software channel names
+ channels = filter_results(self.do_softwarechannel_list('', True), args)
+
+ for channel in channels:
+ logging.debug('Syncing repos for %s' % channel)
+ self.client.channel.software.syncRepo(self.session, channel)
+
# vim:ts=4:expandtab:
commit 89e34b1edcbe14ab4dad49c52e744d07b2b68a36
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:04:37 2013 -0500
spacecmd: add new function repo_updateurl
diff --git a/spacecmd/src/lib/repo.py b/spacecmd/src/lib/repo.py
index ad4f200..f53829c 100644
--- a/spacecmd/src/lib/repo.py
+++ b/spacecmd/src/lib/repo.py
@@ -304,3 +304,26 @@ def do_repo_rename(self, args):
newname = args[1]
self.client.channel.software.updateRepoLabel(self.session, oldname, newname)
+
+####################
+
+def help_repo_updateurl(self):
+ print 'repo_updateurl: Change the URL of a user repository'
+ print 'usage: repo_updateurl <repo> <url>'
+
+def complete_repo_updateurl(self, text, line, beg, end):
+ if len(line.split(' ')) == 2:
+ return tab_completer(self.do_repo_list('', True),
+ text)
+
+def do_repo_updateurl(self, args):
+ (args, options) = parse_arguments(args)
+
+ if len(args) != 2:
+ self.help_repo_updateurl()
+ return
+
+ name = args[0]
+ url = args[1]
+
+ self.client.channel.software.updateRepoUrl(self.session, name, url)
commit 2d0f4b68018569b3d76a88e0e299cbe14535e230
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 19:01:56 2013 -0500
spacecmd: add new function repo_rename
diff --git a/spacecmd/src/lib/repo.py b/spacecmd/src/lib/repo.py
index f0287b2..ad4f200 100644
--- a/spacecmd/src/lib/repo.py
+++ b/spacecmd/src/lib/repo.py
@@ -275,3 +275,32 @@ def do_repo_create(self, args):
options.name,
'yum',
options.url)
+
+####################
+
+def help_repo_rename(self):
+ print 'repo_rename: Rename a user repository'
+ print 'usage: repo_rename OLDNAME NEWNAME'
+
+def complete_repo_rename(self, text, line, beg, end):
+ if len(line.split(' ')) <= 2:
+ return tab_completer(self.do_repo_list('', True),
+ text)
+
+def do_repo_rename(self, args):
+ (args, options) = parse_arguments(args)
+
+ if len(args) != 2:
+ self.help_repo_rename()
+ return
+
+ try:
+ details = self.client.channel.software.getRepoDetails(self.session, args[0])
+ oldname = details.get('id')
+ except:
+ logging.error('Could not find repo %s' % args[0])
+ return False
+
+ newname = args[1]
+
+ self.client.channel.software.updateRepoLabel(self.session, oldname, newname)
commit 33d8495c53ce8dc3384c997bf3c3d808352e0c52
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:55:14 2013 -0500
spacecmd: add new function repo_create
diff --git a/spacecmd/src/lib/repo.py b/spacecmd/src/lib/repo.py
index 711a2ca..f0287b2 100644
--- a/spacecmd/src/lib/repo.py
+++ b/spacecmd/src/lib/repo.py
@@ -20,6 +20,7 @@
# NOTE: the 'self' variable is an instance of SpacewalkShell
+from optparse import Option
from spacecmd.utils import *
import shlex
@@ -241,3 +242,36 @@ def do_repo_delete(self, args):
self.client.channel.software.removeRepo(self.session, repo)
except:
logging.error('Failed to remove repo %s' % repo)
+
+####################
+
+def help_repo_create(self):
+ print 'repo_create: Create a user repository'
+ print '''usage: repo_create [options]
+
+options:
+ -n NAME
+ -u URL'''
+
+def do_repo_create(self, args):
+ options = [ Option('-n', '--name', action='store'),
+ Option('-u', '--url', action='store') ]
+
+ (args, options) = parse_arguments(args, options)
+
+ if is_interactive(options):
+ options.name = prompt_user('Name:', noblank = True)
+ options.url = prompt_user('URL:', noblank = True)
+ else:
+ if not options.name:
+ logging.error('A name is required')
+ return
+
+ if not options.url:
+ logging.error('A URL is required')
+ return
+
+ self.client.channel.software.createRepo(self.session,
+ options.name,
+ 'yum',
+ options.url)
11 years, 2 months
8 commits - spacecmd/src
by aparsons
spacecmd/src/lib/group.py | 4 +--
spacecmd/src/lib/misc.py | 15 +++++++++---
spacecmd/src/lib/repo.py | 30 +++++++++++++++++++++++++
spacecmd/src/lib/system.py | 53 ++++++++++++++++++++++-----------------------
4 files changed, 70 insertions(+), 32 deletions(-)
New commits:
commit 99967502a3254791f52dc39e6215ec2af567c659
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:49:15 2013 -0500
spacecmd: add new function repo_delete
diff --git a/spacecmd/src/lib/repo.py b/spacecmd/src/lib/repo.py
index b6a3d00..711a2ca 100644
--- a/spacecmd/src/lib/repo.py
+++ b/spacecmd/src/lib/repo.py
@@ -211,3 +211,33 @@ def do_repo_clearfilters(self, args):
if self.user_confirm('Remove these filters [y/N]:'):
self.client.channel.software.clearRepoFilters(self.session, args[0])
+
+####################
+
+def help_repo_delete(self):
+ print 'repo_delete: Delete a user repo'
+ print 'usage: repo_delete <repo ...>'
+
+def complete_repo_delete(self, text, line, beg, end):
+ return tab_completer(self.do_repo_list('', True), text)
+
+def do_repo_delete(self, args):
+ (args, options) = parse_arguments(args)
+
+ if not len(args):
+ self.help_repo_delete()
+ return
+
+ # allow globbing of repo names
+ repos = filter_results(self.do_repo_list('', True), args)
+
+ print 'Repos'
+ print '-----'
+ print '\n'.join(sorted(repos))
+
+ if self.user_confirm('Delete these repos [y/N]:'):
+ for repo in repos:
+ try:
+ self.client.channel.software.removeRepo(self.session, repo)
+ except:
+ logging.error('Failed to remove repo %s' % repo)
commit f9e37c5b44c1f3f04338da6f5855e73433fc925b
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:41:39 2013 -0500
spacecmd: remove some commented out code
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index d0d50c0..074d0d1 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -1251,13 +1251,6 @@ def do_system_addconfigfile(self, args, update_path=''):
self.client.system.config.createOrUpdateSymlink(self.session,
system_id, options.path, file_info, localopt)
else:
-# # compatibility for Satellite 5.3
-# if not self.check_api_version('10.11'):
-# del file_info['selinux_ctx']
-#
-# if file_info.has_key('revision'):
-# del file_info['revision']
-#
self.client.system.config.createOrUpdatePath(self.session,
system_id, options.path, options.directory, file_info,
localopt)
commit 2351a08aeab228b91d544a323b249d44ebf61da1
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:40:50 2013 -0500
spacecmd: print the list of systems in system_runscript
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index ea55289..d0d50c0 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -383,6 +383,10 @@ def do_system_runscript(self, args):
print 'Script Contents'
print '---------------'
print script_contents
+
+ print 'Systems'
+ print '-------'
+ print '\n'.join(sorted(systems))
# have the user confirm
if not self.user_confirm(): return
commit 5cc5c68c301293c252dcf53d56c837e9ea7c755f
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:39:47 2013 -0500
spacecmd: print the list of systems in system_reboot
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 54bb63a..ea55289 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -168,6 +168,12 @@ def do_system_reboot(self, args):
else:
systems = self.expand_systems(args)
+ print
+
+ print 'Systems'
+ print '-------'
+ print '\n'.join(sorted(systems))
+
if not self.user_confirm('Reboot these systems [y/N]:'): return
action_time = parse_time_input('now')
commit 7324513b0df53d51000c9bb39ee7235ca608266b
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:29:07 2013 -0500
spacecmd: return a unique set from expand_systems
Convert the system list into a set in expand_systems and then back
into a list to return. This prevents duplicate system names from
printing multiple error messages. Also, the same system should never
be in the list of systems twice.
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 3a4f86b..6ca7a82 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -791,7 +791,7 @@ def expand_systems(self, args):
matches = filter_results(self.get_system_names(), systems)
- return matches + system_ids
+ return list(set(matches + system_ids))
def list_base_channels(self):
commit 3a815ffb55f2413dd68d8978802b431e0eaba645
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:22:24 2013 -0500
spacecmd: print a clearer error message when duplicate system names are found
Tell the user to either use system IDs or to cleanup their mess when duplicate
system names are found. spacecmd does not know which system you are referring
to when this is the case and chooses to not return bad information.
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index cbd3cf4..3a4f86b 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -700,14 +700,16 @@ def get_system_id(self, name):
logging.warning("Can't find system ID for %s" % name)
return 0
else:
- logging.warning('Duplicate system profile names found')
- logging.warning("You can delete duplicates with 'system_delete'")
+ logging.warning('Duplicate system profile names found!')
+ logging.warning("Please reference systems by ID or resolve the")
+ logging.warning("underlying issue with 'system_delete' or 'system_rename'")
id_list = '%s = ' % name
for id in systems:
id_list = id_list + '%i, ' % id
+ logging.warning('')
logging.warning(id_list[:-2])
return 0
commit 007bb1a9968a7dd082a35e08b9d19f8d9b044e6f
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:21:45 2013 -0500
spacecmd: standardize the behavior for when a system ID is not returned
diff --git a/spacecmd/src/lib/group.py b/spacecmd/src/lib/group.py
index 393a818..168716a 100644
--- a/spacecmd/src/lib/group.py
+++ b/spacecmd/src/lib/group.py
@@ -58,7 +58,7 @@ def do_group_addsystems(self, args):
system_ids = []
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
system_ids.append(system_id)
self.client.systemgroup.addOrRemoveSystems(self.session,
@@ -101,7 +101,7 @@ def do_group_removesystems(self, args):
system_ids = []
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
system_ids.append(system_id)
print 'Systems'
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index 5981cfe..54bb63a 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -404,7 +404,7 @@ def do_system_runscript(self, args):
# scheduled individually
for system in systems:
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
try:
action_id = \
@@ -459,7 +459,7 @@ def do_system_listhardware(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
cpu = self.client.system.getCpu(self.session, system_id)
memory = self.client.system.getMemory(self.session, system_id)
@@ -808,7 +808,7 @@ def do_system_upgradepackage(self, args):
jobs = {}
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
packages = \
self.client.system.listLatestUpgradablePackages(self.session,
@@ -891,7 +891,7 @@ def do_system_listupgrades(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
packages = \
self.client.system.listLatestUpgradablePackages(self.session,
@@ -942,7 +942,7 @@ def do_system_listinstalledpackages(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
packages = self.client.system.listPackages(self.session,
system_id)
@@ -984,7 +984,7 @@ def do_system_listconfigchannels(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -1070,7 +1070,7 @@ def do_system_listconfigfiles(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -1474,7 +1474,7 @@ def do_system_delete(self, args):
# get the system ID for each system
for system in systems:
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
system_ids.append(system_id)
@@ -1989,7 +1989,7 @@ def do_system_listbasechannel(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -2031,7 +2031,7 @@ def do_system_listchildchannels(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -2111,7 +2111,7 @@ def do_system_details(self, args, short=False):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
last_checkin = \
self.client.system.getName(self.session,
@@ -2241,7 +2241,7 @@ def do_system_listerrata(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -2321,7 +2321,7 @@ def do_system_listevents(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -2365,7 +2365,7 @@ def do_system_listentitlements(self, args):
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
if add_separator: print self.SEPARATOR
add_separator = True
@@ -2547,9 +2547,7 @@ def do_system_createpackageprofile(self, args):
return
system_id = self.get_system_id(args[0])
- if not system_id:
- logging.error('Invalid system')
- return
+ if not system_id: return
if is_interactive(options):
options.name = prompt_user('Profile Label:', noblank = True)
@@ -2840,7 +2838,7 @@ def do_system_comparewithchannel(self, args):
channel_latest={}
for system in sorted(systems):
system_id = self.get_system_id(system)
- if not system_id: return
+ if not system_id: continue
instpkgs = self.client.system.listPackages(self.session,\
system_id)
commit bd42259eb9d71ace802481d836e6595aa876c065
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 18:00:36 2013 -0500
spacecmd: add a delay before regenerating the system cache after a delete
We immediately regenerate the system cache after deleting a system. However,
Spacewalk does not immediately delete the system, so we introduce an artificial
delay of 1 second before listing the systems again from the server. Limited
testing shows that this amount of delay is adequate.
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index bbeb667..cbd3cf4 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -25,6 +25,7 @@ import logging, readline, shlex
from getpass import getpass
from ConfigParser import NoOptionError
from spacecmd.utils import *
+from time import sleep
# list of system selection options for the help output
HELP_SYSTEM_OPTS = '''<SYSTEMS> can be any of the following:
@@ -591,7 +592,7 @@ def clear_system_cache(self):
self.save_system_cache()
-def generate_system_cache(self, force=False):
+def generate_system_cache(self, force = False, delay = 0):
if not force and datetime.now() < self.system_cache_expire:
return
@@ -599,6 +600,10 @@ def generate_system_cache(self, force=False):
# tell the user what's going on
self.replace_line_buffer('** Generating system cache **')
+ # we might need to wait for some systems to delete
+ if delay:
+ sleep(delay)
+
systems = self.client.system.listSystems(self.session)
self.all_systems = {}
diff --git a/spacecmd/src/lib/system.py b/spacecmd/src/lib/system.py
index e344fc3..5981cfe 100644
--- a/spacecmd/src/lib/system.py
+++ b/spacecmd/src/lib/system.py
@@ -1502,7 +1502,7 @@ def do_system_delete(self, args):
logging.info('Deleted %i system(s)', len(system_ids))
# regenerate the system name cache
- self.generate_system_cache(True)
+ self.generate_system_cache(True, delay = 1)
# remove these systems from the SSM
for s in systems:
11 years, 2 months
spacecmd/src
by aparsons
spacecmd/src/lib/configchannel.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit e05e2f3b0afb1ffb95a6aa57815c80e9b98304b5
Author: Zailo Leite <zleite(a)caltech.edu>
Date: Sun Mar 3 17:39:56 2013 -0500
spacecmd: handle binary files correctly in configfile_getinfo
Signed-off-by: Aron Parsons <aronparsons(a)gmail.com>
diff --git a/spacecmd/src/lib/configchannel.py b/spacecmd/src/lib/configchannel.py
index 02fba9d..8e3b4c5 100644
--- a/spacecmd/src/lib/configchannel.py
+++ b/spacecmd/src/lib/configchannel.py
@@ -533,6 +533,7 @@ def configfile_getinfo(self, args, options, file_info=None, interactive=False):
if options.binary:
file_info['contents_enc64'] = True
+ file_info['binary'] = True
print 'Path: %s' % options.path
print 'Directory: %s' % options.directory
11 years, 2 months
4 commits - spacecmd/src
by aparsons
spacecmd/src/lib/optionparser.py | 29 +++++++++++++++++++++++++++++
spacecmd/src/lib/shell.py | 2 +-
spacecmd/src/lib/snippet.py | 1 +
spacecmd/src/lib/utils.py | 8 ++++----
4 files changed, 35 insertions(+), 5 deletions(-)
New commits:
commit 83a7c982faa5147ff221109368b715d63d8352b8
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 17:34:43 2013 -0500
spacecmd: print the name in the confirmation message of snippet_create
diff --git a/spacecmd/src/lib/snippet.py b/spacecmd/src/lib/snippet.py
index bbf38cc..884875f 100644
--- a/spacecmd/src/lib/snippet.py
+++ b/spacecmd/src/lib/snippet.py
@@ -130,6 +130,7 @@ def do_snippet_create(self, args, update_name = ''):
contents = read_file(options.file)
print
+ print 'Snippet: %s' % options.name
print 'Contents'
print '--------'
print contents
commit aa6d1c678db182185d0b7e0bd789719cd371eb79
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 17:33:22 2013 -0500
spacecmd: don't exit when invalid arguments are passed to a function
We use optparse to handle arguments to spacecmd functions. By default,
it will exit when there is an invalid argument passed to it. The only
way to override this is to sublcass OptionParser and change the behavior
of error(). Now, we just raise an exception with the original error,
which will be printed for the user to read.
diff --git a/spacecmd/src/lib/optionparser.py b/spacecmd/src/lib/optionparser.py
new file mode 100644
index 0000000..aabc543
--- /dev/null
+++ b/spacecmd/src/lib/optionparser.py
@@ -0,0 +1,29 @@
+#
+# Licensed under the GNU General Public License Version 3
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Copyright 2013 Aron Parsons <aronparsons(a)gmail.com>
+# Copyright (c) 2011--2013 Red Hat, Inc.
+#
+
+from optparse import OptionParser
+
+# optparse by default will exit when there is an error. when spacecmd
+# is in an interactive shell, we don't want to exit. instead, just
+# raise an exception that will printed for the user to read.
+class SpacecmdOptionParser(OptionParser):
+ def error(self, msg):
+ raise Exception(msg)
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index c232468..0f4c569 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -25,10 +25,10 @@ import logging, os, pickle, re, readline, shlex, sys, time, xmlrpclib
from collections import deque
from datetime import datetime, timedelta
from difflib import unified_diff
-from optparse import OptionParser
from tempfile import mkstemp
from textwrap import wrap
import rpm
+from spacecmd.optionparser import SpacecmdOptionParser
try:
import json
@@ -45,7 +45,7 @@ def parse_arguments(args, options = []):
# allow simple globbing
parts = [re.sub('\*', '.*', a) for a in parts]
- parser = OptionParser(option_list = options)
+ parser = SpacecmdOptionParser(option_list = options)
(opts, leftovers) = parser.parse_args(args = parts)
return leftovers, opts
commit db0ccfed15601e202f31e17098bf11c4d5fc9a32
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 17:19:47 2013 -0500
spacecmd: don't reuse variable names in parse_arguments
diff --git a/spacecmd/src/lib/utils.py b/spacecmd/src/lib/utils.py
index 1cee588..c232468 100644
--- a/spacecmd/src/lib/utils.py
+++ b/spacecmd/src/lib/utils.py
@@ -46,9 +46,9 @@ def parse_arguments(args, options = []):
parts = [re.sub('\*', '.*', a) for a in parts]
parser = OptionParser(option_list = options)
- (options, leftovers) = parser.parse_args(args = parts)
+ (opts, leftovers) = parser.parse_args(args = parts)
- return leftovers, options
+ return leftovers, opts
except IndexError:
return []
commit a062b45de87e1b083a0fe76e699374b917ffab01
Author: Aron Parsons <aronparsons(a)gmail.com>
Date: Sun Mar 3 17:17:51 2013 -0500
spacecmd: print the function's help message when -h in the argument list
diff --git a/spacecmd/src/lib/shell.py b/spacecmd/src/lib/shell.py
index 351cd9a..803c794 100644
--- a/spacecmd/src/lib/shell.py
+++ b/spacecmd/src/lib/shell.py
@@ -124,7 +124,7 @@ class SpacewalkShell(Cmd):
return ''
# print the help message for a command if the user passed --help
- if '--help' in parts:
+ if '--help' in parts or '-h' in parts:
return 'help %s' % command
# should we look for an item in the history?
11 years, 2 months
spacecmd/src
by aparsons
spacecmd/src/lib/package.py | 1 +
1 file changed, 1 insertion(+)
New commits:
commit ac6135a626a47ae7e8a71577850a7822a187143b
Author: Jose Simonelli <jsimonel(a)redhat.com>
Date: Sun Mar 3 16:55:54 2013 -0500
spacecmd: print file path in package_details
Signed-off-by: Aron Parsons <aronparsons(a)gmail.com>
diff --git a/spacecmd/src/lib/package.py b/spacecmd/src/lib/package.py
index 7f02786..7d7bfff 100644
--- a/spacecmd/src/lib/package.py
+++ b/spacecmd/src/lib/package.py
@@ -71,6 +71,7 @@ def do_package_details(self, args):
print 'Arch: %s' % details.get('arch_label')
print
print 'File: %s' % details.get('file')
+ print 'Path: %s' % details.get('path')
print 'Size: %s' % details.get('size')
print 'MD5: %s' % details.get('md5sum')
print
11 years, 2 months
java/buildconf
by StephenHerr
java/buildconf/build-props.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 5bbc441f75a184706de06569320a5035bf682284
Author: Stephen Herr <sherr(a)redhat.com>
Date: Fri Mar 1 18:46:04 2013 -0500
dwr is required for building now
diff --git a/java/buildconf/build-props.xml b/java/buildconf/build-props.xml
index 40fa0d1..391db6f 100644
--- a/java/buildconf/build-props.xml
+++ b/java/buildconf/build-props.xml
@@ -113,7 +113,7 @@
value="bcel cglib commons-beanutils commons-cli commons-codec
commons-collections commons-digester commons-discovery
commons-el commons-fileupload commons-io commons-lang commons-logging commons-validator hibernate3
- ${tomcat-jars} javamail jdom jpam
+ ${tomcat-jars} javamail jdom jpam dwr
log4j oro redstone-xmlrpc-client redstone-xmlrpc ${struts-jars}
jcommon stringtree-json postgresql-jdbc
${jfreechart} taglibs-core quartz
11 years, 2 months
java/buildconf
by StephenHerr
java/buildconf/build-props.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 1ed7c71ba825c091ab8629fef0876e7ae31d7348
Author: Stephen Herr <sherr(a)redhat.com>
Date: Fri Mar 1 18:32:45 2013 -0500
fixing typo in build-props.xml
diff --git a/java/buildconf/build-props.xml b/java/buildconf/build-props.xml
index e3cf661..40fa0d1 100644
--- a/java/buildconf/build-props.xml
+++ b/java/buildconf/build-props.xml
@@ -85,7 +85,7 @@
</condition>
<property name="build.jar.dependencies"
- value="ant ant-junit ${ant-contrib.path} antlr ${test.build.jar.dependenciess}
+ value="ant ant-junit ${ant-contrib.path} antlr ${test.build.jar.dependencies}
${common.jar.dependencies} tanukiwrapper ${tomcat-jars} ${jasper-jars}
concurrent xalan-j2" />
11 years, 2 months