| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-07-06 | |||
| 12:09:21 | bauzas | alex_xu: heh | |
| 12:15:52 | openstackgerrit | Balazs Gibizer proposed openstack/nova master: Add sample test for instance audit https://review.openstack.org/480955 | |
| 12:17:10 | openstackgerrit | Andrey Kurilin proposed openstack/python-novaclient master: Fix cropping the endpoint url https://review.openstack.org/479818 | |
| 12:19:29 | openstackgerrit | zhangdaolong proposed openstack/python-novaclient master: Fix the inappropriate parameter name https://review.openstack.org/480826 | |
| 12:33:37 | jaypipes | ralonsoh: no idea what the deal is on that "missing link" unit test that's failing on your openstack/releases patch for os-traits 0.3.2.... | |
| 12:34:39 | ralonsoh | jaypipes: uhmmm I'll check this now. Thanks for the heads up | |
| 12:35:03 | jaypipes | ralonsoh: yeah, I have no idea why that is failing. :( | |
| 12:36:49 | cdent | morning jaypipes: i've spiked that gabbi feature you were looking for while doing allocation_candates: https://github.com/cdent/gabbi/pull/215 | |
| 12:37:08 | jaypipes | cdent: w00tness. :) | |
| 12:37:28 | cdent | i'm not sure it is quite good enough yet, so if you can looksee that'd be keen | |
| 12:37:50 | jaypipes | cdent: though, to be honest, the feature I'd *really* love is to be able to represent in YAML the expected HTTP response without using JSONPath at all. | |
| 12:38:02 | cdent | i'm not sure what you mean by that | |
| 12:38:22 | jaypipes | cdent: I mean, I'd like to be able to something like: | |
| 12:38:26 | jaypipes | http_response_expect: | |
| 12:38:36 | jaypipes | allocation_requests: | |
| 12:38:45 | jaypipes | - allocations: | |
| 12:38:51 | jaypipes | resource_provider: | |
| 12:39:00 | jaypipes | uuid: <blah> | |
| 12:39:02 | jaypipes | etc etc | |
| 12:39:11 | jaypipes | cdent: make sense? | |
| 12:39:25 | cdent | full response, or piecemeal? | |
| 12:39:36 | jaypipes | cdent: would be awesome to have options. | |
| 12:39:58 | jaypipes | cdent: like http_response_full_expect: or something like that which would fail if not exact | |
| 12:40:27 | jaypipes | cdent: and otherwise, just fail if the listed parts of the http_response_expect: were not included in the response. | |
| 12:40:32 | cdent | piecemeal is hard because you need some way to say "this" allocations, and that's what led to the json paths | |
| 12:40:41 | jaypipes | understood. | |
| 12:40:43 | jaypipes | code is hard. | |
| 12:40:45 | jaypipes | :P | |
| 12:40:49 | cdent | the fully query stuff see this thread: http://lists.openstack.org/pipermail/openstack-dev/2017-July/119286.html | |
| 12:42:18 | cdent | in any case, you can fake the full stuff by matching the root ($) key, see last half of: https://gabbi.readthedocs.io/en/latest/jsonpath.html | |
| 12:42:42 | jaypipes | cdent: sure, but that's ugly as f**k :) | |
| 12:43:01 | cdent | that looks almost exactly what you have above (which is also ugly as fuck) | |
| 12:43:10 | jaypipes | ok, I'm done. | |
| 12:43:18 | cdent | heh | |
| 12:44:31 | jaypipes | cdent: oh, I see you're referring to the final example in that page | |
| 12:44:35 | cdent | yes | |
| 12:44:42 | jaypipes | cdent: and not the one above it.. | |
| 12:44:51 | cdent | yes | |
| 12:45:05 | cdent | yeah, the filter stuff is ghastly, I agree | |
| 12:45:07 | jaypipes | cdent: didn't know I could do that. | |
| 12:45:36 | cdent | it just falls out of the nature of json path '$' is 'everything' | |
| 12:45:43 | jaypipes | cdent: that would work. though a little hackery would allow one to remove the need for the $: | |
| 12:46:14 | jaypipes | cdent: if, say, Gabbit saw a "response_yaml_exact" tag in the gabbit. | |
| 12:46:55 | cdent | jaypipes: if you read around in that thread, especially the message I linked to, there's some discussion on options for how to do it. A little more discussino ought to lead to some reasonable outcomes | |
| 12:47:31 | cdent | the main thrust of the thread is to be able to read in files that are the json, but it's the same deal in the abstract | |
| 12:47:49 | bauzas | cdent: out of curiosity because I had the problem on Monday, how can I introspect a gabbi functional test? | |
| 12:48:50 | cdent | bauzas: depends on the kind of introspection you want to be doing, but you can make an individual test 'verbose' with 'verbose: True' but frequently the output will be swallowed, depending on the environment | |
| 12:49:03 | cdent | another option is to add a response_strings:\n- something that won't match | |
| 12:49:10 | cdent | and then it will fail and you can see the response | |
| 12:49:14 | bauzas | cdent: basically debugging | |
| 12:49:19 | bauzas | ie. pdb'ing | |
| 12:49:34 | bauzas | since tox can't do that, I generally use testtools.run directly | |
| 12:50:08 | bauzas | but since placement tests are generated by an helper, I can't directly use it | |
| 12:50:26 | bauzas | because testtools.run can't find the test I wanted to debug | |
| 12:50:36 | cdent | subunit.run can | |
| 12:51:16 | bauzas | a-ha! | |
| 12:51:51 | bauzas | at least "python -m testtools.run discover --load-list my-list" is not possible | |
| 13:04:12 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Always refresh cache when checking extensions https://review.openstack.org/480674 | |
| 13:04:12 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Add '_has_dns_extension' function https://review.openstack.org/480675 | |
| 13:04:13 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Use dns_domain value from neutron in os-vif wiring https://review.openstack.org/480676 | |
| 13:04:13 | openstackgerrit | Stephen Finucane proposed openstack/nova master: metadata: Don't use nova-net DNS values with neutron https://review.openstack.org/480616 | |
| 13:12:41 | openstackgerrit | Stephen Finucane proposed openstack/nova master: metadata: Don't use nova-net DNS values with neutron https://review.openstack.org/480616 | |
| 13:16:14 | stephenfin | mriedem, sean-k-mooney: Could either of you explain to me how 'os_vif.objects.network.Network' relates to 'nova.network.model.Network'? | |
| 13:16:57 | stephenfin | sorry - jaypipes ^ | |
| 13:17:10 | stephenfin | I thought we were using the former in [1], but it seems we're not. What's the whole point of the os_vif version if we define our own model? [1] https://review.openstack.org/#/c/480676/ | |
| 13:17:34 | jaypipes | stephenfin: the idea is to eventually get rid of the nova model. | |
| 13:17:46 | jaypipes | stephenfin: and have Neutron just return a serialized os-vif object. | |
| 13:18:04 | jaypipes | stephenfin: we're gradually getting there. but will be a while before we do. | |
| 13:18:20 | stephenfin | jaypipes: I'm guessing that means the 'neutron.objects.network.Network' model will go away then too? | |
| 13:18:22 | stephenfin | Ideally | |
| 13:18:52 | jaypipes | stephenfin: well, that may store some internal (to Neutron) stuff, so not sure... | |
| 13:18:58 | stephenfin | Well, maybe not, but neutron will translate 'neutron.objects.network.Network' -> 'os_vif.objects.network.Network' for sending over the wire | |
| 13:19:08 | jaypipes | stephenfin: os-vif objects are intended to be the shared model between nova and neutron. | |
| 13:19:17 | jaypipes | stephenfin: ya, zactly. | |
| 13:20:51 | cdent | bauzas: you can do something like the following. part of the trick is getting the name of the test right in the face of your discover path: | |
| 13:20:56 | cdent | .tox/functional/bin/python -m subunit.run discover -v nova/tests/functional/api/openstack/placement --load-list <(echo test_placement_api.allocations_check_usages.test_request) | subunit-trace | |
| 13:21:26 | stephenfin | jaypipes: Gotcha. Thanks for the info :) | |
| 13:22:52 | bauzas | cdent: okay | |
| 13:23:21 | bauzas | I need to look more at the subunit framework | |
| 13:23:35 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Store dns_domain value from neutron https://review.openstack.org/480676 | |
| 13:23:35 | openstackgerrit | Stephen Finucane proposed openstack/nova master: metadata: Don't use nova-net DNS values with neutron https://review.openstack.org/480616 | |
| 13:23:42 | cdent | that works for testtools.run as well. if you s/subunit/testtools/ is all good | |
| 13:23:52 | cdent | (and get rid of subunit-trace) | |
| 13:25:03 | cdent | bauzas: then I guess you'd hork pdb in there somewhere. What would your normal of doing that be? | |
| 13:25:49 | bauzas | I usually pdb.set_trace() somewhere and then I just python -m testtools.run the UT I wanna check | |
| 13:27:19 | stephenfin | bauzas: RE: https://review.openstack.org/#/c/391060, I'm going to leave that til mriedem and melwitt come back to it, as they'd similar feedback and it's unchanged since | |
| 13:34:00 | cdent | bauzas: heh, turns out I wrote a faq about this a while ago: https://gabbi.readthedocs.io/en/latest/faq.html#is-gabbi-only-for-testing-python-based-apis | |
| 13:34:13 | cdent | whoops, wrong link: https://gabbi.readthedocs.io/en/latest/faq.html#how-do-i-run-just-one-test | |
| 13:37:07 | jaypipes | tox -efunctional && ./jay-get-breakfast.bash | |
| 13:37:29 | openstackgerrit | Rodolfo Alonso Hernandez proposed openstack/nova master: Add Neutron port capabilities to devspec in request https://review.openstack.org/451777 | |
| 13:48:49 | bauzas | stephenfin: fair enough | |
| 13:49:27 | bauzas | cdent: cool, I looked at the gabbi docs, but didn't find it | |
| 13:50:02 | ildikov | jaypipes: it could almost include breakfast and lunch... :) | |
| 13:51:11 | dansmith | jaypipes: that will get breakfast after the run, I think you want (tox -e functional&); ./jay-get-breakfast.sh | |
| 14:00:15 | mriedem | stephenfin: what happened to sfinucan? | |
| 14:01:21 | stephenfin | mriedem: I wanted cross-promotional, deal mechanics, revenue streams, jargon synergy | |
| 14:01:36 | stephenfin | i.e. I use 'stephenfin' everywhere else and wanted to switch here too | |
| 14:01:52 | mriedem | gah | |
| 14:02:56 | stephenfin | plus there's an 'e' missing from 'sfinucan' which has resulted in more than one incorrectly addressed email | |
| 14:03:01 | cdent | I'm suffering from brand dilution with this cdent/anticdent thing | |