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
committerMatthew Hicks <mhicks@mhicks-host.usersys.redhat.com>2008-07-15 17:35:36 -0400
commit43932658350c5d7499476308b2898122655425fa (patch)
tree058b56b815db0bfdb2f49565ef6d3362f00242b9 /contrib/func-find-resources
parent0ba40d383dd95419feb6fda780e5f78bf765dff1 (diff)
downloadthird_party-func-43932658350c5d7499476308b2898122655425fa.tar.gz
third_party-func-43932658350c5d7499476308b2898122655425fa.tar.xz
third_party-func-43932658350c5d7499476308b2898122655425fa.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]