3 # Parses the PLC configuration file /etc/planetlab/plc_config, which
4 # is bootstrapped by Boot Manager, but managed by us.
6 # Mark Huang <mlhuang@cs.princeton.edu>
7 # Copyright (C) 2006 The Trustees of Princeton University
14 Parses Python configuration files; all variables in the file are
15 assigned to class attributes.
18 def __init__(self, file = "/etc/planetlab/plc_config"):
20 execfile(file, self.__dict__)
22 raise Exception, "Could not parse " + file
24 if int(self.PLC_API_PORT) == 443:
29 uri += self.PLC_API_HOST + \
30 ":" + str(self.PLC_API_PORT) + \
31 "/" + self.PLC_API_PATH + "/"
33 self.plc_api_uri = uri