<div dir="ltr">Resending with the [tripleo] tag, sorry...<div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 29, 2017 at 2:22 PM, Ana Krivokapic <span dir="ltr"><<a href="mailto:akrivoka@redhat.com" target="_blank">akrivoka@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi TripleO devs,<div><br></div><div>I am working on adding a description field to the "Crate Plan" form in the TripleO UI [1]. The goal is to make it possible for the user to specify a plan description using a form field when creating a plan. As the plan description lives in the plan-environment.yaml file[2], the idea is to retrieve this value from plan-environment.yaml when the user uploads the plan, populate the form field with it, let the user change it, and then save it back to the file.</div><div><br></div><div>I have a WIP patch up [3] which solves the issue in the case of uploading the plan as a folder. However, I am having a hard time solving the case of uploading the plan as a tarball. The issue is obviously with accessing the contents of the tarball. Here are some possible approaches that come to mind:</div><div><br></div><div>1) Use one of the existing third-party JS libraries that can extract a tarball in the browser. Pros: front-end only solution, no need for additional API calls, no need for back-end changes. Cons: adding a new dependency, these libraries don't seem much maintained.</div><div><br></div><div>2) Use swift to upload and extract the tarball. Pros: no need for back-end changes, we can just call the swift API. Cons: splitting the tarball upload from plan creation, which should really be one atomic operation.</div><div><br></div><div>3) Modify the plan create workflow to accept a plan description as a parameter. Pros: keeps plan creation atomic. Cons: changes to the plan create workflow interface needed. Also this way there is no way to send back the information about the description to the UI, we would have to just accept the value of the form field, and overwrite whatever was in the plan-environment.yaml file.</div><div><br></div><div>Of course there is also a fourth option:</div><div><br></div><div>4) This is not worth the effort to implement and we should just drop it. :)</div><div><br></div><div>My personal opinion is that the cons of 1) and 2) make these approaches unacceptable. The cons of 3) make it kind of not worth it - seems like a lot of work for a partial solution. So I'm leaning towards 4) at the moment.</div><div><br></div><div>I'd like to hear your opinions on this, is there a another/better approach that I'm missing? Jirka, you mentioned we could postpone this work to the next cycle and there are improvements that we can work on in the meantime which would make implementation of this feature easier?</div><div><br></div><div>Any and all thoughts, comments, opinions are welcome.</div><div><br></div><div>[1] <a href="https://bugs.launchpad.net/tripleo/+bug/1698818" target="_blank">https://bugs.launchpad.<wbr>net/tripleo/+bug/1698818</a></div><div>[2] <a href="https://github.com/openstack/tripleo-heat-templates/blob/master/plan-environment.yaml#L4-L5" target="_blank">https://github.com/<wbr>openstack/tripleo-heat-<wbr>templates/blob/master/plan-<wbr>environment.yaml#L4-L5</a></div><div>[3] <a href="https://review.openstack.org/#/c/477536/" target="_blank">https://review.openstack.<wbr>org/#/c/477536/</a><span class="HOEnZb"><font color="#888888"><br><div><div><br></div>-- <br><div class="m_-9178463437783553636gmail_signature"><div dir="ltr"><div>Regards,</div><div>Ana Krivokapic</div><div>Senior Software Engineer</div><div>OpenStack team</div><div>Red Hat Inc.</div></div></div>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div>Ana Krivokapic</div><div>Senior Software Engineer</div><div>OpenStack team</div><div>Red Hat Inc.</div></div></div>
</div></div>