<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I would like to see that we just need to maintain a common template_utils.py/template_format.py in heat client side.</div><div class="">But I still find some difference between client and server.</div><div class=""><a href="https://github.com/openstack/heat/blob/master/heat/common/template_format.py#L84-L87" class="">https://github.com/openstack/heat/blob/master/heat/common/template_format.py#L84-L87</a></div><div class=""><a href="https://github.com/openstack/python-heatclient/blob/master/heatclient/common/template_format.py#L42" class="">https://github.com/openstack/python-heatclient/blob/master/heatclient/common/template_format.py#L42</a></div><div class=""><br class=""></div><div class="">The option <span style="color: rgb(51, 51, 51); font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; white-space: pre; widows: 1; background-color: rgb(248, 238, 199);" class="">max_template_size</span> only exists on server side, how do you handle with that if using the same function name ‘parse’?</div><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 23, 2015, at 07:13, Steve Baker <<a href="mailto:sbaker@redhat.com" class="">sbaker@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On 23/10/15 08:49, Jay Dobies wrote:<br class=""><blockquote type="cite" class="">I'm working on moving the functionality for merging environments from the client into the server [1]. I've only superficially looked at template_utils.py (in heatclient) but I'm guessing there is stuff in there I will want to use server-side.<br class=""><br class="">The server has a requirement on heatclient, but I'm not sure what the convention is for using code in it. Can I directly call into a module in heatclient/common from the server or is the client dependency only intended to be used through the client-facing APIs?<br class=""><br class="">[1] <a href="https://blueprints.launchpad.net/heat/+spec/multi-environments" class="">https://blueprints.launchpad.net/heat/+spec/multi-environments</a><br class=""><br class=""></blockquote>heat server already depends on heatclient, which was done so that some template parsing could live in heatclient and be shared by both (this isn't finished, and anyone who wants to pick it up is welcome to)<br class=""><br class="">So yes, this would be a valid case for heat calling heatclient functions.<br class=""><br class="">As an aside, it would be preferable if heatclient can somehow discover that it is interacting with a multi-env aware REST API, and fallback to local merging as appropriate.<br class=""><br class="">__________________________________________________________________________<br class="">OpenStack Development Mailing List (not for usage questions)<br class="">Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class=""><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class=""></div></div></blockquote></div><br class=""></body></html>