*** tbarron_ has quit IRC | 00:32 | |
*** tobiash has quit IRC | 00:32 | |
*** dasp has quit IRC | 00:32 | |
*** timburke has quit IRC | 00:32 | |
*** tobiash has joined #openstack-sdks | 00:33 | |
*** dasp has joined #openstack-sdks | 00:33 | |
*** timburke has joined #openstack-sdks | 00:34 | |
*** bobh has joined #openstack-sdks | 01:22 | |
*** cyberpear has quit IRC | 01:43 | |
*** cyberpear has joined #openstack-sdks | 01:48 | |
*** dave-mccowan has quit IRC | 02:01 | |
*** bobh has quit IRC | 02:31 | |
*** markvoelker has joined #openstack-sdks | 02:31 | |
*** bobh has joined #openstack-sdks | 02:32 | |
*** bobh has quit IRC | 02:36 | |
*** markvoelker has quit IRC | 03:05 | |
*** whoami-rajat has joined #openstack-sdks | 03:54 | |
*** markvoelker has joined #openstack-sdks | 04:02 | |
*** ricolin has joined #openstack-sdks | 04:10 | |
*** bobh has joined #openstack-sdks | 04:30 | |
*** bobh has quit IRC | 04:35 | |
*** markvoelker has quit IRC | 04:36 | |
*** holser_ has joined #openstack-sdks | 04:52 | |
*** holser_ has quit IRC | 05:07 | |
*** e0ne has joined #openstack-sdks | 05:28 | |
*** markvoelker has joined #openstack-sdks | 05:33 | |
*** holser_ has joined #openstack-sdks | 05:34 | |
*** bobh has joined #openstack-sdks | 05:35 | |
*** bobh has quit IRC | 05:39 | |
*** Luzi has joined #openstack-sdks | 05:41 | |
*** holser_ has quit IRC | 05:47 | |
*** e0ne has quit IRC | 05:50 | |
*** e0ne has joined #openstack-sdks | 05:51 | |
*** dulek has quit IRC | 05:56 | |
*** gouthamr has quit IRC | 05:56 | |
*** gouthamr has joined #openstack-sdks | 06:00 | |
*** dulek has joined #openstack-sdks | 06:05 | |
*** markvoelker has quit IRC | 06:06 | |
*** e0ne has quit IRC | 06:08 | |
*** whoami-rajat has quit IRC | 06:13 | |
*** whoami-rajat has joined #openstack-sdks | 06:25 | |
*** holser_ has joined #openstack-sdks | 06:56 | |
*** gtema has joined #openstack-sdks | 06:57 | |
*** holser_ has quit IRC | 07:01 | |
*** markvoelker has joined #openstack-sdks | 07:03 | |
*** slaweq has joined #openstack-sdks | 07:03 | |
*** holser_ has joined #openstack-sdks | 07:04 | |
*** dayou_ has quit IRC | 07:07 | |
*** bobh has joined #openstack-sdks | 07:14 | |
*** jpich has joined #openstack-sdks | 07:16 | |
*** bobh has quit IRC | 07:18 | |
*** dayou_ has joined #openstack-sdks | 07:26 | |
*** ITD27M01 has joined #openstack-sdks | 07:31 | |
*** jpena|off is now known as jpena | 07:36 | |
*** markvoelker has quit IRC | 07:36 | |
*** tosky has joined #openstack-sdks | 07:39 | |
*** ralonsoh has joined #openstack-sdks | 07:42 | |
*** ralonsoh has quit IRC | 07:42 | |
*** ralonsoh has joined #openstack-sdks | 07:43 | |
*** e0ne has joined #openstack-sdks | 07:49 | |
*** e0ne has quit IRC | 07:51 | |
*** e0ne has joined #openstack-sdks | 07:56 | |
*** ttsiouts has joined #openstack-sdks | 08:04 | |
openstackgerrit | Rico Lin proposed openstack/keystoneauth master: Update auth plugin name list in document https://review.openstack.org/648920 | 08:06 |
---|---|---|
*** ttsiouts has quit IRC | 08:15 | |
*** ttsiouts has joined #openstack-sdks | 08:16 | |
*** ttsiouts has quit IRC | 08:20 | |
*** ttsiouts has joined #openstack-sdks | 08:22 | |
*** yolanda_ has joined #openstack-sdks | 08:29 | |
*** markvoelker has joined #openstack-sdks | 08:34 | |
*** dtantsur|afk is now known as dtantsur | 08:35 | |
dtantsur | dustinc: instance_id in the context of nova is the server ID | 08:35 |
dtantsur | a bare metal node is not divisible, so it cannot host several instances | 08:35 |
*** e0ne has quit IRC | 08:39 | |
*** e0ne has joined #openstack-sdks | 08:48 | |
*** cdent has joined #openstack-sdks | 09:00 | |
*** markvoelker has quit IRC | 09:07 | |
*** tbarron has joined #openstack-sdks | 09:21 | |
*** e0ne has quit IRC | 09:26 | |
*** e0ne has joined #openstack-sdks | 09:30 | |
*** ttsiouts has quit IRC | 09:44 | |
*** ttsiouts has joined #openstack-sdks | 09:44 | |
*** ttsiouts has quit IRC | 09:49 | |
*** bobh has joined #openstack-sdks | 09:56 | |
*** bobh has quit IRC | 10:00 | |
*** markvoelker has joined #openstack-sdks | 10:04 | |
*** e0ne has quit IRC | 10:10 | |
*** e0ne has joined #openstack-sdks | 10:15 | |
cdent | dtroyer: with luck you are still sleeping, but when you come back to this world, you can probably help me: I want to make some tests of osc by passing a full suite of what would be the args to some entry point. Related to this: https://storyboard.openstack.org/#!/story/2005411 | 10:29 |
*** markvoelker has quit IRC | 10:36 | |
*** markvoelker has joined #openstack-sdks | 10:36 | |
*** yolanda_ has quit IRC | 10:40 | |
*** e0ne has quit IRC | 10:51 | |
*** yolanda_ has joined #openstack-sdks | 10:52 | |
*** jpena is now known as jpena|lunch | 10:56 | |
*** e0ne has joined #openstack-sdks | 10:57 | |
openstackgerrit | Merged openstack/openstacksdk master: Clarify error if no version can be found https://review.openstack.org/640835 | 10:57 |
pas-ha | cdent: can you add a noauth mode to placement? (might be useful any way) and then call openstackclient with 'noauth' auth plugin (should need just an endpoint) | 10:59 |
cdent | pas-ha: placement has support for 'noauth2' | 10:59 |
cdent | If you [api]/auth_strategy with 'noauth2' then a query with a header like 'x-auth-token: admin' will do the expected | 11:00 |
cdent | does that work? | 11:00 |
cdent | pas-ha: oh I see what you're saying, you're responding to what I said above | 11:01 |
pas-ha | yes | 11:01 |
pas-ha | on how to test w/o keystone etc running | 11:01 |
cdent | the issue isn't with auth handling, it's with not wanting to run external processes | 11:01 |
pas-ha | o, ok | 11:01 |
cdent | the PlacementFixture makes it possible to run the placement app in process (and in memory) | 11:02 |
pas-ha | but then you are not testing the thing people will actually use | 11:02 |
cdent | yes you are | 11:02 |
pas-ha | which is a CLI command | 11:02 |
cdent | if you can pass args like I'm describing | 11:02 |
cdent | in any case, the thing that is being tested is not whether openstack client can parse args | 11:03 |
cdent | but whether the plugin can generate the right args and process responses properly | 11:03 |
*** ttsiouts has joined #openstack-sdks | 11:13 | |
*** e0ne has quit IRC | 11:17 | |
dtroyer | cdent: if my barely-awake brain is parsing that story, the OSC functional test may not be quite be what you are looking for: https://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/tests/functional/base.py#L29 still uses subprocess. | 11:31 |
dtroyer | but the unit tests in https://opendev.org/openstack/python-openstackclient/src/branch/master/openstackclient/tests/unit/test_shell.py may be closer to what you want | 11:31 |
dtroyer | that calls the shell object in-process some of the magic is actually in osc-lib | 11:32 |
cdent | dtroyer: I think what I'm after is awareness of the method that receives some form of sys.argv, but based on what you are saying it sounds like that might be obscured under "stuff" | 11:34 |
cdent | like, somewhere there is a top level main(args), and I want to call that | 11:35 |
cdent | but I suspect I can't... | 11:35 |
*** ricolin has quit IRC | 11:37 | |
*** dave-mccowan has joined #openstack-sdks | 11:38 | |
*** ttsiouts has quit IRC | 11:40 | |
*** ttsiouts has joined #openstack-sdks | 11:40 | |
openstackgerrit | Tobias Rydberg proposed openstack/openstacksdk master: Removing region La1 from the list of regions. https://review.openstack.org/651770 | 11:59 |
*** ignatenkobrain has quit IRC | 12:11 | |
dtroyer | cdent: you can, it is in there, I thought the functional tests worked that way until I looked… but the unit test_shell bits do exactly that, but have the back-end mocked out. I've got a meeting at the top of the hour, I'll try to suss out a simple example after that... | 12:21 |
cdent | thanks dtroyer . my first glance at the links you provided above gave me mego, so I wasn't too sure | 12:22 |
*** jpena|lunch is now known as jpena | 12:26 | |
dtroyer | and after thinking about it a bit, it may be just as straightforward to write a new top-level cliff app.App that just calls your command handlers directly, unless you need the shell parsing for some reason… | 12:26 |
dtroyer | you know, OSCAppFixture or something... | 12:27 |
*** ttsiouts has quit IRC | 12:50 | |
*** ttsiouts has joined #openstack-sdks | 12:51 | |
*** ttsiouts has quit IRC | 12:55 | |
*** e0ne has joined #openstack-sdks | 12:56 | |
*** ttsiouts has joined #openstack-sdks | 12:57 | |
gtema | mordred: I have a problem with setting "unknown" properties under "properties" in the image service. By default only string values are accepted (no dict) | 13:07 |
gtema | so there is no good way around of storing everything in the root of the Image | 13:08 |
*** jpich has quit IRC | 13:17 | |
*** jpich has joined #openstack-sdks | 13:17 | |
*** e0ne has quit IRC | 13:18 | |
*** e0ne has joined #openstack-sdks | 13:27 | |
*** ttsiouts has quit IRC | 13:35 | |
mordred | gtema: oh - I didn't mean setting unknown properties under properties remotely ... I meant making 'properties' on the Resource object be where unknown key/values in the root of the resource go | 13:35 |
*** ttsiouts has joined #openstack-sdks | 13:35 | |
*** ttsiouts has quit IRC | 13:36 | |
*** ttsiouts has joined #openstack-sdks | 13:36 | |
mordred | in the case of Image, if someone did i = Image(id) ; i.properties['foo'] = 'bar' ; i.commit() then we'd pull the things out of properties and submit them remotely as part of the body payload | 13:37 |
mordred | gtema: but that still might be crap of course | 13:52 |
*** ricolin has joined #openstack-sdks | 13:55 | |
*** gkadam has joined #openstack-sdks | 14:02 | |
*** gkadam has quit IRC | 14:03 | |
*** Luzi has quit IRC | 14:24 | |
*** e0ne has quit IRC | 14:27 | |
*** e0ne has joined #openstack-sdks | 14:31 | |
*** e0ne has quit IRC | 14:34 | |
*** e0ne has joined #openstack-sdks | 14:41 | |
*** bobh has joined #openstack-sdks | 14:44 | |
*** e0ne has quit IRC | 14:48 | |
*** e0ne has joined #openstack-sdks | 14:48 | |
*** bobh has quit IRC | 14:49 | |
*** bobh has joined #openstack-sdks | 14:50 | |
cdent | pas-ha, dtroyer : I seem to be making some progress (i'm access shell.main() with my own args) but I'm encountering some difficulties with trying to make use of noauth from those args. Can you give me an example of how a normal command line, using noauth, would be constructed? | 14:54 |
*** e0ne has quit IRC | 15:08 | |
*** dhellmann has joined #openstack-sdks | 15:08 | |
gtema | mordred: yeah, this is also "crappy". I will try something similar to change with dynamic properties, but only local in Image | 15:10 |
mordred | gtema: it's a hard problem with no *good* answers :) | 15:10 |
gtema | so basically in the image accept everything and create a "runtime" attribute out of it (strict string) | 15:11 |
*** e0ne has joined #openstack-sdks | 15:13 | |
gtema | mordred: btw I was a bit surprised with one your change where you turned off normalization (https://review.openstack.org/#/c/650903/) | 15:16 |
gtema | do you intend to return simle Munches from the resource in the cloud layer? If yes I would definitely have much less problems with Image refactor | 15:17 |
mordred | gtema: well, the idea there is to make the underlying Resource object have the correct data model | 15:17 |
gtema | that's good. But what about Image? Probably it will not work good here, or? | 15:17 |
mordred | since Resource is a subclass of dict, it can be used just the same | 15:18 |
mordred | I'd like for us to get the Resource objects good enough to be able to do that | 15:18 |
mordred | if we can | 15:18 |
gtema | should we then try it for Image? | 15:18 |
mordred | I think so - yes - but this is where the hard problem you're working on comes in to play | 15:19 |
gtema | yes, those dynamic things will be in the root then | 15:19 |
mordred | because in the normalize/cloud layer, unknown server-side properties all get plopped into a general "properties" dict on the main dict | 15:19 |
mordred | so if we move them to the root, it'll break cloud-layer users | 15:19 |
gtema | arghh | 15:20 |
mordred | :) | 15:20 |
mordred | it's good to start with the hardest examples - everything else will be easy after Image :) | 15:20 |
gtema | ok, then somehow keeping such things really a "rest" | 15:20 |
gtema | yeah. Ok, then I'm diving for next couple of days for next round with Image :D | 15:21 |
mordred | I believe you can defeat it! | 15:21 |
gtema | sure, will take some time though | 15:21 |
dtroyer | cdent, you may be able to just bypass all of that using —os-token (with whatever your fixture wants to find in x-auth-token:) and —os-url (with placement endpoint) | 15:29 |
cdent | ah dtroyer, yeah, if that works that would be much better | 15:29 |
* cdent tries it | 15:29 | |
dtroyer | the more correct way of course is a null ath plugin, I have to re-constitute how to so that in my head | 15:29 |
dtroyer | the above options fall over when the particular command needs to see a service catalog for other reasons… | 15:31 |
cdent | yeah, in my case a service catalog ought to be unnecessary | 15:31 |
dtroyer | I was hoping that to be the case | 15:32 |
*** e0ne has quit IRC | 15:32 | |
* cdent creeps slower closer | 15:37 | |
cdent | dtroyer: --os-token and --os-url gets me a bit closer, thank you | 15:38 |
cdent | new question dtroyer: in the same process I'm using different os-url (they are dynamically created) with each call, but a second request is using the first url when trying to make an http connection. Presumably there's a cached sesssion or similar somewhere. Can I flush that easily? | 15:57 |
edleafe | One thing you can't flush away easily: the API-SIG Office Hour! | 16:00 |
elmiko | lol | 16:00 |
dtroyer | cdent: I _think_ all state is ultimately held by the cliff App object, or decendant, so here the Shell object. need to verify | 16:00 |
edleafe | <sfx> trumpets playing </sfx> | 16:00 |
dtroyer | cdent: you are causing me to retrieve information from 3rd level offline storage… :) | 16:00 |
cdent | thanks dtroyer. sorry for so many question, part of it is that there are at least 6 packags involved in making an eventual request, it seems, and I'm not sure where to look or trace | 16:01 |
dtroyer | yeah, it is messy for sure. | 16:01 |
cdent | If I can get past this hump I think I'm there | 16:04 |
cdent | <- famouslastwords | 16:04 |
edleafe | cdent: I was just thinking the same thing | 16:05 |
elmiko | lol | 16:08 |
dtroyer | So, cliff.app.App (therefore OpenStackShell) owns a CommandManager instance which in turn owns all of the client objects and sdk objects that contain Session/Adapters, so each combination of —os-url/—os-token could have its own OpenStackShell safely. Now that I write that I think your real need is to just be able to change —os-url properly, right? | 16:09 |
dtroyer | oh, wrong above, s/CommandManager/ClientManager/ | 16:11 |
cdent | dtroyer: as far as I can tell I'm creating a new OpenStackShell for each test and in each test I'm using a different --os-url. However, in a second test that --os-url, though present in the args, is not the thing to which an http connection is made. the value of the previous --os-url is used instead | 16:12 |
dtroyer | ok, then something is being passed by reference as it were… I don't think I've ever tried that althought I would have expected it to work | 16:13 |
* cdent nods | 16:13 | |
* cdent fires up the debugger | 16:13 | |
dtroyer | it may be how we store the actual client objects in ClientManager. They are created through a descriptor and may not be re-created as expected… https://opendev.org/openstack/osc-lib/src/branch/master/osc_lib/clientmanager.py | 16:19 |
cdent | hmmm | 16:23 |
*** zbr has quit IRC | 16:34 | |
*** jpich has quit IRC | 16:37 | |
*** dave-mccowan has quit IRC | 16:39 | |
*** zbr has joined #openstack-sdks | 16:41 | |
*** ricolin has quit IRC | 16:44 | |
*** ttsiouts has quit IRC | 16:44 | |
*** ttsiouts has joined #openstack-sdks | 16:45 | |
*** ttsiouts has quit IRC | 16:50 | |
*** dtantsur is now known as dtantsur|afk | 16:50 | |
elmiko | take care edleafe dtantsur|afk o/ | 17:01 |
edleafe | later dude | 17:01 |
*** gtema has quit IRC | 17:04 | |
*** jpena is now known as jpena|off | 17:10 | |
cdent | dtroyer: for reference, this seems to get me what I want: http://paste.openstack.org/show/749206/ | 17:26 |
cdent | but only maybe, now on to the next thing :) | 17:26 |
cdent | damn, actually, maye not | 17:27 |
cdent | it was a ruse! | 17:27 |
*** ralonsoh has quit IRC | 17:56 | |
*** bobh has quit IRC | 17:58 | |
*** bobh has joined #openstack-sdks | 18:03 | |
openstackgerrit | Merged openstack/openstacksdk master: Removing region La1 from the list of regions. https://review.openstack.org/651770 | 18:07 |
*** bobh has quit IRC | 18:13 | |
*** gmann is now known as gmann_afk | 18:15 | |
*** bobh has joined #openstack-sdks | 18:16 | |
dtroyer | cdent: and ok, I see where we have the globals… that descriptor is set in the class not in the instance. client.ClientManager gets the return from ClientCache, but it is a class var not an instance var. doh! | 18:25 |
cdent | dtroyer: yeah. I'm struggling to untangel that | 18:26 |
*** tosky has quit IRC | 18:26 | |
dtroyer | fortunately that is OSC code, not osc-lib or cliff, so theoretically you can do the right thing there with your version of that code | 18:26 |
dtroyer | really all you need is a ClientManager to hang your placement client object on, if even that. Our unit tests call the command handlers directly with the help of a few fakes | 18:27 |
cdent | what i've done so far is just hack ClientCache to always return a new instance | 18:27 |
cdent | just to get me on to some other errors | 18:27 |
dtroyer | that would work too | 18:27 |
dtroyer | or even eliminate it and just make a new instance there directly | 18:27 |
dtroyer | the reason for the cache is to reduce module loading | 18:27 |
cdent | I'll need to come back round and clean that out and put a different client in palce | 18:27 |
cdent | but I keep falling in rabbit holes :) | 18:28 |
dtroyer | around here thats like stumbling into a prairie dog town… ankle-breaking city | 18:28 |
dtroyer | holes everywhere | 18:28 |
*** holser_ has quit IRC | 18:29 | |
*** holser_ has joined #openstack-sdks | 19:09 | |
openstackgerrit | Merged openstack/keystoneauth master: Update auth plugin name list in document https://review.openstack.org/648920 | 19:09 |
*** e0ne has joined #openstack-sdks | 19:11 | |
*** gmann_afk is now known as gmann | 19:27 | |
*** e0ne has quit IRC | 19:31 | |
*** holser_ has quit IRC | 20:29 | |
*** holser_ has joined #openstack-sdks | 20:44 | |
*** whoami-rajat has quit IRC | 21:03 | |
*** slaweq has quit IRC | 21:20 | |
*** tosky has joined #openstack-sdks | 21:29 | |
*** slaweq has joined #openstack-sdks | 21:37 | |
*** slaweq has quit IRC | 21:50 | |
*** holser_ has quit IRC | 21:53 | |
cdent | dtroyer: finally got it by doing a mock/monkeypath of __get__ on ClientCache. Is the least invasive option. | 22:02 |
*** bobh has quit IRC | 22:10 | |
*** tosky has quit IRC | 22:15 | |
*** slaweq has joined #openstack-sdks | 22:16 | |
*** slaweq has quit IRC | 22:40 | |
*** cdent has quit IRC | 23:05 | |
*** cyberpear has quit IRC | 23:06 | |
*** markvoelker has quit IRC | 23:21 | |
*** tobiash has quit IRC | 23:21 | |
*** dasp has quit IRC | 23:21 | |
*** tbarron has quit IRC | 23:21 | |
*** aspiers has quit IRC | 23:21 | |
*** corvus has quit IRC | 23:21 | |
*** markvoelker has joined #openstack-sdks | 23:27 | |
*** tbarron has joined #openstack-sdks | 23:27 | |
*** dasp has joined #openstack-sdks | 23:27 | |
*** tobiash has joined #openstack-sdks | 23:27 | |
*** aspiers has joined #openstack-sdks | 23:27 | |
*** corvus has joined #openstack-sdks | 23:27 | |
*** cyberpear has joined #openstack-sdks | 23:53 | |
*** markvoelker has quit IRC | 23:59 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!