Monday, 2014-04-28

*** chandan_kumar has joined #openstack-climate05:06
*** chandan_kumar has quit IRC05:31
*** chandan_kumar has joined #openstack-climate05:43
*** chandan_kumar has quit IRC06:46
*** chandan_kumar has joined #openstack-climate06:55
*** bauzas has joined #openstack-climate08:18
*** chandan_kumar has quit IRC08:46
*** chandan_kumar has joined #openstack-climate09:05
*** chandan_kumar has quit IRC10:32
*** tomek_adamczewsk has joined #openstack-climate10:34
*** chandan_kumar has joined #openstack-climate10:50
openstackgerritA change was merged to stackforge/climate: Set osapi_compute_extensions default value  https://review.openstack.org/9020611:49
*** chandan_kumar has quit IRC12:06
*** cmart has joined #openstack-climate12:12
*** chandan_kumar has joined #openstack-climate12:24
openstackgerritChristian Martinez proposed a change to stackforge/climate: Add scenario testing support  https://review.openstack.org/8735212:29
cmartHello people12:43
cmartI'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 up12:44
DinaBelovacmart, 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 it12:50
DinaBelovaform is not fixed - so just express yourself as you wish12:50
*** cmart1 has joined #openstack-climate12:51
cmart1sorry DinaBelova..12:51
cmart1every time you "tag" me on the chat, I got disconnected :(12:51
DinaBelova:D12:51
DinaBelovaheh12:51
DinaBelovastrange enough))12:51
*** casanch1 has joined #openstack-climate12:51
DinaBelovaI'll try not to ping you)12:51
cmart1:D12:52
cmart1https://blueprints.launchpad.net/climate/+spec/climate-client-v212:52
DinaBelova+1 ))12:52
DinaBelovawill you be ok if I'll assign it to you?12:52
*** cmart has quit IRC12:54
cmart1no problem!12:54
cmart1I'll talk to Sylvain then12:54
bauzashi13:09
bauzashi DinaBelova, cmart113:10
cmart1bauzas: Hi!13:15
cmart1we were talking about the v2 client..13:16
bauzassure, I saw13:16
bauzasI'm OK with you doing the bp13:16
cmart1cool..13:16
bauzasjust a quick note, the difference in between V1 and V2 is about 2 things :13:16
cmart1sure13:17
cmart1I'm listening (reading)13:17
bauzas1/ the result JSON about a lease is the lease dict itself in V213:17
bauzaswhile in V1 it's a dict13:17
bauzasstyling '{'lease': {}}13:17
bauzasgot it ?13:17
bauzasI'm sorry, the key with V1 is 'leases'13:18
cmart1so in v2 is a dict that has a lease attribute that has a dict in it13:18
cmart1Is that it?13:18
bauzasin V2, we return the Lease itself13:18
bauzasI mean, the Lease WSME type13:18
bauzasin V1, we return a dict having one key called 'leases' and the value is Lease13:19
cmart1got it13:19
bauzasthe same for hosrs13:19
bauzashosts13:19
cmart1OK13:19
bauzasso, the only change for the client is13:19
bauzas(hold on)13:20
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/leases.py#L3713:21
bauzashere, there is no key to look at13:21
bauzasthe same for the list of leases13:22
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/leases.py#L8113:22
cmart1that's gor the get and list command.. what about the rest?13:22
bauzasthere is no dict as result with a single key/value which is 'leases' and the value a list13:22
bauzasthe JSON result is directly a list13:22
cmart1*for the get13:22
bauzaswell, that's the same for others13:23
cmart1OK13:23
cmart1cool13:23
bauzasI mean, when you create a lease, the result is the same as if you were getting it by the lease id13:23
bauzasthat's the same view13:23
bauzascheck the leases controller for V2, you'll see the body results13:24
bauzasbody=Lease13:24
bauzasand Lease as result13:24
cmart1I'm watching it right now :)13:24
bauzasthat's the first difference13:24
bauzasand that's why it doesn't work13:24
bauzasdon't forget oshosts, that's the same13:24
bauzasso, the change for supporting V2 is quite simple13:25
bauzasjust create a V2 package with leases and hosts, and change the get keys13:25
bauzasthe second difference is13:25
bauzas2/ about computehosts extra capabilities13:25
bauzaswith V1, the extra capabilities are provided as extra key/value for the result JSON dict13:26
bauzasI mean13:26
bauzasa computehost can be13:26
bauzas{'id':1, 'cpus':2}13:27
bauzasbut can also include user-defined keys13:27
bauzas{'id':1, 'cpus':2, 'fruits': 'bananas', 'foo':'bar'}13:27
bauzaswith V1, this is transparent13:27
bauzaswe take the extra keys and we store them in DB13:28
bauzasthe same for getting the result, we're merging the extra keys with the regular dict13:28
bauzasgot it ?13:28
bauzaswith V2, that's different13:28
cmart1yes13:29
bauzasextra keys are passed in a single keyt13:29
cmart1what happens with v2?13:29
bauzasextra_capas13:29
bauzasif I remember correctly13:29
bauzassee the API doc13:29
cmart1yeah.. extra_capas13:29
bauzasall the extra capas are passed in a single key and processed13:30
cmart1extra_capas={u'vgpus': 2, u'fruits': u'bananas'},13:30
bauzasso, if a user is providing them thanks to the CLI, the generated body has to be modified13:30
bauzasexactly13:30
cmart1Ok.. I will look into that once I finished the other part13:31
cmart1question: how the client  switchs from versions?13:32
DinaBelovacmart1 - it gets the endpoint from the keystone13:32
cmart1and what about the "version" param?13:33
cmart1I remember using it when writing tests..13:33
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/v1/shell_commands/hosts.py#L7713:33
bauzashere you can see for V1, how we merge the capas13:33
bauzaswith the dict13:33
bauzashere, you just have to modify this line13:33
bauzasand instead of updating the dict, add the subdict as a value for the extra_capas key13:33
bauzasof course, you have to amend the show command13:33
bauzasand do some magic stuff for extracting the subdict and merge it to the regular result13:33
DinaBelovawell, the version is about the project version, not API)13:34
bauzasDinaBelova: +113:34
DinaBelovaso API version is about the endpoint used13:34
cmart1sorry.. endpoint..13:34
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/client.py#L2713:35
cmart1    version_map = {         '1': 'climateclient.v1.client.Client',         '1a0': 'climateclient.v1.client.Client',     }13:35
cmart1yeah.. same line13:35
cmart1(sorry for the pasted code)13:35
bauzasatm, only add API V2 and test it13:36
cmart1I thought that those lines were used to switch between versions..13:36
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/shell.py#L42113:36
cmart1bauzas: that's another part.. we  don't have tests :S13:37
bauzasone thing at a time :)13:37
casanch1we need to submit another bug for adding tests to the client13:38
cmart1OK. Next thing to ask: I never used the v2 api13:38
bauzashttps://github.com/stackforge/python-climateclient/blob/master/climateclient/shell.py#L40813:38
cmart1casanch1: there is already one13:38
bauzashere is how we instanciate the right client based on the endpoint13:38
bauzascmart1: well, good reason to start with :)13:38
bauzascmart1: you can query the API without a CLI13:39
cmart1casanch1: https://review.openstack.org/#/c/73574/13:39
bauzascmart1: you just have to hit the endpoints directly using a X-Auth-Key header13:39
bauzasgiven by Keystone13:39
cmart1bauzas: I thought so :).. But I was thinking how to quickly change versions in the client.13:39
cmart1nevermind13:40
bauzasjust create a new namespace called v2, copy/think/paste the files13:40
bauzasproceed with the 2 changes I mentioned13:40
cmart1I'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
bauzasand amend the versions in https://github.com/stackforge/python-climateclient/blob/master/climateclient/client.py#L2713:40
bauzasthat's really a quickwin13:41
bauzasif you don't feel confident about it, I can do it13:41
bauzasabout a half day for this13:41
bauzasbut I appreciate you willingness :)13:41
cmart1bauzas: 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:D13:42
bauzas:)13:42
cmart1OK. Thanks for your time13:42
cmart1ttyl!13:42
bauzasI'm about to deliver the leases states framework and then I'll have to switch back to Nova13:42
cmart1cool13:43
*** casanch1_ has joined #openstack-climate13:50
*** casanch1 has quit IRC13:53
openstackgerritChristian Martinez proposed a change to stackforge/climate: V2 API Support for before_end param configuration  https://review.openstack.org/8983313:55
*** pafuent has joined #openstack-climate14:07
*** casanch1_ has quit IRC14:14
*** casanch1 has joined #openstack-climate14:14
cmart1Hi! Any "Pep8 Senior Expert" around?14:23
cmart1I'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
cmart1Can anyone help me with this?14:25
DinaBelovaone moment, looking there14:25
DinaBelovahttp://paste.openstack.org/show/77445/ - try my variant14:27
DinaBelovaI'm 100% sure that lines 's':...  and 'm': ... should have 4 spaces in the beginning14:28
DinaBelovabut not sure about the timeutils.... ones14:28
cmart1yes.. I was able to make it work with this variant: http://paste.openstack.org/show/77447/14:29
DinaBelovaokay14:29
DinaBelovaand btw - add comma after minutes=x))14:30
-openstackstatus- NOTICE: Gerrit downtime for upgrade begins in 90 minutes. See: https://wiki.openstack.org/wiki/GerritUpgrade14:30
DinaBelovait will allow then (if you'll need to add one more line) - change only one line14:30
cmart1yes!14:30
DinaBelovanot two of them14:30
openstackgerritA change was merged to stackforge/climate: Add scenario testing support  https://review.openstack.org/8735214:34
cmart1:D:D:D:D!14:34
DinaBelova;)14:36
openstackgerritSylvain Bauza proposed a change to stackforge/climate: Create Statuses objects for Leases  https://review.openstack.org/9075514:38
bauzasenjoy my draft model14:42
openstackgerritChristian Martinez proposed a change to stackforge/python-climateclient: Handle elapsed_time params in climate client  https://review.openstack.org/9075914:44
*** tomek_adamczewsk has quit IRC14:58
*** chandan_kumar has quit IRC15:03
openstackgerritChristian Martinez proposed a change to stackforge/climate: V2 API Support for before_end param configuration  https://review.openstack.org/8983315:03
*** tomek_adamczewsk has joined #openstack-climate15:10
-openstackstatus- NOTICE: Gerrit downtime for upgrade begins in 30 minutes. See: https://wiki.openstack.org/wiki/GerritUpgrade15:30
openstackgerritSylvain Bauza proposed a change to stackforge/climate: Create Statuses objects for Leases  https://review.openstack.org/9075516:26
-openstackstatus- NOTICE: Gerrit is unavailable until further notice for a major upgrade. See: https://wiki.openstack.org/wiki/GerritUpgrade16: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 IRC17:05
*** chandan_kumar has joined #openstack-climate17:27
*** tomek_adamczewsk has quit IRC17:32
*** casanch1_ has joined #openstack-climate18:56
*** casanch1 has quit IRC18:59
*** openstackgerrit has quit IRC19:04
*** bauzas has joined #openstack-climate19: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 IRC19:40
*** casanch1_ has quit IRC19:59
*** casanch1 has joined #openstack-climate20:00
*** pafuent has left #openstack-climate21:00
*** tomek_adamczewsk has joined #openstack-climate21:05
*** cmart1 has quit IRC21:13
*** casanch1_ has joined #openstack-climate21:31
*** casanch1 has quit IRC21:34
*** casanch1_ has quit IRC21:36
*** openstackgerrit has joined #openstack-climate21:53
*** tomek_adamczewsk has quit IRC21:56
*** bauzas has quit IRC23:11

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!