6 #NOTE: I'm so sorry for this.
8 # if this file deos not exist, then we will jump to the exception and use
9 # the local PLCSH without passing any additional arguments.
11 os.stat("/etc/planetlab/master.py")
12 sys.path.append("/etc/planetlab")
15 # Use the values given to us in the /etc/planetlab/master.py file taken from
16 # the master PLC and use them to construct the proper arguments to plcsh so
17 # that we can get a user list from managing, CoPLC
19 user=master.PLC_ROOT_USER
20 passwd=master.PLC_ROOT_PASSWORD
21 url = "https://" + master.PLC_API_HOST + ":" \
22 + master.PLC_API_PORT + master.PLC_API_PATH
24 cmd = "plcsh --user=%s --password=%s --url=%s %s" % (user,
25 passwd, url, " ".join(sys.argv[1:]))
27 cmd = "plcsh %s" % " ".join(sys.argv[1:])