in content/artifacts/daytrader_singleServer.py [0:0]
def getNodeId (prompt):
nodeList = AdminConfig.list("Node").split("\n")
if (len(nodeList) == 1):
node = nodeList[0]
else:
print ""
print "Available Nodes:"
nodeNameList = []
for item in nodeList:
item = item.rstrip()
name = getName(item)
nodeNameList.append(name)
print " " + name
#endFor
DefaultNode = nodeNameList[0]
if (prompt == ""):
prompt = "Select the desired node"
#endIf
nodeName = getValidInput(prompt+" ["+DefaultNode+"]:", DefaultNode, nodeNameList )
index = nodeNameList.index(nodeName)
node = nodeList[index]
#endElse
return node