<div dir="ltr">Hi all,<div><br></div><div>I have created etherpad page</div><div><br></div><div><a href="https://etherpad.openstack.org/p/fuelclient-implementation-ideas">https://etherpad.openstack.org/p/fuelclient-implementation-ideas</a></div><div><br></div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 14, 2015 at 12:38 PM, Konstantin Danilov <span dir="ltr"><<a href="mailto:kdanilov@mirantis.com" target="_blank">kdanilov@mirantis.com</a>></span> wrote:<br><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"><div dir="ltr"><div>Igor, <br><br></div>Yep, I knew that you start to rewrite fuel-client, but it seemd for me that this ideas is not for <br><a href="https://etherpad.openstack.org/p/fuelclient-redesign" target="_blank">https://etherpad.openstack.org/p/fuelclient-redesign</a> document because it's<br>implementation details. Should I create a new notepad for it?<br></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 14, 2015 at 11:58 AM, Igor Kalnitsky <span dir="ltr"><<a href="mailto:ikalnitsky@mirantis.com" target="_blank">ikalnitsky@mirantis.com</a>></span> wrote:<br><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">Hi, Konstantin,<br>
<br>
Thank you for sharing ideas. Your "yet-one-more implementation of<br>
fuel-client" one more time confirms that currently we have completely<br>
unusable implementation.<br>
<br>
Just for your information: we have plans for python-fuelclient<br>
refactoring [1]. The main point of this blueprint is to provide<br>
fuelclient which will be useful as both: library and cli. Please, do<br>
not hesitate share your ideas in blueprint or in the working ehterpad<br>
[2].<br>
<br>
- Igor<br>
<br>
[1]: <a href="https://review.openstack.org/#/c/135915/" target="_blank">https://review.openstack.org/#/c/135915/</a><br>
[2]: <a href="https://etherpad.openstack.org/p/fuelclient-redesign" target="_blank">https://etherpad.openstack.org/p/fuelclient-redesign</a><br>
<div><div><br>
On Wed, Jan 14, 2015 at 12:38 PM, Konstantin Danilov<br>
<<a href="mailto:kdanilov@mirantis.com" target="_blank">kdanilov@mirantis.com</a>> wrote:<br>
> Hi all,<br>
><br>
> We are working on fuel certification script<br>
> <a href="https://github.com/stgleb/fuel-web" target="_blank">https://github.com/stgleb/fuel-web</a><br>
> and have yet-one-more implementation of fuel-client, which cover very small<br>
> of Fuel API, yet we have some ideas, which you might be interesting in.<br>
><br>
> 1) high-level primitives for REST operations.<br>
><br>
> a) GET/PUT/POST/etc function, which returns closure, bonded to url and<br>
> method<br>
><br>
><br>
> class Cluster(RestObj):<br>
> """Class represents Cluster in Fuel"""<br>
><br>
> add_node_call = PUT('api/nodes')<br>
> start_deploy = PUT('api/clusters/{id}/changes')<br>
> get_status = GET('api/clusters/{id}')<br>
> delete = DELETE('api/clusters/{id}')<br>
><br>
> GET(url_template) returns function/class method, which accepts set<br>
> of parameters,<br>
> format part of them into url_template to obtain final url and pass<br>
> other parameters<br>
> as data in http request. E.g.<br>
><br>
> get_some_objs = GET('some/objects/{cluster_id}/really_get')<br>
><br>
><br>
> get_some_objs(cluster_id=12, kind="db objects") will result in<br>
> HTTP request GET '..../some/objects/12/really_get' data =<br>
> {'kind':'db objects'}<br>
><br>
> in case of class method it also extracts missing format parameters<br>
> from self.__dict__.<br>
> E.g.<br>
><br>
> node = Node.get_all()[0]<br>
> nnode = node.get() <<< takes id from <a href="http://node.id" target="_blank">node.id</a><br>
><br>
><br>
> b) Auto generate API for strict restfull cases, e.g.<br>
><br>
> class Node(RestfulObj):<br>
> """Represents node in Fuel"""<br>
><br>
> __url__ = '/api/nodes/{id}'<br>
><br>
> ==<br>
><br>
> class Node(RestObj):<br>
> """Represents node in Fuel"""<br>
><br>
> get_all = GET('/api/nodes')<br>
> get = GET('/api/nodes/{id}')<br>
> delete = DELETE('/api/nodes/{id}')<br>
> create = POST('/api/nodes/{id}')<br>
> ....<br>
><br>
> 2) API for create cluster from yaml description. Allow to deploy whole<br>
> openstack cluster from single yaml file. We being asking a lot whenever this<br>
> call would be available in fuel client<br>
> by different team/persons.<br>
><br>
> <a href="https://github.com/stgleb/fuel-web/blob/sertification-script/certification_script/certification_script/cert_script.py#L165" target="_blank">https://github.com/stgleb/fuel-web/blob/sertification-script/certification_script/certification_script/cert_script.py#L165</a><br>
><br>
> 3) I have a semi-implemented ideas for future-based API for background tasks<br>
> (e.g. cluster deployment)<br>
><br>
> Code is available in repo and we would be glad to help you to merge it to<br>
> new fuel-client<br>
><br>
> --<br>
> Kostiantyn Danilov aka <a href="http://koder.ua" target="_blank">koder.ua</a><br>
> Principal software engineer, Mirantis<br>
><br>
> skype:<a href="http://koder.ua" target="_blank">koder.ua</a><br>
> <a href="http://koder-ua.blogspot.com/" target="_blank">http://koder-ua.blogspot.com/</a><br>
> <a href="http://mirantis.com" target="_blank">http://mirantis.com</a><br>
><br>
</div></div>> __________________________________________________________________________<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</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>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</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>
</blockquote></div><br><br clear="all"><br>-- <br><div>Kostiantyn Danilov aka <a href="http://koder.ua" target="_blank">koder.ua</a><br>Principal software engineer, Mirantis<br><br>skype:<a href="http://koder.ua" target="_blank">koder.ua</a><br><a href="http://koder-ua.blogspot.com/" target="_blank">http://koder-ua.blogspot.com/</a><br><a href="http://mirantis.com" target="_blank">http://mirantis.com</a></div>
</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Kostiantyn Danilov aka <a href="http://koder.ua" target="_blank">koder.ua</a><br>Principal software engineer, Mirantis<br><br>skype:<a href="http://koder.ua" target="_blank">koder.ua</a><br><a href="http://koder-ua.blogspot.com/" target="_blank">http://koder-ua.blogspot.com/</a><br><a href="http://mirantis.com" target="_blank">http://mirantis.com</a></div>
</div></div></div>