From: Claudio-Daniel Freire Date: Fri, 19 Aug 2011 08:03:47 +0000 (+0200) Subject: Validate testbed attributes early X-Git-Tag: nepi-3.0.0~285 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=31c6e9e6e9fbc7fc3d50a502bf94fcf2885a5cdf;p=nepi.git Validate testbed attributes early --- diff --git a/src/nepi/testbeds/planetlab/execute.py b/src/nepi/testbeds/planetlab/execute.py index 5db391e0..427a1b3e 100644 --- a/src/nepi/testbeds/planetlab/execute.py +++ b/src/nepi/testbeds/planetlab/execute.py @@ -149,6 +149,13 @@ class TestbedController(testbed_impl.TestbedController): self.dedicatedSlice = self._attributes.\ get_attribute_value("dedicatedSlice") + if not self.slicename: + raise RuntimeError, "Slice not set" + if not self.authUser: + raise RuntimeError, "PlanetLab account username not set" + if not self.authString: + raise RuntimeError, "PlanetLab account passphrase not set" + self._logger.setLevel(getattr(logging,self.logLevel)) super(TestbedController, self).do_setup()