All patches committed.  They'll be available as of spacecmd-1.6.7-1.  Thanks 
Steve!

/aron
________________________________________
From: Steve Hardy [sha...@redhat.com]
Sent: Monday, November 07, 2011 7:21 AM
To: spacewalk-devel@redhat.com
Cc: apars...@redhat.com; Parsons, Aron
Subject: [PATCH 4/4] spacecmd enhancement : add softwarechannel_getorgaccess 
command

Adds a new softwarechannel_getorgaccess command

Signed-off-by: Steve Hardy <sha...@redhat.com>
---
 spacecmd/src/lib/softwarechannel.py |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/spacecmd/src/lib/softwarechannel.py 
b/spacecmd/src/lib/softwarechannel.py
index fba0fa0..cf72ee8 100644
--- a/spacecmd/src/lib/softwarechannel.py
+++ b/spacecmd/src/lib/softwarechannel.py
@@ -891,6 +891,28 @@ def do_softwarechannel_adderrata(self, args):
     self.generate_errata_cache(True)

 ####################
+def help_softwarechannel_getorgaccess(self):
+    print 'Get the org-access for the software channel'
+    print 'usage : softwarechannel_getorgaccess : get org access for all 
channels'
+    print 'usage : softwarechannel_getorgaccess <channel_label(s)> : get org 
access for specific channel(s)'
+
+def do_softwarechannel_getorgaccess(self, args):
+
+    (args, options) = parse_arguments(args)
+
+    # If no args are passed, we dump the org access for all channels
+    if not len(args):
+        channels = self.do_softwarechannel_list('', True)
+    else:
+        # allow globbing of software channel names
+        channels = filter_results(self.do_softwarechannel_list('', True), args)
+
+    for channel in channels:
+        logging.debug("Getting org-access for channel %s" % channel)
+        sharing = self.client.channel.access.getOrgSharing(self.session, 
channel)
+        print "%s : %s" % (channel, sharing)
+
+####################
 def help_softwarechannel_setorgaccess(self):
     print 'Set the org-access for the software channel'
     print '''usage : softwarechannel_setorgaccess <channel_label> [options]
--
1.7.1


_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to