*** stevemar has joined #openstack-sdks | 00:12 | |
*** ayoung has joined #openstack-sdks | 00:39 | |
*** rmcall has quit IRC | 00:39 | |
*** stevemar has quit IRC | 00:57 | |
*** HenryG_ has joined #openstack-sdks | 01:22 | |
*** stevemar has joined #openstack-sdks | 01:24 | |
*** HenryG has quit IRC | 01:24 | |
openstackgerrit | Steve Martinelli proposed a change to openstack/python-openstackclient: Create a whole slew of functional tests for identity https://review.openstack.org/125216 | 02:07 |
---|---|---|
*** HenryG_ has quit IRC | 02:25 | |
openstackgerrit | Steve Lewis proposed a change to stackforge/python-openstacksdk: Handle booleans that are strings in APIs https://review.openstack.org/124209 | 02:36 |
*** jamielennox has quit IRC | 02:40 | |
*** HenryG has joined #openstack-sdks | 02:41 | |
openstackgerrit | Steve Lewis proposed a change to stackforge/python-openstacksdk: Handle booleans that are strings in APIs https://review.openstack.org/124209 | 02:42 |
*** jamielenz has joined #openstack-sdks | 02:47 | |
*** jamielenz is now known as jamielennox | 02:48 | |
*** jamielennox has quit IRC | 03:13 | |
*** jamielenz has joined #openstack-sdks | 03:17 | |
*** jamielenz is now known as jamielennox | 03:17 | |
*** tellesnobrega_ has quit IRC | 03:18 | |
*** rmcall has joined #openstack-sdks | 03:57 | |
*** rmcall has quit IRC | 04:11 | |
*** rmcall has joined #openstack-sdks | 04:18 | |
*** tellesnobrega has joined #openstack-sdks | 05:08 | |
*** k4n0 has joined #openstack-sdks | 05:47 | |
*** briancurtin has quit IRC | 05:47 | |
*** terrylhowe has quit IRC | 05:57 | |
*** rmcall has quit IRC | 07:03 | |
*** rmcall has joined #openstack-sdks | 07:05 | |
*** stevemar has quit IRC | 07:18 | |
*** jamiehannaford has joined #openstack-sdks | 07:25 | |
*** rmcall has quit IRC | 07:29 | |
*** ayoung has quit IRC | 08:23 | |
openstackgerrit | Matthieu Huin proposed a change to openstack/python-openstackclient: Unscoped federated user-specific commands https://review.openstack.org/124101 | 09:09 |
*** ayoung has joined #openstack-sdks | 11:47 | |
*** terrylhowe has joined #openstack-sdks | 11:50 | |
openstackgerrit | Marek Denis proposed a change to openstack/python-openstackclient: Implement CRUD operations for Mapping objects https://review.openstack.org/86912 | 12:42 |
*** sigmavirus24_awa is now known as sigmavirus24 | 12:52 | |
openstackgerrit | Marek Denis proposed a change to openstack/python-openstackclient: Implement CRUD operations for Mapping objects https://review.openstack.org/86912 | 13:08 |
*** mfer has joined #openstack-sdks | 13:19 | |
*** briancurtin has joined #openstack-sdks | 13:59 | |
*** stevemar has joined #openstack-sdks | 14:10 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 14:12 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 14:13 | |
*** openstackgerrit has quit IRC | 14:18 | |
*** openstackgerrit has joined #openstack-sdks | 14:18 | |
*** bknudson has joined #openstack-sdks | 14:19 | |
*** jamiehan_ has joined #openstack-sdks | 14:37 | |
*** dhellmann has joined #openstack-sdks | 14:38 | |
*** dhellmann has quit IRC | 14:38 | |
*** jamiehannaford has quit IRC | 14:40 | |
*** dhellmann has joined #openstack-sdks | 14:41 | |
*** jamiehan_ has quit IRC | 14:41 | |
*** openstackgerrit has quit IRC | 14:47 | |
*** openstackgerrit has joined #openstack-sdks | 14:48 | |
*** jamiehannaford has joined #openstack-sdks | 14:49 | |
*** dhellmann_ has quit IRC | 14:57 | |
*** dhellmann_ has joined #openstack-sdks | 15:01 | |
*** openstackgerrit has quit IRC | 15:02 | |
*** openstackgerrit has joined #openstack-sdks | 15:03 | |
*** dhellmann_ has quit IRC | 15:05 | |
*** dhellmann_ has joined #openstack-sdks | 15:06 | |
*** sigmavirus24 is now known as sigmavirus24_awa | 15:08 | |
*** sigmavirus24_awa is now known as sigmavirus24 | 15:10 | |
*** rmcall has joined #openstack-sdks | 15:21 | |
*** dhellmann_ has quit IRC | 15:26 | |
*** dhellmann_ has joined #openstack-sdks | 15:28 | |
*** dhellmann has quit IRC | 15:34 | |
*** dhellmann_ is now known as dhellmann | 15:34 | |
*** jamielennox has quit IRC | 15:49 | |
*** jamielennox has joined #openstack-sdks | 16:01 | |
*** k4n0 has quit IRC | 16:05 | |
*** jamielennox has quit IRC | 16:08 | |
*** jamielennox has joined #openstack-sdks | 16:16 | |
*** glenc has quit IRC | 16:17 | |
*** mordred has quit IRC | 16:17 | |
*** ayoung has quit IRC | 16:17 | |
*** openstackgerrit has quit IRC | 16:18 | |
*** glenc has joined #openstack-sdks | 16:18 | |
*** mordred has joined #openstack-sdks | 16:18 | |
*** ayoung has joined #openstack-sdks | 16:18 | |
*** openstackgerrit has joined #openstack-sdks | 16:18 | |
*** jamiehannaford has quit IRC | 16:41 | |
*** briancurtin has quit IRC | 16:42 | |
*** briancurtin has joined #openstack-sdks | 17:13 | |
*** briancurtin has quit IRC | 17:17 | |
stevemar | dtroyer, going to approve top-to-bottom and low level API, fyi | 17:37 |
dtroyer | stevemar: cool, thanks | 17:38 |
dtroyer | still waking up from the party last night… | 17:38 |
dtroyer | I should be able to spend some time with the functional test stuff today, I need to get how that works into my head | 17:39 |
stevemar | dtroyer, oh wonderful, i was just going to bug you about that https://review.openstack.org/#/c/125216/ | 17:40 |
stevemar | dtroyer, i'll be honest, i was cheering for oakland | 17:40 |
stevemar | but any time the sox and yankees aren't in the post season, it's going to be a great post season | 17:41 |
dtroyer | heretic! Only the Yankees are worse here… | 17:41 |
dtroyer | my childhood was full of A's and Yankees keeping KC out of the playoffs and/or series | 17:42 |
stevemar | i'm still bummed that the jays didn't make it | 17:43 |
stevemar | i was so hopeful this year, gah! | 17:43 |
openstackgerrit | Steve Martinelli proposed a change to openstack/python-openstackclient: Move object-store commands to low-level API https://review.openstack.org/122334 | 17:50 |
*** rmcall has quit IRC | 18:00 | |
*** briancurtin has joined #openstack-sdks | 18:02 | |
*** briancurtin has joined #openstack-sdks | 18:02 | |
*** rmcall has joined #openstack-sdks | 18:03 | |
*** rmcall has quit IRC | 18:14 | |
*** rmcall has joined #openstack-sdks | 18:28 | |
*** rmcall has quit IRC | 18:40 | |
*** jdaggett has quit IRC | 18:56 | |
*** jdaggett has joined #openstack-sdks | 18:58 | |
stevelle | sigmavirus24: ping | 19:09 |
*** rmcall has joined #openstack-sdks | 19:11 | |
openstackgerrit | Victor Silva proposed a change to stackforge/python-openstacksdk: Determines version from auth_url when not explicit https://review.openstack.org/125473 | 19:30 |
*** f13o_f13o has joined #openstack-sdks | 19:41 | |
*** f13o_f13o has quit IRC | 19:41 | |
dtroyer | stevemar: ok, so harpoon…that is meant to be started on a system with a running DevStack, right? | 19:55 |
stevemar | dtroyer, yes, if you look @ patch 8 or 9, i had code to setup a devstack instance | 19:55 |
stevemar | dtroyer, i took it out because i messed up something in config | 19:56 |
dtroyer | stevemar: ah, ok, I thought I saw that before, cound't find it. | 19:56 |
stevemar | dtroyer, turns out i was stacking -> unstacking -> running tests | 19:56 |
tellesnobrega | hey, 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 plans | 19:56 |
dtroyer | so how would you envision setting this up to point to a random devstack/cloud? | 19:57 |
sigmavirus24 | stevelle: sorry, wasn't paying attention to irc | 19:57 |
stevelle | np | 19:57 |
stevemar | dtroyer, *finally* getting successful runs.... https://jenkins06.openstack.org/job/check-osc-dsvm-functional/7/console | 19:58 |
stevemar | dtroyer, I was thinking harpoonrc could store AUTH_URL and other variables | 19:59 |
stevelle | sigmavirus24: 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 patch | 20:00 |
sigmavirus24 | I may have been mistaken about callable, but I could have sworn it was missing on python 3.x, let me check | 20:01 |
sigmavirus24 | Hm. That works. I wonder what I was thinking of then. | 20:01 |
stevelle | sigmavirus24: The diff btween changesets 3 and 4 was a compat issue. I had draft comments on 3 that I am moving to 4 | 20:02 |
stevelle | sigmavirus24: wont surprise me if there are more compat concerns. | 20:02 |
sigmavirus24 | So 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_Gaynor | sigmavirus24: callable is missing in 3.1, maybe 3.2 | 20:03 |
Alex_Gaynor | it was added back | 20:03 |
sigmavirus24 | Ah, that's why I thought it was missing on 3.x | 20:03 |
stevelle | sigmavirus24: not sure I see why I am doing it that way, but I believe you | 20:03 |
sigmavirus24 | stevelle: 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 |
sigmavirus24 | You 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 wrong | 20:06 |
stevelle | sigmavirus24: 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 |
sigmavirus24 | So 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.py | 20:08 |
sigmavirus24 | but 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 such | 20:09 |
stevelle | sigmavirus24: I'll tinker with it and see if I follow. Trying to read up on __nonzero__ and __bool__ now. | 20:13 |
sigmavirus24 | stevelle: I can put together an example for you to tinker with if it'll help | 20:13 |
stevelle | sigmavirus24: think I'll get more right now from my own fingers working. | 20:14 |
sigmavirus24 | Let me know if you need anything | 20:14 |
*** rmcall has quit IRC | 20:25 | |
openstackgerrit | A change was merged to stackforge/python-openstacksdk: Fix find for resources with id_attribute https://review.openstack.org/122948 | 20:43 |
dtroyer | stevemar: 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 |
stevemar | dtroyer, there doesn't really seem to be an consistency on that, i looked at a few projects | 20:51 |
dtroyer | of course | 20:51 |
stevemar | dtroyer, yay, a successful run | 20:57 |
stevemar | dtroyer, with no logs other than "Ran 3 tests in 4.865s - OK" | 20:58 |
dtroyer | stevemar: yeah, but the gate is killing us… | 20:59 |
stevemar | dtroyer, what do you mean? | 21:00 |
dtroyer | all three of the +A reviews failed | 21:01 |
stevemar | dtroyer, oh... that balls not in our court though | 21:04 |
dtroyer | I've had exactly one merge today across three projects | 21:06 |
dtroyer | and that's the project totals, not just my reviews | 21:07 |
*** mfer has quit IRC | 21:22 | |
dtroyer | and 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 |
dtroyer | stevemar: what other projects have functional tests in the repo already? | 21:26 |
stevemar | dtroyer, heat/neutron/swift | 21:27 |
stevemar | dtroyer, well not really heat... https://github.com/openstack/heat/blob/master/tox.ini#L22 | 21:28 |
stevemar | neutron here: https://github.com/openstack/neutron/tree/master/neutron/tests/functional | 21:29 |
stevemar | swift: https://github.com/openstack/swift/tree/master/test/functional | 21:29 |
dtroyer | so both seem to have the 'unit' directory, one in tree and one out. | 21:30 |
dtroyer | and both have a rep for going their own way on stuff… | 21:31 |
dtroyer | <sigh> | 21:31 |
stevemar | hehe | 21:31 |
dtroyer | not that I'm any better in that regard ;) | 21:32 |
stevemar | dtroyer, let's move them under tests | 21:32 |
stevemar | wait... i think i kept that away from tests, because i didn't want them to run if someone did tox -e py27 | 21:33 |
dtroyer | right, that was one of my worries | 21:33 |
dtroyer | at 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 harpoonrc | 21:34 |
stevemar | dtroyer, yeah, that would definitely happen (looking at .testr.conf -> -m subunit.run discover -t ./ ./openstackclient/tests) | 21:34 |
stevemar | dtroyer, i'd be game for that | 21:35 |
dtroyer | heh, good to know that, I've never gone looking for how that worked… | 21:35 |
stevemar | dtroyer, as long as i can keep post_gate_hook.sh where it is | 21:35 |
dtroyer | I think that is fine, it's an interface | 21:35 |
stevemar | otherwise i have to propose yet another patch to infra, and i think i'm running out of good karma there | 21:36 |
stevelle | sigmavirus24: ping | 21:36 |
stevemar | dtroyer, ok, let me move things around | 21:37 |
sigmavirus24 | stevelle: pong | 21:37 |
stevemar | dtroyer, i am hoping that the first pass can be without the whole (if no cloud is detected, spin up devstack) | 21:37 |
dtroyer | stevemar: rename harpoon to harpoon.sh just because. for one, gerrit will properly syntax highlight it | 21:38 |
*** mfer has joined #openstack-sdks | 21:38 | |
stevelle | sigmavirus24: I think I came close to what you were imagining on BoolStr but came up with one sticky point. | 21:38 |
dtroyer | stevemar: sure. that's one reason I'm focused on how to set it up to use an existing cloud | 21:38 |
sigmavirus24 | stevelle: shoot. what happened? | 21:38 |
*** rmcall has joined #openstack-sdks | 21:39 | |
stevelle | sigmavirus24: __get__(...) in resource.prop gets simpler, as suggested, but is now relying on __nonzero__ / __bool__ | 21:40 |
sigmavirus24 | stevelle: with __nonzero__/__bool__ you just call bool(BoolStr('true')) | 21:40 |
sigmavirus24 | you get back True/False | 21:40 |
stevemar | dtroyer, what about the actual test code? | 21:41 |
dtroyer | harpoon/functional? | 21:41 |
stevemar | dtroyer, yeah - the python code :P | 21:41 |
stevelle | sigmavirus24: yes, and that leaks the BoolStr into resource | 21:41 |
stevemar | dtroyer, here -> https://review.openstack.org/#/c/122605/10/openstackclient/functional/test_identity.py | 21:42 |
stevemar | dtroyer, note that this file is heavily influenced from tempest CLI https://review.openstack.org/#/c/122605/10/openstackclient/functional/common.py | 21:42 |
dtroyer | stevemar: 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 IRC | 21:43 | |
stevelle | sigmavirus24: mentally swap BoolStr with IPv4Str, you wouldn't bool(IPv4Str('127.0.0.1')) | 21:44 |
sigmavirus24 | hm, yeah, right | 21:44 |
*** stevemar has joined #openstack-sdks | 21:44 | |
stevemar | dtroyer, got disconnected | 21:44 |
sigmavirus24 | so what's the problem with doing if self.type and not isinstance(value, self.type):\nreturn self.type(value) ? | 21:44 |
sigmavirus24 | It's technically a bool string (it'll react exactly the same in an if-statement as a bool would) | 21:45 |
sigmavirus24 | I'm not super familiar with the use of items in openstack.resource | 21:45 |
stevelle | from the API consumer's side, it's a bool. The REST API's inconsistency should be hidden | 21:46 |
stevelle | sigmavirus24: just exposing the value trait in the BoolStr would probably solve this consistently | 21:49 |
stevelle | sigmavirus24: how about BoolStr('true').value or less likely .value_of() | 21:50 |
sigmavirus24 | that won't work on all types though, for example, type=dict | 21:50 |
*** briancurtin has quit IRC | 21:51 | |
stevelle | sigmavirus24: oops, yeah. thats why I had the callable mess | 21:51 |
sigmavirus24 | yeah, | 21:51 |
sigmavirus24 | so I know how to do this in such a way as to not need anything like the callable mess | 21:52 |
sigmavirus24 | but it's a hack and kind of a bad idea all around | 21:52 |
sigmavirus24 | So I don't think I'll mention it in polite company =P | 21:52 |
stevelle | good planm | 21:52 |
sigmavirus24 | So 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 API | 21:54 |
*** mordred has quit IRC | 21:54 | |
*** mordred has joined #openstack-sdks | 21:54 | |
sigmavirus24 | Which 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 them | 21:54 |
dtroyer | sigmavirus24: 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 |
sigmavirus24 | dtroyer: 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 this | 21:57 |
sigmavirus24 | I get wanting to make the UX more consistent and agree whole-heartedly | 21:57 |
sigmavirus24 | heck you could even make the __repr__ of BoolStr return the same repr as the parsed value | 21:57 |
sigmavirus24 | And then proxy everything to the parsed value so you get all the same AttributeErrors etc | 21:58 |
sigmavirus24 | But 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 |
dtroyer | Yeah, 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 |
openstackgerrit | Steve Martinelli proposed a change to openstack/python-openstackclient: Add functional tests to osc https://review.openstack.org/122605 | 22:01 |
stevemar | dtroyer, hopefully that makes it a bit cleaner | 22:04 |
stevemar | ^ | 22:04 |
dtroyer | stevemar: so you reversed the dir from what I was thinking but that's closer to 'the other guys' so OK | 22:06 |
openstackgerrit | Steve Martinelli proposed a change to openstack/python-openstackclient: Create a whole slew of functional tests for identity https://review.openstack.org/125216 | 22:07 |
stevemar | dtroyer, wha? i thought this was closer to what we were talking about | 22:08 |
stevemar | drop harpoon related stuff into functional directory | 22:08 |
stevemar | unless you wanted functional to be top-most level, like with doc and tools | 22:09 |
dtroyer | yeah, 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 |
dtroyer | clear as mud? | 22:10 |
stevemar | clear as stainglass windows | 22:11 |
dtroyer | at least you get light through those | 22:11 |
*** bknudson has quit IRC | 22:15 | |
*** mfer has quit IRC | 22:20 | |
sigmavirus24 | so 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 |
stevelle | if this was ruby we would just monkeypatch is :) | 22:30 |
*** sigmavirus24 is now known as sigmavirus24_awa | 22:37 | |
*** bknudson has joined #openstack-sdks | 23:17 | |
*** briancurtin has joined #openstack-sdks | 23:18 | |
*** briancurtin has quit IRC | 23:31 | |
*** briancurtin has joined #openstack-sdks | 23:32 | |
*** briancurtin has quit IRC | 23:32 | |
*** briancurtin has joined #openstack-sdks | 23:32 | |
stevemar | dtroyer, http://paste.openstack.org/show/117612/ | 23:39 |
openstackgerrit | Steve Martinelli proposed a change to openstack/python-openstackclient: Add functional tests to osc https://review.openstack.org/122605 | 23:46 |
*** bknudson has quit IRC | 23:58 | |
*** bknudson has joined #openstack-sdks | 23:59 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!