git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
59b473a
)
added generate comon url method
author
Tony Mack
<tmack@cs.princeton.edu>
Wed, 10 Jun 2009 02:35:51 +0000
(
02:35
+0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Wed, 10 Jun 2009 02:35:51 +0000
(
02:35
+0000)
cmdline/getNodes.py
patch
|
blob
|
history
diff --git
a/cmdline/getNodes.py
b/cmdline/getNodes.py
index
be429f8
..
2675152
100644
(file)
--- a/
cmdline/getNodes.py
+++ b/
cmdline/getNodes.py
@@
-17,9
+17,8
@@
def create_parser():
(plain or rspec) that meet the specified crieteria. If no criteria is
specified, the default action is to return node comon considers 'alive'
(resptime > 0)"""
(plain or rspec) that meet the specified crieteria. If no criteria is
specified, the default action is to return node comon considers 'alive'
(resptime > 0)"""
- options = ['alive']
cmp_options = ['rwfs', 'uptime', 'loads', 'meminfo', 'kernver', 'cpuspeed', 'txrate', 'rxrate', 'numslices', 'liveslices']
cmp_options = ['rwfs', 'uptime', 'loads', 'meminfo', 'kernver', 'cpuspeed', 'txrate', 'rxrate', 'numslices', 'liveslices']
-
+ option = ['numslices', 'liveslices', 'gbfree']
parser = OptionParser(usage=usage,description=description)
for opt in options:
parser = OptionParser(usage=usage,description=description)
for opt in options:
@@
-36,6
+35,18
@@
def download_file(url, localFile):
localFile.close()
localFile.close()
+def generate_comon_url(options):
+ url = "select = 'resptime > 0"
+ query_dict = {}
+ query_dict['numslices'] = 'numslices %s= %s'
+ query_dict['liveslices'] = 'liveslices %s= %s'
+ query_dict['gbfree'] = 'gbfree %s= %s'
+
+ if options.numslices:
+ full_value = options.numslices
+
+ url += "'"
+
def get_comon_data():
date = datetime.now()
year = str(date.year)
def get_comon_data():
date = datetime.now()
year = str(date.year)
@@
-56,6
+67,7
@@
def get_comon_data():
def main():
parser = create_parser()
def main():
parser = create_parser()
+ (options, args) = parser.parse_args()
comon_file = get_comon_data()
comon_file = get_comon_data()