X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2Fnepi%2Fcore%2Fexecute.py;h=b67102a487337a36d05aca55f64bb69a7d9ed058;hb=d085eb3f8991a3475359a57fb13a84335e072832;hp=9c4ee830288f511bcc25e7333358d806d927116d;hpb=585fce393285fe63fbff43c1274a401e9e863c17;p=nepi.git diff --git a/src/nepi/core/execute.py b/src/nepi/core/execute.py index 9c4ee830..b67102a4 100644 --- a/src/nepi/core/execute.py +++ b/src/nepi/core/execute.py @@ -3,7 +3,7 @@ from nepi.core.attributes import Attribute, AttributesMap from nepi.core.connector import ConnectorTypeBase -from nepi.util import proxy, validation +from nepi.util import validation from nepi.util.constants import STATUS_FINISHED, TIME_NOW from nepi.util.parser._xml import XmlExperimentParser import sys @@ -199,8 +199,11 @@ class TestbedController(object): """Instructs creation of a connection between the given connectors""" raise NotImplementedError - def defer_cross_connect(self, guid, connector_type_name, cross_guid, - cross_testbed_id, cross_factory_id, cross_connector_type_name): + def defer_cross_connect(self, + guid, connector_type_name, + cross_guid, cross_testbed_guid, + cross_testbed_id, cross_factory_id, + cross_connector_type_name): """ Instructs creation of a connection between the given connectors of different testbed instances @@ -244,6 +247,14 @@ class TestbedController(object): """ raise NotImplementedError + def do_preconfigure(self): + """ + Done just before resolving netrefs, after connection, before cross connections, + useful for early stages of configuration, for setting up stuff that might be + required for netref resolution. + """ + raise NotImplementedError + def do_configure(self): """After do_configure elements are configured""" raise NotImplementedError @@ -461,6 +472,10 @@ class ExperimentController(object): BOOLEAN : 'getboolean', } + # deferred import because proxy needs + # our class definitions to define proxies + import nepi.util.proxy as proxy + conf = ConfigParser.RawConfigParser() conf.read(os.path.join(self._root_dir, 'deployment_config.ini')) for testbed_guid in conf.sections(): @@ -681,6 +696,10 @@ class ExperimentController(object): (testbed_id, testbed_version) = data.get_testbed_data(guid) deployment_config = self._deployment_config.get(guid) + # deferred import because proxy needs + # our class definitions to define proxies + import nepi.util.proxy as proxy + if deployment_config is None: # need to create one deployment_config = proxy.AccessConfiguration()