summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2007-12-11 11:12:09 -0500
committerMichael DeHaan <mdehaan@redhat.com>2007-12-11 11:12:09 -0500
commit18e53b6d4a55c511393cde5fa7d28d2855c3a1f3 (patch)
treedce22d8df77aeccf0a7016f8925195128ee61471
parentef6fbe4bcdd5e5493fb46b7b04a4aa84d3d113ec (diff)
downloadthird_party-func-18e53b6d4a55c511393cde5fa7d28d2855c3a1f3.tar.gz
third_party-func-18e53b6d4a55c511393cde5fa7d28d2855c3a1f3.tar.xz
third_party-func-18e53b6d4a55c511393cde5fa7d28d2855c3a1f3.zip
Applied James Anthill's patch to generalize "show" features, plus a release
bump preparing for a new release to Fedora and EPEL mirrors.
-rw-r--r--AUTHORS1
-rw-r--r--docs/func.pod4
-rw-r--r--func.spec3
-rw-r--r--func/overlord/cmd_modules/show.py34
-rw-r--r--version2
5 files changed, 12 insertions, 32 deletions
diff --git a/AUTHORS b/AUTHORS
index ceef6cb..9730a8e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -11,6 +11,7 @@ func is written by (alphabetically) ...
Additional patches and contributions by ...
+ James Anthill <james@mail.and.org>
Vito Laurenza <vitolaurenza@gmail.com>
...
[ send in patches (or modules!) to get your name here ]
diff --git a/docs/func.pod b/docs/func.pod
index 7d5684a..ead976d 100644
--- a/docs/func.pod
+++ b/docs/func.pod
@@ -74,9 +74,9 @@ not going through the Python API (where you would not care).
func "*.example.org" show hardware --help
-func "*.example.org" show hardware --memory
+func "*.example.org" show hardware systemMemory
-func "*.example.org" show hardware --os
+func "*.example.org" show hardware os
Another useful helper command module is copyfile, which allows func to work like scp from
the shell, though it can address multiple systems at the same time.
diff --git a/func.spec b/func.spec
index 579093c..5dc91b3 100644
--- a/func.spec
+++ b/func.spec
@@ -86,6 +86,9 @@ fi
%changelog
+* Tue Dec 11 2007 Michael DeHaan <mdehaan@redhat.com> - 0.0.14-1
+- new release to mirrors
+
* Fri Oct 26 2007 Michael DeHaan <mdehaan@redhat.com> - 0.0.13-3
- Misc fixes per Fedora package-review
diff --git a/func/overlord/cmd_modules/show.py b/func/overlord/cmd_modules/show.py
index 22bac95..9582e0d 100644
--- a/func/overlord/cmd_modules/show.py
+++ b/func/overlord/cmd_modules/show.py
@@ -35,12 +35,6 @@ class ShowHardware(client.command.Command):
self.parser.add_option("-v", "--verbose", dest="verbose",
action="store_true")
self.parser.add_option("-p", "--port", dest="port")
- self.parser.add_option("", "--platform", dest="platform",
- action="store_true")
- self.parser.add_option("", "--memory", dest="memory",
- action="store_true")
- self.parser.add_option("","--os", dest="os",
- action="store_true")
def handleOptions(self, options):
@@ -67,35 +61,17 @@ class ShowHardware(client.command.Command):
# if the user
top_options = ["port","verbose"]
- # figure out of the user set any options we care about
- options_set = False
-
- #ugh, cant find a better way to do this. Look for args
- # that specify a "mode", if we set them, then don't
- # do the big dump
-
- # also, optparse is annoying -akl
- opt_list = ["--platform", "--memory", "--os"]
- for opt in opt_list:
- if self.parser.has_option(opt):
- options_set = True
-
-
for minion in results:
print "%s:" % minion
minion_data = results[minion]
- if not options_set:
+ # if user set no args
+ if not args:
pprint.pprint(minion_data)
continue
- if self.options.platform:
- print minion_data['platform']
-
- if self.options.memory:
- print minion_data["systemMemory"]
-
- if self.options.os:
- print minion_data["os"]
+ for arg in args:
+ if arg in minion_data:
+ print minion_data[arg]
class Show(client.command.Command):
name = "show"
diff --git a/version b/version
index 91bcf6d..44180d9 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-0.13 3
+0.14 1