Earlier  
Posted Nick Remark
#openstack-sdks - 2018-07-03
13:44:28 mordred ah - hrm. yeah - I suppose so in this case
13:45:01 dtantsur assuming we can provide a microversion per request in OSC
13:45:20 mordred we can using sdk - not so much with novaclient
13:45:44 dtantsur which one is used by OSC?
13:45:47 mordred *except* - at least in my world, if a user has explicity set a config value for a specific microversion in compute_api_version - I would argue that we should not override that setting
13:46:23 mordred dtantsur: novaclient for now - although at some point we're hoping to get things shifted over to sdk - dean is waiting on a 1.0 from sdk before starting in on that
13:46:28 dtantsur yep, so maybe if os_compute_api_version is None: os_compute_api_version = '2.2' elif os_compute_api_version < '2.2': boom
13:46:51 mordred dtantsur: yah- I think that would be good and upwards compatible with a future where compute_api_version might not be set
13:47:17 mordred (today it'll always be set because of defaults - but once we've got the discovery stuff finished plumbed through, it can start being None and things working)
13:47:45 dtantsur ah, random defaults, similar to 1.6 in ironic? :)
13:47:48 mordred yup
13:48:01 dtantsur * 1.9 in ironicclient and 1.6 in openstacksdk because we LOVE consistency
13:48:08 mordred \o/
13:48:37 mordred well - I've almost got the last discovery patch for sdk written in my head - so hopefully we're almost there
13:48:57 mordred Luzi: hello! yes - I agree, putting it in OpenStackCloud is not the right place ...
13:49:23 mordred Luzi: I've got a half-written patch on my laptop which should make a better place for you to put the generator
13:49:43 mordred Luzi: let me push up the work-in-progress in just a few minutes and see what you think
13:50:21 Luzi mordred, that sounds good :)
13:51:25 mordred Luzi: the generator class itself should probably just go in its own file in openstack/image - and then it should get attached to the image upload code in openstack/image/v1/_proxy and openstack/image/v2/_proxy ... but step 1 is to take the existing image upload logic from openstackcloud and move it to the proxy classes
13:58:45 mordred frickler: speaking of osc patches - https://review.openstack.org/#/c/540541/
14:00:18 dtantsur mordred: any reason Resource does not implement the dict interface? This way it would be compatible with a Munch
14:00:33 dtantsur e.g. I could start returning openstack.baremetal.v1.Node from *machine* calls
14:00:56 mordred dtantsur: that is the _other_ main patch I wanna finish before cutting 1.0
14:01:04 dtantsur very good :)
14:01:46 mordred dtantsur: https://review.openstack.org/#/c/530835/ is the very broken WIP patch for that
14:01:55 dtantsur I want to move *machine* calls to use openstack.baremetal.v1.* stuff internally, but currently they return incompatible result
14:02:07 mordred yup
14:02:13 mordred we share the same goal
14:03:18 dtantsur good
14:03:34 dtantsur I guess currently I can do munchify(node.to_dict()) as an ugly hack
14:04:00 dtantsur but what I'm hitting with my provisioning state patch is that I get a redundant GET call on each conversion between a Munch and a Node
14:04:07 dtantsur which is probably fine for now, but has to be fixed eventually
14:04:16 mordred yah - extra calls seem lame
14:04:26 dtantsur is it acceptable temporary?
14:06:13 mordred dtantsur: I'd be curious to discover why a GET call is being made during the conversion ...
14:07:12 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Use openstack.config for config and Session objects https://review.openstack.org/579139
14:07:13 dtantsur mordred: https://review.openstack.org/#/c/570895/4/openstack/cloud/openstackcloud.py@9400 causes uuid-to-Node conversion
14:07:28 mordred dtroyer: ^^ that patch passes for me locally now, so might be not a waste of your time to review
14:07:37 dtantsur even when this call is used from e.g. register_machine where we already have a Munch
14:07:55 dtantsur because we cannot pass in a Munch, we need a UUID or a Node
14:09:55 mordred if we have a munch, we should be able to make a Node from it without an api call - I'd think Node(**munch_node) would do the trick?
14:10:47 dtantsur good idea, maybe we should generalize it as Resource.from_munch?
14:11:03 dtantsur defaulting to just cls(**munch)
14:12:55 frickler mordred: oh, that makes me wonder whether it'll fix my neutron ssl issues. will check.
14:13:49 mordred dtantsur: good idea - although maybe make it Resource._from_munch for now - since we might not need it once we finish and land the other thing
14:14:23 dtantsur mordred: okay, I'll see what I can do
14:14:42 dtroyer mordred: coolio, will have a look
14:23:42 dtroyer mordred: looks nice, thank you!
14:27:57 mordred dtroyer: yay!
16:11:18 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: Add Resource._from_munch class method https://review.openstack.org/579908
16:11:19 dtantsur mordred: ^^^
16:11:28 dtantsur now let's see if I can get a good use of it
16:11:40 openstackgerrit Monty Taylor proposed openstack/openstacksdk master: Use shade create_image method in image proxy layer https://review.openstack.org/579168
16:11:48 mordred dtantsur: neat. I could probably use that in that patch ^^
16:12:52 dtantsur mordred: oh, curious, I'm doing it the other way around in my patch: shade level calling baremetal proxy
16:13:02 dtantsur is there The Right approach here? or just whatever fits?
16:20:02 dtantsur hmm, and should I wire this _from_munch into Proxy._get_resource? so that all proxies support it automagically?
16:20:14 dtantsur this can be dangerous, maybe only for ironic for now..
16:22:47 dtantsur actually, from_munch can probably be implemented using the Body() fields
16:32:18 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: Add Resource._from_munch class method https://review.openstack.org/579908
16:43:29 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: Handle Munch objects in proxies https://review.openstack.org/579908
16:55:15 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: Handle Munch objects in proxies https://review.openstack.org/579908
17:42:37 mordred dtantsur|afk: your way is the better way - we want to get to the shade layer calling the proxy layer rather than the other way around
17:43:37 mordred dtantsur|afk: but for create_image that's going to require some surgery, so I figured invert it for now, then iterate on getting it done right as a followup
20:28:53 openstackgerrit David Shrewsbury proposed openstack-infra/shade master: Fix for passing dict for get_* methods https://review.openstack.org/579974
20:29:12 Shrews that probably could use a test
20:29:43 mordred yah. also - I'm pretty sure pep8 is going to complain about the whitespace
20:32:06 openstackgerrit David Shrewsbury proposed openstack-infra/shade master: Fix for passing dict for get_* methods https://review.openstack.org/579974
20:32:18 Shrews pep8 passed for me
20:33:56 mordred Shrews: cool
20:35:31 Shrews mordred: you want a release note for that?
20:38:51 wacuuu yyy question: are there any plans for sdk in go?
20:42:17 mordred wacuuu: the gophercloud project is basically that
20:42:22 mordred Shrews: nah
20:42:38 mordred wacuuu: https://github.com/gophercloud/gophercloud
20:47:37 Shrews oh that's interesting
20:47:55 Shrews mordred: my fav part: "Backwards-Compatibility Guarantees - None. Vendor it and write tests covering the parts you use."
20:49:22 wacuuu thanks
#openstack-sdks - 2018-07-04
02:09:42 openstackgerrit Fan Zhang proposed openstack/python-openstackclient master: Add --key-name and --key-unset option for server rebuild API. https://review.openstack.org/576422
03:00:32 openstackgerrit tianhui proposed openstack/python-openstackclient master: Compute:Support keypair set key-type https://review.openstack.org/577768
03:03:00 openstackgerrit tianhui proposed openstack/python-openstackclient master: Compute:Support keypair set key-type https://review.openstack.org/577768
07:57:49 openstackgerrit Josephine Seifert proposed openstack/openstacksdk master: Implement signature generation functionality https://review.openstack.org/580080
08:21:48 openstackgerrit Josephine Seifert proposed openstack/python-openstackclient master: [WIP] osc-included image signing (using openstacksdk) https://review.openstack.org/580086
10:21:45 openstackgerrit Mohammed Naser proposed openstack/python-openstackclient master: Allow setting volume attach status https://review.openstack.org/574719
11:17:06 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Use openstack.config for config and Session objects https://review.openstack.org/579139
12:05:06 dtantsur mordred: got it. this munch vs resource thing does give me a headache..
12:05:32 dtantsur also I realized that we probably need this redundant GET now: the microversion to do an action may depend on the current state
12:07:45 dtantsur mordred: also, how does self.assert_calls() order calls? it insist PUT is run the first, while I'm pretty sure GET happens ealier..
12:13:16 dtantsur never mind me. I might have been wrong from the beginning about this redundant GET
12:42:29 mordred dtantsur: yay, glad I could help
12:42:51 mordred dtantsur: (and yes, I will be VERY happy once we've rationalized Resource and shade/munch)
13:07:02 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: [WIP] set_provision_state and wait_for_provision_state for baremetal Node https://review.openstack.org/570895
13:07:07 dtantsur okay, this could use more unit tests, but is reviewable ^^^
13:09:21 dtantsur TheJulia: if you have a minute ^^^
13:14:55 openstackgerrit Dmitry Tantsur proposed openstack/openstacksdk master: [WIP] set_provision_state and wait_for_provision_state for baremetal Node https://review.openstack.org/570895
#openstack-sdks - 2018-07-05
09:37:26 frickler mordred: I'm still affected by the network SSL issue, maybe you or someone else can take a look and check whether they can at least reproduce to confirm I'm not doing something dumb https://storyboard.openstack.org/#!/story/1756723
13:30:47 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Update sphinx lower-constraint to match test-requirements https://review.openstack.org/580380
13:30:47 openstackgerrit Monty Taylor proposed openstack/osc-lib master: Use openstack.config for config and Session objects https://review.openstack.org/579139
14:00:47 mordred frickler: I'll look in to it - there is still a decent amount of unwinding we need to do
15:33:40 mordred dtroyer: woot! https://review.openstack.org/#/c/579139 passed tests

Earlier   Later