summaryrefslogtreecommitdiffstats
path: root/contrib/func-find-resources
diff options
context:
space:
mode:
authorMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-06-17 16:23:22 -0400
committerMatt Hicks <mhicks@localhost.localdomain>2008-07-07 16:54:50 -0400
commitf7a245e0e8adc329c7fa80e53064e369028dd790 (patch)
tree749f758fa747fa745973bc4af6c63fa4ad441f06 /contrib/func-find-resources
parent1d774702a1972f7f50b77a07553e59eeaebf0781 (diff)
downloadfunc-f7a245e0e8adc329c7fa80e53064e369028dd790.tar.gz
func-f7a245e0e8adc329c7fa80e53064e369028dd790.tar.xz
func-f7a245e0e8adc329c7fa80e53064e369028dd790.zip
Updated find_resources.py and func-find-resources script to look across minions
for enough RAM and a matching architecture to run a 'virt install' (koan) - Requires the freemem functionality enhancement to the virt.py module - Only allows Domain-0 shrink to 512M to keep it stable -- Technically, Domain-0 can be shrunk to 256M which is in accordance with how the freemem module reports available memory
Diffstat (limited to 'contrib/func-find-resources')
-rwxr-xr-xcontrib/func-find-resources11
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/func-find-resources b/contrib/func-find-resources
new file mode 100755
index 0000000..fc85ff7
--- /dev/null
+++ b/contrib/func-find-resources
@@ -0,0 +1,11 @@
+#!/usr/bin/python
+
+import sys
+import distutils.sysconfig
+import func.overlord.find_resources as find_resources
+
+find_res = find_resources.FindResources()
+avail_host = find_res.run(sys.argv)
+
+if avail_host:
+ print "%s" % avail_host[0]