commit | 0c5d1fce066450fd3f31accf8ebb6ebc93e2e57c | [log] [tgz] |
---|---|---|
author | Michael Stroucken <stroucki@apache.org> | Tue Jun 26 20:37:30 2012 +0000 |
committer | Michael Stroucken <stroucki@apache.org> | Tue Jun 26 20:37:30 2012 +0000 |
tree | e0455d775965f6b6bd9b1e00e30c20b871f0730b | |
parent | 0a6ad98efbb038e95ec914f502345483cf3b8167 [diff] |
tashi-client: do error checking on parameters to getslots git-svn-id: https://svn.apache.org/repos/asf/incubator/tashi/trunk@1354214 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/tashi/client/tashi-client.py b/src/tashi/client/tashi-client.py index aa2325f..c3f23f0 100755 --- a/src/tashi/client/tashi-client.py +++ b/src/tashi/client/tashi-client.py
@@ -186,6 +186,14 @@ hosts = getVmLayout() count = 0 + if cores < 1: + print "Argument to cores must be 1 or greater." + return + + if memory <= 0: + print "Argument to memory must be greater than 0." + return + for h in hosts: if h.up is False or h.state != HostState.Normal: continue