Changeset 10692 in genesis
- Timestamp:
- May 6, 2012, 8:44:45 PM (13 years ago)
- Location:
- tools
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10682 r10692 161 161 162 162 163 def get_proxylist():164 """Get all available proxies proxyX sorting based on X number"""165 proxylist = sorted([os.path.basename(x) for x in glob.glob("%s/proxy*" % NODE_DIR)],166 key=lambda name: int(''.join([c for c in name if c in string.digits])),167 cmp=lambda x,y: x - y) + sorted([os.path.basename(x) for x in glob.glob("%s/Proxy*" % NODE_DIR)])168 return proxylist169 170 def get_hybridlist():171 """Get all available hybrid nodes/proxies"""172 hybridlist = sorted([os.path.basename(x) for x in glob.glob("%s/Hybrid*" % NODE_DIR)])173 return hybridlist174 175 163 176 164 def valid_addr(addr): … … 178 166 return str(addr).startswith('172.') 179 167 180 181 def get_nodelist(): 182 """ Get all available nodes - sorted """ 183 nodelist = sorted([os.path.basename(x) for x in glob.glob("%s/CNode*" % NODE_DIR)]) 184 return nodelist 168 def get_system_list(prefix): 169 return sorted([os.path.basename(os.path.dirname(x)) for x in glob.glob("%s/%s*/wleiden.yaml" % (NODE_DIR, prefix))]) 170 171 get_hybridlist = lambda: get_system_list("Hybrid") 172 get_nodelist = lambda: get_system_list("CNode") 173 get_proxylist = lambda: get_system_list("Proxy") 185 174 186 175 def get_hostlist():
Note:
See TracChangeset
for help on using the changeset viewer.