*** chandan_kumar has joined #openstack-climate | 05:06 | |
*** chandan_kumar has quit IRC | 05:31 | |
*** chandan_kumar has joined #openstack-climate | 05:43 | |
*** chandan_kumar has quit IRC | 06:46 | |
*** chandan_kumar has joined #openstack-climate | 06:55 | |
*** bauzas has joined #openstack-climate | 08:18 | |
*** chandan_kumar has quit IRC | 08:46 | |
*** chandan_kumar has joined #openstack-climate | 09:05 | |
*** chandan_kumar has quit IRC | 10:32 | |
*** tomek_adamczewsk has joined #openstack-climate | 10:34 | |
*** chandan_kumar has joined #openstack-climate | 10:50 | |
openstackgerrit | A change was merged to stackforge/climate: Set osapi_compute_extensions default value https://review.openstack.org/90206 | 11:49 |
---|---|---|
*** chandan_kumar has quit IRC | 12:06 | |
*** cmart has joined #openstack-climate | 12:12 | |
*** chandan_kumar has joined #openstack-climate | 12:24 | |
openstackgerrit | Christian Martinez proposed a change to stackforge/climate: Add scenario testing support https://review.openstack.org/87352 | 12:29 |
cmart | Hello people | 12:43 |
cmart | I'm going to create a bp for the Climate Client v2 API Support.. Does anyone know if there are guidelines to follow on the bp creation? | 12:44 |
cmart | *to follow up | 12:44 |
DinaBelova | cmart, well, no official ones - name should be short and well-describing, also you need to describe the idea of the BP in the description - information should be enough just to come and do it | 12:50 |
DinaBelova | form is not fixed - so just express yourself as you wish | 12:50 |
*** cmart1 has joined #openstack-climate | 12:51 | |
cmart1 | sorry DinaBelova.. | 12:51 |
cmart1 | every time you "tag" me on the chat, I got disconnected :( | 12:51 |
DinaBelova | :D | 12:51 |
DinaBelova | heh | 12:51 |
DinaBelova | strange enough)) | 12:51 |
*** casanch1 has joined #openstack-climate | 12:51 | |
DinaBelova | I'll try not to ping you) | 12:51 |
cmart1 | :D | 12:52 |
cmart1 | https://blueprints.launchpad.net/climate/+spec/climate-client-v2 | 12:52 |
DinaBelova | +1 )) | 12:52 |
DinaBelova | will you be ok if I'll assign it to you? | 12:52 |
*** cmart has quit IRC | 12:54 | |
cmart1 | no problem! | 12:54 |
cmart1 | I'll talk to Sylvain then | 12:54 |
bauzas | hi | 13:09 |
bauzas | hi DinaBelova, cmart1 | 13:10 |
cmart1 | bauzas: Hi! | 13:15 |
cmart1 | we were talking about the v2 client.. | 13:16 |
bauzas | sure, I saw | 13:16 |
bauzas | I'm OK with you doing the bp | 13:16 |
cmart1 | cool.. | 13:16 |
bauzas | just a quick note, the difference in between V1 and V2 is about 2 things : | 13:16 |
cmart1 | sure | 13:17 |
cmart1 | I'm listening (reading) | 13:17 |
bauzas | 1/ the result JSON about a lease is the lease dict itself in V2 | 13:17 |
bauzas | while in V1 it's a dict | 13:17 |
bauzas | styling '{'lease': {}} | 13:17 |
bauzas | got it ? | 13:17 |
bauzas | I'm sorry, the key with V1 is 'leases' | 13:18 |
cmart1 | so in v2 is a dict that has a lease attribute that has a dict in it | 13:18 |
cmart1 | Is that it? | 13:18 |
bauzas | in V2, we return the Lease itself | 13:18 |
bauzas | I mean, the Lease WSME type | 13:18 |
bauzas | in V1, we return a dict having one key called 'leases' and the value is Lease | 13:19 |
cmart1 | got it | 13:19 |
bauzas | the same for hosrs | 13:19 |
bauzas | hosts | 13:19 |
cmart1 | OK | 13:19 |
bauzas | so, the only change for the client is | 13:19 |
bauzas | (hold on) | 13:20 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/leases.py#L37 | 13:21 |
bauzas | here, there is no key to look at | 13:21 |
bauzas | the same for the list of leases | 13:22 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/leases.py#L81 | 13:22 |
cmart1 | that's gor the get and list command.. what about the rest? | 13:22 |
bauzas | there is no dict as result with a single key/value which is 'leases' and the value a list | 13:22 |
bauzas | the JSON result is directly a list | 13:22 |
cmart1 | *for the get | 13:22 |
bauzas | well, that's the same for others | 13:23 |
cmart1 | OK | 13:23 |
cmart1 | cool | 13:23 |
bauzas | I mean, when you create a lease, the result is the same as if you were getting it by the lease id | 13:23 |
bauzas | that's the same view | 13:23 |
bauzas | check the leases controller for V2, you'll see the body results | 13:24 |
bauzas | body=Lease | 13:24 |
bauzas | and Lease as result | 13:24 |
cmart1 | I'm watching it right now :) | 13:24 |
bauzas | that's the first difference | 13:24 |
bauzas | and that's why it doesn't work | 13:24 |
bauzas | don't forget oshosts, that's the same | 13:24 |
bauzas | so, the change for supporting V2 is quite simple | 13:25 |
bauzas | just create a V2 package with leases and hosts, and change the get keys | 13:25 |
bauzas | the second difference is | 13:25 |
bauzas | 2/ about computehosts extra capabilities | 13:25 |
bauzas | with V1, the extra capabilities are provided as extra key/value for the result JSON dict | 13:26 |
bauzas | I mean | 13:26 |
bauzas | a computehost can be | 13:26 |
bauzas | {'id':1, 'cpus':2} | 13:27 |
bauzas | but can also include user-defined keys | 13:27 |
bauzas | {'id':1, 'cpus':2, 'fruits': 'bananas', 'foo':'bar'} | 13:27 |
bauzas | with V1, this is transparent | 13:27 |
bauzas | we take the extra keys and we store them in DB | 13:28 |
bauzas | the same for getting the result, we're merging the extra keys with the regular dict | 13:28 |
bauzas | got it ? | 13:28 |
bauzas | with V2, that's different | 13:28 |
cmart1 | yes | 13:29 |
bauzas | extra keys are passed in a single keyt | 13:29 |
cmart1 | what happens with v2? | 13:29 |
bauzas | extra_capas | 13:29 |
bauzas | if I remember correctly | 13:29 |
bauzas | see the API doc | 13:29 |
cmart1 | yeah.. extra_capas | 13:29 |
bauzas | all the extra capas are passed in a single key and processed | 13:30 |
cmart1 | extra_capas={u'vgpus': 2, u'fruits': u'bananas'}, | 13:30 |
bauzas | so, if a user is providing them thanks to the CLI, the generated body has to be modified | 13:30 |
bauzas | exactly | 13:30 |
cmart1 | Ok.. I will look into that once I finished the other part | 13:31 |
cmart1 | question: how the client switchs from versions? | 13:32 |
DinaBelova | cmart1 - it gets the endpoint from the keystone | 13:32 |
cmart1 | and what about the "version" param? | 13:33 |
cmart1 | I remember using it when writing tests.. | 13:33 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/shell_commands/hosts.py#L77 | 13:33 |
bauzas | here you can see for V1, how we merge the capas | 13:33 |
bauzas | with the dict | 13:33 |
bauzas | here, you just have to modify this line | 13:33 |
bauzas | and instead of updating the dict, add the subdict as a value for the extra_capas key | 13:33 |
bauzas | of course, you have to amend the show command | 13:33 |
bauzas | and do some magic stuff for extracting the subdict and merge it to the regular result | 13:33 |
DinaBelova | well, the version is about the project version, not API) | 13:34 |
bauzas | DinaBelova: +1 | 13:34 |
DinaBelova | so API version is about the endpoint used | 13:34 |
cmart1 | sorry.. endpoint.. | 13:34 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/client.py#L27 | 13:35 |
cmart1 | version_map = { '1': 'climateclient.v1.client.Client', '1a0': 'climateclient.v1.client.Client', } | 13:35 |
cmart1 | yeah.. same line | 13:35 |
cmart1 | (sorry for the pasted code) | 13:35 |
bauzas | atm, only add API V2 and test it | 13:36 |
cmart1 | I thought that those lines were used to switch between versions.. | 13:36 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/shell.py#L421 | 13:36 |
cmart1 | bauzas: that's another part.. we don't have tests :S | 13:37 |
bauzas | one thing at a time :) | 13:37 |
casanch1 | we need to submit another bug for adding tests to the client | 13:38 |
cmart1 | OK. Next thing to ask: I never used the v2 api | 13:38 |
bauzas | https://github.com/stackforge/python-climateclient/blob/master/climateclient/shell.py#L408 | 13:38 |
cmart1 | casanch1: there is already one | 13:38 |
bauzas | here is how we instanciate the right client based on the endpoint | 13:38 |
bauzas | cmart1: well, good reason to start with :) | 13:38 |
bauzas | cmart1: you can query the API without a CLI | 13:39 |
cmart1 | casanch1: https://review.openstack.org/#/c/73574/ | 13:39 |
bauzas | cmart1: you just have to hit the endpoints directly using a X-Auth-Key header | 13:39 |
bauzas | given by Keystone | 13:39 |
cmart1 | bauzas: I thought so :).. But I was thinking how to quickly change versions in the client. | 13:39 |
cmart1 | nevermind | 13:40 |
bauzas | just create a new namespace called v2, copy/think/paste the files | 13:40 |
bauzas | proceed with the 2 changes I mentioned | 13:40 |
cmart1 | I'll finish the stuff that I already have and then start working on this.. I'll probably ask you about the changes tomorrow.. | 13:40 |
bauzas | and amend the versions in https://github.com/stackforge/python-climateclient/blob/master/climateclient/client.py#L27 | 13:40 |
bauzas | that's really a quickwin | 13:41 |
bauzas | if you don't feel confident about it, I can do it | 13:41 |
bauzas | about a half day for this | 13:41 |
bauzas | but I appreciate you willingness :) | 13:41 |
cmart1 | bauzas: not at all.. I can take this.. It's going to take me more than half day, because I'm new at this. But I'll do it:D | 13:42 |
bauzas | :) | 13:42 |
cmart1 | OK. Thanks for your time | 13:42 |
cmart1 | ttyl! | 13:42 |
bauzas | I'm about to deliver the leases states framework and then I'll have to switch back to Nova | 13:42 |
cmart1 | cool | 13:43 |
*** casanch1_ has joined #openstack-climate | 13:50 | |
*** casanch1 has quit IRC | 13:53 | |
openstackgerrit | Christian Martinez proposed a change to stackforge/climate: V2 API Support for before_end param configuration https://review.openstack.org/89833 | 13:55 |
*** pafuent has joined #openstack-climate | 14:07 | |
*** casanch1_ has quit IRC | 14:14 | |
*** casanch1 has joined #openstack-climate | 14:14 | |
cmart1 | Hi! Any "Pep8 Senior Expert" around? | 14:23 |
cmart1 | I'm getting an "E126 continuation line over-indented for hanging indent" error with this code: http://paste.openstack.org/show/77444/ and I canĀ“t fix it :( | 14:25 |
cmart1 | Can anyone help me with this? | 14:25 |
DinaBelova | one moment, looking there | 14:25 |
DinaBelova | http://paste.openstack.org/show/77445/ - try my variant | 14:27 |
DinaBelova | I'm 100% sure that lines 's':... and 'm': ... should have 4 spaces in the beginning | 14:28 |
DinaBelova | but not sure about the timeutils.... ones | 14:28 |
cmart1 | yes.. I was able to make it work with this variant: http://paste.openstack.org/show/77447/ | 14:29 |
DinaBelova | okay | 14:29 |
DinaBelova | and btw - add comma after minutes=x)) | 14:30 |
-openstackstatus- NOTICE: Gerrit downtime for upgrade begins in 90 minutes. See: https://wiki.openstack.org/wiki/GerritUpgrade | 14:30 | |
DinaBelova | it will allow then (if you'll need to add one more line) - change only one line | 14:30 |
cmart1 | yes! | 14:30 |
DinaBelova | not two of them | 14:30 |
openstackgerrit | A change was merged to stackforge/climate: Add scenario testing support https://review.openstack.org/87352 | 14:34 |
cmart1 | :D:D:D:D! | 14:34 |
DinaBelova | ;) | 14:36 |
openstackgerrit | Sylvain Bauza proposed a change to stackforge/climate: Create Statuses objects for Leases https://review.openstack.org/90755 | 14:38 |
bauzas | enjoy my draft model | 14:42 |
openstackgerrit | Christian Martinez proposed a change to stackforge/python-climateclient: Handle elapsed_time params in climate client https://review.openstack.org/90759 | 14:44 |
*** tomek_adamczewsk has quit IRC | 14:58 | |
*** chandan_kumar has quit IRC | 15:03 | |
openstackgerrit | Christian Martinez proposed a change to stackforge/climate: V2 API Support for before_end param configuration https://review.openstack.org/89833 | 15:03 |
*** tomek_adamczewsk has joined #openstack-climate | 15:10 | |
-openstackstatus- NOTICE: Gerrit downtime for upgrade begins in 30 minutes. See: https://wiki.openstack.org/wiki/GerritUpgrade | 15:30 | |
openstackgerrit | Sylvain Bauza proposed a change to stackforge/climate: Create Statuses objects for Leases https://review.openstack.org/90755 | 16:26 |
-openstackstatus- NOTICE: Gerrit is unavailable until further notice for a major upgrade. See: https://wiki.openstack.org/wiki/GerritUpgrade | 16:35 | |
*** ChanServ changes topic to "Gerrit is unavailable until further notice for a major upgrade. See: https://wiki.openstack.org/wiki/GerritUpgrade" | 16:35 | |
*** bauzas has quit IRC | 17:05 | |
*** chandan_kumar has joined #openstack-climate | 17:27 | |
*** tomek_adamczewsk has quit IRC | 17:32 | |
*** casanch1_ has joined #openstack-climate | 18:56 | |
*** casanch1 has quit IRC | 18:59 | |
*** openstackgerrit has quit IRC | 19:04 | |
*** bauzas has joined #openstack-climate | 19:22 | |
*** ChanServ changes topic to "Weekly meetings on Fridays 1500 UTC #openstack-meeting" | 19:30 | |
-openstackstatus- NOTICE: Gerrit upgrade to 2.8 complete. See: https://wiki.openstack.org/wiki/GerritUpgrade Some cleanup tasks still ongoing; join #openstack-infra if you have any questions. | 19:30 | |
*** chandan_kumar has quit IRC | 19:40 | |
*** casanch1_ has quit IRC | 19:59 | |
*** casanch1 has joined #openstack-climate | 20:00 | |
*** pafuent has left #openstack-climate | 21:00 | |
*** tomek_adamczewsk has joined #openstack-climate | 21:05 | |
*** cmart1 has quit IRC | 21:13 | |
*** casanch1_ has joined #openstack-climate | 21:31 | |
*** casanch1 has quit IRC | 21:34 | |
*** casanch1_ has quit IRC | 21:36 | |
*** openstackgerrit has joined #openstack-climate | 21:53 | |
*** tomek_adamczewsk has quit IRC | 21:56 | |
*** bauzas has quit IRC | 23:11 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!