| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-nova - 2017-07-06 | |||
| 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: Add '_has_dns_extension' function https://review.openstack.org/480675 | |
| 13:04:12 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Always refresh cache when checking extensions https://review.openstack.org/480674 | |
| 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: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: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: metadata: Don't use nova-net DNS values with neutron https://review.openstack.org/480616 | |
| 13:23:35 | openstackgerrit | Stephen Finucane proposed openstack/nova master: Store dns_domain value from neutron https://review.openstack.org/480676 | |
| 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 | |
| 14:03:25 | stephenfin | (that is also my Red Hat email alias, but not for long) | |
| 14:03:30 | mriedem | dansmith: i'm in a quandary if you have 5 minutes | |
| 14:03:53 | mriedem | otherwise i shall take it to the ML | |
| 14:03:57 | dansmith | mriedem: okay | |
| 14:04:08 | stephenfin | cdent: You should hire Liz Lemon - she's much better than me at this stuff https://www.youtube.com/watch?v=aocZo3oeNxw | |
| 14:04:39 | mriedem | dansmith: the extend volume change in nova - https://review.openstack.org/#/c/454322/ - i started writing a tempest test for that yesterday, since there is also a cinder change, | |
| 14:04:53 | mriedem | the user (non-admin) can extend their volume in cinder, so like 1G->2G, | |
| 14:04:59 | cdent | stephenfin: she's probably busy | |
| 14:05:07 | mriedem | cinder will call the os-server-external-events API telling nova the volume attached to a server was resized, | |
| 14:05:21 | mriedem | we send that down to the compute to fiddle the os-brick bits (i'm channeling johnthetubaguy-speak here) | |
| 14:05:31 | mriedem | "fiddling bits" is a british term right? | |
| 14:05:47 | dansmith | mriedem: I believe it is yes | |
| 14:05:54 | mriedem | so i asked that an instance action get tracked on the nova side since this is all async, | |
| 14:05:57 | mriedem | that's done, all well and good, | |
| 14:06:00 | edleafe | stephenfin: I settled on 'edleafe' long ago for all my accounts. Not enough brain cells to keep track of different handles | |
| 14:06:12 | mriedem | problem comes in on the api user side trying to sort out when the actual operation is done on the nova side, | |
| 14:06:18 | edleafe | stephenfin: plus all the branding synergy, of course | |
| 14:06:29 | mriedem | i was relying on the instance action events in tempest - however, the events are only shown for admin users | |
| 14:06:30 | stephenfin | edleafe: Yup, my problem exactly. Plus it helps with branding | |