Hi spacewalkers,
I've updated the spacecmd "misc.py" file, to add new functions like
"is_monitoringenabled" and "list_proxies".
Can you review and add this patch upstream.
Cheers,
Gregor Grüner
>From f668db7aaf3a39053513280b98ddb20809c9f667 Mon Sep 17 00:00:00 2001
From: Gregor Gruener <ggru...@redhat.com>
Date: Thu, 1 Aug 2013 09:52:40 +0200
Subject: [PATCH] add new function is_monitoringenabled and list_proxies
---
rel-eng/packages/spacecmd | 2 +-
spacecmd/spacecmd.spec | 6 +++++-
spacecmd/src/lib/misc.py | 21 +++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/rel-eng/packages/spacecmd b/rel-eng/packages/spacecmd
index f9ca916..c88f653 100644
--- a/rel-eng/packages/spacecmd
+++ b/rel-eng/packages/spacecmd
@@ -1 +1 @@
-2.1.1-1 spacecmd/
+2.1.2-1 spacecmd/
diff --git a/spacecmd/spacecmd.spec b/spacecmd/spacecmd.spec
index f167795..0b79f58 100644
--- a/spacecmd/spacecmd.spec
+++ b/spacecmd/spacecmd.spec
@@ -4,7 +4,7 @@
%endif
Name: spacecmd
-Version: 2.1.1
+Version: 2.1.2
Release: 1%{?dist}
Summary: Command-line interface to Spacewalk and Satellite servers
@@ -64,6 +64,10 @@ touch %{buildroot}/%{python_sitelib}/spacecmd/__init__.py
%doc %{_mandir}/man1/spacecmd.1.gz
%changelog
+* Thu Aug 1 2013 Gregor Gruener <ggru...@redhat.com> 2.1.2-1
+- add new function is_monitoringenabled
+- add new function list_proxies
+
* Mon Jul 22 2013 Gregor Gruener <ggru...@redhat.com> 2.1.1-1
- add new function custominfo_updatekey
diff --git a/spacecmd/src/lib/misc.py b/spacecmd/src/lib/misc.py
index 6273eb4..21d2806 100644
--- a/spacecmd/src/lib/misc.py
+++ b/spacecmd/src/lib/misc.py
@@ -137,6 +137,27 @@ def do_get_certificateexpiration(self, args):
####################
+def help_is_monitoringenabled(self):
+ print 'is_monitoringenabled: Indicates if monitoring is enabled '
+ print " on the satellite "
+ print 'usage: is_monitoringenabled'
+
+def do_is_monitoringenabled(self, args):
+ monitoring = self.client.satellite.isMonitoringEnabled(self.session)
+ print monitoring
+
+####################
+
+def help_list_proxies(self):
+ print 'list_proxies: List the proxies wihtin the user\'s organization '
+ print 'usage: list_proxies'
+
+def do_list_proxies(self, args):
+ proxies = self.client.satellite.listProxies(self.session)
+ print proxies
+
+####################
+
def help_get_session(self):
print 'get_session: Show the current session string'
print 'usage: get_session'
--
1.8.3.1
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel