if self.authUser:
self._plapi = plcapi.PLCAPI(
username = self.authUser,
- password = self.authString)
+ password = self.authString,
+ hostname = self.plcHost,
+ urlpattern = self.plcUrl
+ )
else:
# anonymous access - may not be enough for much
self._plapi = plcapi.PLCAPI()
get_attribute_value("authPass")
self.sliceSSHKey = self._attributes.\
get_attribute_value("sliceSSHKey")
+ self.plcHost = self._attributes.\
+ get_attribute_value("plcHost")
+ self.plcUrl = self._attributes.\
+ get_attribute_value("plcUrl")
super(TestbedController, self).do_setup()
def do_preconfigure(self):
"flags": Attribute.DesignOnly | Attribute.HasNoDefaultValue,
"validation_function": validation.is_string
}),
+ "plc_host": dict({
+ "name": "plcHost",
+ "help": "The PlanetLab PLC API host",
+ "type": Attribute.STRING,
+ "value": "www.planet-lab.eu",
+ "flags": Attribute.DesignOnly,
+ "validation_function": validation.is_string
+ }),
+ "plc_url": dict({
+ "name": "plcUrl",
+ "help": "The PlanetLab PLC API url pattern - %(hostname)s is replaced by plcHost.",
+ "type": Attribute.STRING,
+ "value": "https://%(hostname)s:443/PLCAPI/",
+ "flags": Attribute.DesignOnly,
+ "validation_function": validation.is_string
+ }),
"slice_ssh_key": dict({
"name": "sliceSSHKey",
"help": "The controller-local path to the slice user's ssh private key. "