Wednesday, 2014-10-01

*** stevemar has joined #openstack-sdks00:12
*** ayoung has joined #openstack-sdks00:39
*** rmcall has quit IRC00:39
*** stevemar has quit IRC00:57
*** HenryG_ has joined #openstack-sdks01:22
*** stevemar has joined #openstack-sdks01:24
*** HenryG has quit IRC01:24
openstackgerritSteve Martinelli proposed a change to openstack/python-openstackclient: Create a whole slew of functional tests for identity  https://review.openstack.org/12521602:07
*** HenryG_ has quit IRC02:25
openstackgerritSteve Lewis proposed a change to stackforge/python-openstacksdk: Handle booleans that are strings in APIs  https://review.openstack.org/12420902:36
*** jamielennox has quit IRC02:40
*** HenryG has joined #openstack-sdks02:41
openstackgerritSteve Lewis proposed a change to stackforge/python-openstacksdk: Handle booleans that are strings in APIs  https://review.openstack.org/12420902:42
*** jamielenz has joined #openstack-sdks02:47
*** jamielenz is now known as jamielennox02:48
*** jamielennox has quit IRC03:13
*** jamielenz has joined #openstack-sdks03:17
*** jamielenz is now known as jamielennox03:17
*** tellesnobrega_ has quit IRC03:18
*** rmcall has joined #openstack-sdks03:57
*** rmcall has quit IRC04:11
*** rmcall has joined #openstack-sdks04:18
*** tellesnobrega has joined #openstack-sdks05:08
*** k4n0 has joined #openstack-sdks05:47
*** briancurtin has quit IRC05:47
*** terrylhowe has quit IRC05:57
*** rmcall has quit IRC07:03
*** rmcall has joined #openstack-sdks07:05
*** stevemar has quit IRC07:18
*** jamiehannaford has joined #openstack-sdks07:25
*** rmcall has quit IRC07:29
*** ayoung has quit IRC08:23
openstackgerritMatthieu Huin proposed a change to openstack/python-openstackclient: Unscoped federated user-specific commands  https://review.openstack.org/12410109:09
*** ayoung has joined #openstack-sdks11:47
*** terrylhowe has joined #openstack-sdks11:50
openstackgerritMarek Denis proposed a change to openstack/python-openstackclient: Implement CRUD operations for Mapping objects  https://review.openstack.org/8691212:42
*** sigmavirus24_awa is now known as sigmavirus2412:52
openstackgerritMarek Denis proposed a change to openstack/python-openstackclient: Implement CRUD operations for Mapping objects  https://review.openstack.org/8691213:08
*** mfer has joined #openstack-sdks13:19
*** briancurtin has joined #openstack-sdks13:59
*** stevemar has joined #openstack-sdks14:10
*** sigmavirus24 is now known as sigmavirus24_awa14:12
*** sigmavirus24_awa is now known as sigmavirus2414:13
*** openstackgerrit has quit IRC14:18
*** openstackgerrit has joined #openstack-sdks14:18
*** bknudson has joined #openstack-sdks14:19
*** jamiehan_ has joined #openstack-sdks14:37
*** dhellmann has joined #openstack-sdks14:38
*** dhellmann has quit IRC14:38
*** jamiehannaford has quit IRC14:40
*** dhellmann has joined #openstack-sdks14:41
*** jamiehan_ has quit IRC14:41
*** openstackgerrit has quit IRC14:47
*** openstackgerrit has joined #openstack-sdks14:48
*** jamiehannaford has joined #openstack-sdks14:49
*** dhellmann_ has quit IRC14:57
*** dhellmann_ has joined #openstack-sdks15:01
*** openstackgerrit has quit IRC15:02
*** openstackgerrit has joined #openstack-sdks15:03
*** dhellmann_ has quit IRC15:05
*** dhellmann_ has joined #openstack-sdks15:06
*** sigmavirus24 is now known as sigmavirus24_awa15:08
*** sigmavirus24_awa is now known as sigmavirus2415:10
*** rmcall has joined #openstack-sdks15:21
*** dhellmann_ has quit IRC15:26
*** dhellmann_ has joined #openstack-sdks15:28
*** dhellmann has quit IRC15:34
*** dhellmann_ is now known as dhellmann15:34
*** jamielennox has quit IRC15:49
*** jamielennox has joined #openstack-sdks16:01
*** k4n0 has quit IRC16:05
*** jamielennox has quit IRC16:08
*** jamielennox has joined #openstack-sdks16:16
*** glenc has quit IRC16:17
*** mordred has quit IRC16:17
*** ayoung has quit IRC16:17
*** openstackgerrit has quit IRC16:18
*** glenc has joined #openstack-sdks16:18
*** mordred has joined #openstack-sdks16:18
*** ayoung has joined #openstack-sdks16:18
*** openstackgerrit has joined #openstack-sdks16:18
*** jamiehannaford has quit IRC16:41
*** briancurtin has quit IRC16:42
*** briancurtin has joined #openstack-sdks17:13
*** briancurtin has quit IRC17:17
stevemardtroyer, going to approve top-to-bottom and low level API, fyi17:37
dtroyerstevemar: cool, thanks17:38
dtroyerstill waking up from the party last night…17:38
dtroyerI should be able to spend some time with the functional test stuff today, I need to get how that works into my head17:39
stevemardtroyer, oh wonderful, i was just going to bug you about that https://review.openstack.org/#/c/125216/17:40
stevemardtroyer, i'll be honest, i was cheering for oakland17:40
stevemarbut any time the sox and yankees aren't in the post season, it's going to be a great post season17:41
dtroyerheretic!  Only the Yankees are worse here…17:41
dtroyermy childhood was full of A's and Yankees keeping KC out of the playoffs and/or series17:42
stevemari'm still bummed that the jays didn't make it17:43
stevemari was so hopeful this year, gah!17:43
openstackgerritSteve Martinelli proposed a change to openstack/python-openstackclient: Move object-store commands to low-level API  https://review.openstack.org/12233417:50
*** rmcall has quit IRC18:00
*** briancurtin has joined #openstack-sdks18:02
*** briancurtin has joined #openstack-sdks18:02
*** rmcall has joined #openstack-sdks18:03
*** rmcall has quit IRC18:14
*** rmcall has joined #openstack-sdks18:28
*** rmcall has quit IRC18:40
*** jdaggett has quit IRC18:56
*** jdaggett has joined #openstack-sdks18:58
stevellesigmavirus24: ping19:09
*** rmcall has joined #openstack-sdks19:11
openstackgerritVictor Silva proposed a change to stackforge/python-openstacksdk: Determines version from auth_url when not explicit  https://review.openstack.org/12547319:30
*** f13o_f13o has joined #openstack-sdks19:41
*** f13o_f13o has quit IRC19:41
dtroyerstevemar: ok, so harpoon…that is meant to be started on a system with a running DevStack, right?19:55
stevemardtroyer, yes, if you look @ patch 8 or 9, i had code to setup a devstack instance19:55
stevemardtroyer, i took it out because i messed up something in config19:56
dtroyerstevemar: ah, ok, I thought I saw that before, cound't find it.19:56
stevemardtroyer, turns out i was stacking -> unstacking -> running tests19:56
tellesnobregahey, i started working with the unified sdk and worked with victsou in a bug. we would to know what more can we do to improve the sdk, what are the major plans19:56
dtroyerso how would you envision setting this up to point to a random devstack/cloud?19:57
sigmavirus24stevelle: sorry, wasn't paying attention to irc19:57
stevellenp19:57
stevemardtroyer, *finally* getting successful runs.... https://jenkins06.openstack.org/job/check-osc-dsvm-functional/7/console19:58
stevemardtroyer, I was thinking harpoonrc could store AUTH_URL and other variables19:59
stevellesigmavirus24: wanted to follow up on your comments.  I def don't se the Python 2/3 compat issue and prob dont follow on the submodule packaging.  Then again I just ran out of steam before I added my comments to my patch20:00
sigmavirus24I may have been mistaken about callable, but I could have sworn it was missing on python 3.x, let me check20:01
sigmavirus24Hm. That works. I wonder what I was thinking of then.20:01
stevellesigmavirus24:  The diff btween changesets 3 and 4 was a compat issue.  I had draft comments on 3 that I am moving to 420:02
stevellesigmavirus24: wont surprise me if there are more compat concerns.20:02
sigmavirus24So the other thing is that BoolStr should be a type, but right now you're using it like a module in Ruby (if that makes any sense)20:02
Alex_Gaynorsigmavirus24: callable is missing in 3.1, maybe 3.220:03
Alex_Gaynorit was added back20:03
sigmavirus24Ah, that's why I thought it was missing on 3.x20:03
stevellesigmavirus24: not sure I see why I am doing it that way, but I believe you20:03
sigmavirus24stevelle: you're passing BoolStr as type=BoolStr but never actually calling BoolStr(value), you're checking for BoolStr.parse and BoolStr.to_json (which were pieces you added)20:04
sigmavirus24You could simplify the handling by defining __nonzero__ (for Python 2) and __bool__ (for Py 3) to return the parsed value for you. Since it's not uncommon for initializers to raise TypeErrors you can still raise a TypeError from BoolStr.__init__ when the value is just plain wrong20:06
stevellesigmavirus24: that is a pocket where I just don't have a feel for the pythonic way yet. There is some subtlety in there that I didn't feel right to me at the time, can play with changing it.20:07
sigmavirus24So I might be assuming too much. But you're using BoolStr as a type here: https://review.openstack.org/#/c/124209/4/openstack/identity/v2/role.py20:08
sigmavirus24but https://review.openstack.org/#/c/124209/4/openstack/resource.py is where you added checks for parse and to_json and I think it could be simplified by just calling self.type(value) (if you rename parse to __init__) and such20:09
stevellesigmavirus24: I'll tinker with it and see if I follow.  Trying to read up on __nonzero__ and __bool__ now.20:13
sigmavirus24stevelle: I can put together an example for you to tinker with if it'll help20:13
stevellesigmavirus24: think I'll get more right now from my own fingers working.20:14
sigmavirus24Let me know if you need anything20:14
*** rmcall has quit IRC20:25
openstackgerritA change was merged to stackforge/python-openstacksdk: Fix find for resources with id_attribute  https://review.openstack.org/12294820:43
dtroyerstevemar: are the functional tests meant to be inside the project namespace?  for some reason I had it in my mind that they should be outside the openstackclient namespace…20:49
stevemardtroyer, there doesn't really seem to be an consistency on that, i looked at a few projects20:51
dtroyerof course20:51
stevemardtroyer, yay, a successful run20:57
stevemardtroyer, with no logs other than "Ran 3 tests in 4.865s - OK"20:58
dtroyerstevemar: yeah, but the gate is killing us…20:59
stevemardtroyer, what do you mean?21:00
dtroyerall three of the +A reviews failed21:01
stevemardtroyer, oh... that balls not in our court though21:04
dtroyerI've had exactly one merge today across three projects21:06
dtroyerand that's the project totals, not just my reviews21:07
*** mfer has quit IRC21:22
dtroyerand recheck sends it back through the check queue too…doing one at a time so we don't soak up 24 VMs only to have them be cancelled…21:24
dtroyerstevemar: what other projects have functional tests in the repo already?21:26
stevemardtroyer, heat/neutron/swift21:27
stevemardtroyer, well not really heat... https://github.com/openstack/heat/blob/master/tox.ini#L2221:28
stevemarneutron here: https://github.com/openstack/neutron/tree/master/neutron/tests/functional21:29
stevemarswift: https://github.com/openstack/swift/tree/master/test/functional21:29
dtroyerso both seem to have the 'unit' directory, one in tree and one out.21:30
dtroyerand both have a rep for going their own way on stuff…21:31
dtroyer<sigh>21:31
stevemarhehe21:31
dtroyernot that I'm any better in that regard ;)21:32
stevemardtroyer, let's move them under tests21:32
stevemarwait... i think i kept that away from tests, because i didn't want them to run if someone did tox -e py2721:33
dtroyerright, that was one of my worries21:33
dtroyerat the moment I have a strong urge to create a top-level dir (arpoon or func-test or something) to hold all of this including harpoon.sh and harpoonrc21:34
stevemardtroyer, yeah, that would definitely happen (looking at .testr.conf ->  -m subunit.run discover -t ./ ./openstackclient/tests)21:34
stevemardtroyer, i'd be game for that21:35
dtroyerheh, good to know that, I've never gone looking for how that worked…21:35
stevemardtroyer, as long as i can keep post_gate_hook.sh where it is21:35
dtroyerI think that is fine, it's an interface21:35
stevemarotherwise i have to propose yet another patch to infra, and i think i'm running out of good karma there21:36
stevellesigmavirus24: ping21:36
stevemardtroyer, ok, let me move things around21:37
sigmavirus24stevelle: pong21:37
stevemardtroyer, i am hoping that the first pass can be without the whole (if no cloud is detected, spin up devstack)21:37
dtroyerstevemar: rename harpoon to harpoon.sh just because.  for one, gerrit will properly syntax highlight it21:38
*** mfer has joined #openstack-sdks21:38
stevellesigmavirus24: I think I came close to what you were imagining on BoolStr but came up with one sticky point.21:38
dtroyerstevemar: sure.  that's one reason I'm focused on how to set it up to use an existing cloud21:38
sigmavirus24stevelle: shoot. what happened?21:38
*** rmcall has joined #openstack-sdks21:39
stevellesigmavirus24: __get__(...) in resource.prop gets simpler, as suggested, but is now relying on __nonzero__ / __bool__21:40
sigmavirus24stevelle: with __nonzero__/__bool__ you just call bool(BoolStr('true'))21:40
sigmavirus24you get back True/False21:40
stevemardtroyer, what about the actual test code?21:41
dtroyerharpoon/functional?21:41
stevemardtroyer, yeah - the python code :P21:41
stevellesigmavirus24: yes, and that leaks the BoolStr into resource21:41
stevemardtroyer, here -> https://review.openstack.org/#/c/122605/10/openstackclient/functional/test_identity.py21:42
stevemardtroyer, note that this file is heavily influenced from tempest CLI https://review.openstack.org/#/c/122605/10/openstackclient/functional/common.py21:42
dtroyerstevemar: that was the original question, should it be under the openstackclient namespace or not?  ATM I lean toward putting it in harpoon.21:43
*** stevemar has quit IRC21:43
stevellesigmavirus24: mentally swap BoolStr with IPv4Str, you wouldn't bool(IPv4Str('127.0.0.1'))21:44
sigmavirus24hm, yeah, right21:44
*** stevemar has joined #openstack-sdks21:44
stevemardtroyer, got disconnected21:44
sigmavirus24so what's the problem with doing if self.type and not isinstance(value, self.type):\nreturn self.type(value) ?21:44
sigmavirus24It's technically a bool string (it'll react exactly the same in an if-statement as a bool would)21:45
sigmavirus24I'm not super familiar with the use of items in openstack.resource21:45
stevellefrom the API consumer's side, it's a bool. The REST API's inconsistency should be hidden21:46
stevellesigmavirus24: just exposing the value trait in the BoolStr would probably solve this consistently21:49
stevellesigmavirus24: how about BoolStr('true').value or less likely .value_of()21:50
sigmavirus24that won't work on all types though, for example, type=dict21:50
*** briancurtin has quit IRC21:51
stevellesigmavirus24: oops, yeah. thats why I had the callable mess21:51
sigmavirus24yeah,21:51
sigmavirus24so I know how to do this in such a way as to not need anything like the callable mess21:52
sigmavirus24but it's a hack and kind of a bad idea all around21:52
sigmavirus24So I don't think I'll mention it in polite company =P21:52
stevellegood planm21:52
sigmavirus24So an SDK should make things very simple for the user ideally, but I'm wondering how much complexity we want to absorb to simply return True/False when those aren't the actual values returned by the API21:54
*** mordred has quit IRC21:54
*** mordred has joined #openstack-sdks21:54
sigmavirus24Which makes me wonder if there should be a function the user can import an use to check for boolean-ness of a given string instead of trying to do this for them21:54
dtroyersigmavirus24: my thought there is to hide the inconsistencies of the REAT APIs in that regard, but do not change the semantics of the data, only the form/type/field name, etc.21:55
sigmavirus24dtroyer: yeah I get that. I guess I've seen enough libraries turn into messes of type checking with stuff like if self.type == format.BoolStr: # do x that I'm wary to resort to that even if it is the easiest way to handle this21:57
sigmavirus24I get wanting to make the UX more consistent and agree whole-heartedly21:57
sigmavirus24heck you could even make the __repr__ of BoolStr return the same repr as the parsed value21:57
sigmavirus24And then proxy everything to the parsed value so you get all the same AttributeErrors etc21:58
sigmavirus24But that's complexity to hide the fact that we're hiding inconsistencies (and at least it's complexity in one place, the formatter)21:58
dtroyerYeah, I don't have a better idea, other than to keep this stuff at the lowest level possible and don't be too tricky about it because maintenance someday.21:59
openstackgerritSteve Martinelli proposed a change to openstack/python-openstackclient: Add functional tests to osc  https://review.openstack.org/12260522:01
stevemardtroyer, hopefully that makes it a bit cleaner22:04
stevemar^22:04
dtroyerstevemar: so you reversed the dir from what I was thinking but that's closer to 'the other guys' so OK22:06
openstackgerritSteve Martinelli proposed a change to openstack/python-openstackclient: Create a whole slew of functional tests for identity  https://review.openstack.org/12521622:07
stevemardtroyer, wha? i thought this was closer to what we were talking about22:08
stevemardrop harpoon related stuff into functional directory22:08
stevemarunless you wanted functional to be top-most level, like with doc and tools22:09
dtroyeryeah, outside the openstackclient namespace.  I don't thing the shell and other stuff belongs in there at all.  My suggestion was (from the repo root)  harpoon/functional  and harpoon/harpoon.sh etc.   having the top level dir named like that might PO some people so following swift might be better and have test/functional and whatnot.22:10
dtroyerclear as mud?22:10
stevemarclear as stainglass windows22:11
dtroyerat least you get light through those22:11
*** bknudson has quit IRC22:15
*** mfer has quit IRC22:20
sigmavirus24so we can't proxy everything to BoolStr and make it appear to be a bool because then people will do something akin to BoolStr('true') is True and everything will break.22:29
stevelleif this was ruby we would just monkeypatch is :)22:30
*** sigmavirus24 is now known as sigmavirus24_awa22:37
*** bknudson has joined #openstack-sdks23:17
*** briancurtin has joined #openstack-sdks23:18
*** briancurtin has quit IRC23:31
*** briancurtin has joined #openstack-sdks23:32
*** briancurtin has quit IRC23:32
*** briancurtin has joined #openstack-sdks23:32
stevemardtroyer, http://paste.openstack.org/show/117612/23:39
openstackgerritSteve Martinelli proposed a change to openstack/python-openstackclient: Add functional tests to osc  https://review.openstack.org/12260523:46
*** bknudson has quit IRC23:58
*** bknudson has joined #openstack-sdks23:59

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