<div dir="ltr">Renat,<div><br></div><div>thanks for response!</div><div>One more question:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span style="font-size:13px"> So that same workflows could be running in different environments </span></blockquote><div> </div><div>Asking about using a few environments I meant within one workflow. For example I need to work with two DB and I have two environments: env1 = {"conn_str": ip, "user": user, "password": passwd} and env2 = {"conn_str": ip2, "user": user2, "password": passwd2}. Will it be possible to do something like this:</div><div><br></div><div><div style="font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">tasks:</div></div><div style="font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">   connect_first_db:</div></div><div style="font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">      action: std.sql conn_str={$.env1.conn_str} query={$.query}</div></div><div style="font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">      publish:</div></div><div style="font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">         records: $</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">   connect_second_db:</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">      action: std.sql conn_str={$.env2.conn_str} query={$.query}</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">      publish:</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">         records: $</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Thanks,</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Anastasia Kuznetsova</div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 24, 2014 at 2:19 PM, Renat Akhmerov <span dir="ltr"><<a href="mailto:rakhmerov@mirantis.com" target="_blank">rakhmerov@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div></div><div><span class=""><blockquote type="cite"><div>On 24 Dec 2014, at 14:06, Anastasia Kuznetsova <<a href="mailto:akuznetsova@mirantis.com" target="_blank">akuznetsova@mirantis.com</a>> wrote:</div><div><div dir="ltr"><div><br></div><div>1) How does the end user will pass env variables to workflow?Will you add one more optional parameter to execution-create command? </div><div><font face="monospace, monospace">mistral execution-create wf wf_input wf_params wf_env</font></div><div>If yes than what is wf_env will be, json file?</div></div></div></blockquote><div><br></div></span><div>Yes. IMO it should be possible to specify either a string (name of a previously stored environment) or a json file (so called ad-hoc environment).</div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><div>2) Retuning to first example:</div><div>...</div><div> action: std.sql conn_str={$.env.conn_str} query={$.query}</div><div>...</div><div>$.env - is it a name of environment or it will be a registered syntax to getting access to values from env ?</div></div></div></blockquote><div><br></div></span><div>So far we agreed that ‘key' should not be a registered key. Environment (optionally specified) is just another storage of variables going after workflow context in a lookup chain. So that if somewhere in a wf we have an expression $.something then this “something” will be first looked in workflow context and if it doesn’t exist there then looked in the specified environment.</div><div>But if we want to explicitly group a set of variables we can use any (except for reserved as "__actions" ) key, for example, “env”.</div><span class=""><br><blockquote type="cite"><div><div dir="ltr"><div>3) Can user has a few environments?</div></div></div></blockquote></span></div><br><div>Yes. That’s one of the goals of introducing a concept of environment. So that same workflows could be running in different environments (e.g with different email settings, any kinds of passports etc.).</div><span class=""><div><br></div><div><br></div><div><div>Renat Akhmerov</div><div>@ Mirantis Inc.</div></div></span></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>