X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=blobdiff_plain;f=nepi%2Fexecution%2Fec.py;h=e91836d7572f23a3940d69b378e78e71ab805d5f;hp=5f34f8268c0da3fc35bf16d7fc21c782bd586bda;hb=ef3b957e965468e23f96696b9e2e6856ce933b07;hpb=719bae09cce5093d96acdf4ec04658d37fea3337 diff --git a/nepi/execution/ec.py b/nepi/execution/ec.py index 5f34f826..e91836d7 100644 --- a/nepi/execution/ec.py +++ b/nepi/execution/ec.py @@ -617,14 +617,24 @@ class ExperimentController(object): ### so we can do something like # node = ec.register_resource("linux::Node", # username = user, - # hostname = host) + # hostname = host, + # autoDeploy = True) ### instead of # node = ec.register_resource("linux::Node") # ec.set(node, "username", user) # ec.set(node, "hostname", host) + # ec.deploy(node) + auto_deploy = 'autoDeploy' in keywords and keywords['autoDeploy'] + + # now we can do all the calls to 'set' for name, value in keywords.items(): - self.set(guid, name, value) + # autoDeploy is handled locally and not propagated to 'set' + if name != 'autoDeploy': + self.set(guid, name, value) + + if auto_deploy: + self.deploy(guid) return guid