git://git.onelab.eu
/
monitor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
26aa8a9
)
- Fix siteId() to work with new API
author
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 8 Feb 2007 19:59:03 +0000
(19:59 +0000)
committer
Marc Fiuczynski
<mef@cs.princeton.edu>
Thu, 8 Feb 2007 19:59:03 +0000
(19:59 +0000)
plc.py
patch
|
blob
|
history
diff --git
a/plc.py
b/plc.py
index
9b86ada
..
cf9cc76
100644
(file)
--- a/
plc.py
+++ b/
plc.py
@@
-5,7
+5,7
@@
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
# Copyright (C) 2006, 2007 The Trustees of Princeton University
#
# Faiyaz Ahmed <faiyaza@cs.princeton.edu>
# Copyright (C) 2006, 2007 The Trustees of Princeton University
#
-# $Id: plc.py,v 1.
4 2007/02/01 14:25:56
mef Exp $
+# $Id: plc.py,v 1.
5 2007/02/08 19:43:09
mef Exp $
#
from emailTxt import *
#
from emailTxt import *
@@
-36,11
+36,12
@@
def nodesDbg(argv):
def siteId(argv):
"""Returns loginbase for given nodename"""
def siteId(argv):
"""Returns loginbase for given nodename"""
- global api, a
non, a
uth
+ global api, auth
nodename = argv[0]
nodename = argv[0]
- site_id = api.AnonAdmQuerySite (anon, {"node_hostname": nodename})
- if len(site_id) == 1:
- loginbase = api.AnonAdmGetSites (anon, site_id, ["login_base"])
+ site_ids = api.GetNodes(auth, [nodename], ['site_id'])
+ if len(site_ids) == 1:
+ site_id = [site_ids[0]['site_id']]
+ loginbase = api.GetSites (auth, site_id, ["login_base"])
return loginbase[0]['login_base']
def slices(argv):
return loginbase[0]['login_base']
def slices(argv):