Thursday, 2019-04-11

*** tbarron_ has quit IRC00:32
*** tobiash has quit IRC00:32
*** dasp has quit IRC00:32
*** timburke has quit IRC00:32
*** tobiash has joined #openstack-sdks00:33
*** dasp has joined #openstack-sdks00:33
*** timburke has joined #openstack-sdks00:34
*** bobh has joined #openstack-sdks01:22
*** cyberpear has quit IRC01:43
*** cyberpear has joined #openstack-sdks01:48
*** dave-mccowan has quit IRC02:01
*** bobh has quit IRC02:31
*** markvoelker has joined #openstack-sdks02:31
*** bobh has joined #openstack-sdks02:32
*** bobh has quit IRC02:36
*** markvoelker has quit IRC03:05
*** whoami-rajat has joined #openstack-sdks03:54
*** markvoelker has joined #openstack-sdks04:02
*** ricolin has joined #openstack-sdks04:10
*** bobh has joined #openstack-sdks04:30
*** bobh has quit IRC04:35
*** markvoelker has quit IRC04:36
*** holser_ has joined #openstack-sdks04:52
*** holser_ has quit IRC05:07
*** e0ne has joined #openstack-sdks05:28
*** markvoelker has joined #openstack-sdks05:33
*** holser_ has joined #openstack-sdks05:34
*** bobh has joined #openstack-sdks05:35
*** bobh has quit IRC05:39
*** Luzi has joined #openstack-sdks05:41
*** holser_ has quit IRC05:47
*** e0ne has quit IRC05:50
*** e0ne has joined #openstack-sdks05:51
*** dulek has quit IRC05:56
*** gouthamr has quit IRC05:56
*** gouthamr has joined #openstack-sdks06:00
*** dulek has joined #openstack-sdks06:05
*** markvoelker has quit IRC06:06
*** e0ne has quit IRC06:08
*** whoami-rajat has quit IRC06:13
*** whoami-rajat has joined #openstack-sdks06:25
*** holser_ has joined #openstack-sdks06:56
*** gtema has joined #openstack-sdks06:57
*** holser_ has quit IRC07:01
*** markvoelker has joined #openstack-sdks07:03
*** slaweq has joined #openstack-sdks07:03
*** holser_ has joined #openstack-sdks07:04
*** dayou_ has quit IRC07:07
*** bobh has joined #openstack-sdks07:14
*** jpich has joined #openstack-sdks07:16
*** bobh has quit IRC07:18
*** dayou_ has joined #openstack-sdks07:26
*** ITD27M01 has joined #openstack-sdks07:31
*** jpena|off is now known as jpena07:36
*** markvoelker has quit IRC07:36
*** tosky has joined #openstack-sdks07:39
*** ralonsoh has joined #openstack-sdks07:42
*** ralonsoh has quit IRC07:42
*** ralonsoh has joined #openstack-sdks07:43
*** e0ne has joined #openstack-sdks07:49
*** e0ne has quit IRC07:51
*** e0ne has joined #openstack-sdks07:56
*** ttsiouts has joined #openstack-sdks08:04
openstackgerritRico Lin proposed openstack/keystoneauth master: Update auth plugin name list in document  https://review.openstack.org/64892008:06
*** ttsiouts has quit IRC08:15
*** ttsiouts has joined #openstack-sdks08:16
*** ttsiouts has quit IRC08:20
*** ttsiouts has joined #openstack-sdks08:22
*** yolanda_ has joined #openstack-sdks08:29
*** markvoelker has joined #openstack-sdks08:34
*** dtantsur|afk is now known as dtantsur08:35
dtantsurdustinc: instance_id in the context of nova is the server ID08:35
dtantsura bare metal node is not divisible, so it cannot host several instances08:35
*** e0ne has quit IRC08:39
*** e0ne has joined #openstack-sdks08:48
*** cdent has joined #openstack-sdks09:00
*** markvoelker has quit IRC09:07
*** tbarron has joined #openstack-sdks09:21
*** e0ne has quit IRC09:26
*** e0ne has joined #openstack-sdks09:30
*** ttsiouts has quit IRC09:44
*** ttsiouts has joined #openstack-sdks09:44
*** ttsiouts has quit IRC09:49
*** bobh has joined #openstack-sdks09:56
*** bobh has quit IRC10:00
*** markvoelker has joined #openstack-sdks10:04
*** e0ne has quit IRC10:10
*** e0ne has joined #openstack-sdks10:15
cdentdtroyer: 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/200541110:29
*** markvoelker has quit IRC10:36
*** markvoelker has joined #openstack-sdks10:36
*** yolanda_ has quit IRC10:40
*** e0ne has quit IRC10:51
*** yolanda_ has joined #openstack-sdks10:52
*** jpena is now known as jpena|lunch10:56
*** e0ne has joined #openstack-sdks10:57
openstackgerritMerged openstack/openstacksdk master: Clarify error if no version can be found  https://review.openstack.org/64083510:57
pas-hacdent: 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
cdentpas-ha: placement has support for 'noauth2'10:59
cdentIf you [api]/auth_strategy with 'noauth2' then a query with a header like 'x-auth-token: admin' will do the expected11:00
cdentdoes that work?11:00
cdentpas-ha: oh I see what you're saying, you're responding to what I said above11:01
pas-hayes11:01
pas-haon how to test w/o keystone etc running11:01
cdentthe issue isn't with auth handling, it's with not wanting to run external processes11:01
pas-hao, ok11:01
cdentthe PlacementFixture makes it possible to run the placement app in process (and in memory)11:02
pas-habut then you are not testing the thing people will actually use11:02
cdentyes you are11:02
pas-hawhich is a CLI command11:02
cdentif you can pass args like I'm describing11:02
cdentin any case, the thing that is being tested is not whether openstack client can parse args11:03
cdentbut whether the plugin can generate the right args and process responses properly11:03
*** ttsiouts has joined #openstack-sdks11:13
*** e0ne has quit IRC11:17
dtroyercdent: 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
dtroyerbut 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 want11:31
dtroyerthat calls the shell object in-process   some of the magic is actually in osc-lib11:32
cdentdtroyer: 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
cdentlike, somewhere there is a top level main(args), and I want to call that11:35
cdentbut I suspect I can't...11:35
*** ricolin has quit IRC11:37
*** dave-mccowan has joined #openstack-sdks11:38
*** ttsiouts has quit IRC11:40
*** ttsiouts has joined #openstack-sdks11:40
openstackgerritTobias Rydberg proposed openstack/openstacksdk master: Removing region La1 from the list of regions.  https://review.openstack.org/65177011:59
*** ignatenkobrain has quit IRC12:11
dtroyercdent: 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
cdentthanks dtroyer . my first glance at the links you provided above gave me mego, so I wasn't too sure12:22
*** jpena|lunch is now known as jpena12:26
dtroyerand 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
dtroyeryou know, OSCAppFixture or something...12:27
*** ttsiouts has quit IRC12:50
*** ttsiouts has joined #openstack-sdks12:51
*** ttsiouts has quit IRC12:55
*** e0ne has joined #openstack-sdks12:56
*** ttsiouts has joined #openstack-sdks12:57
gtemamordred: 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
gtemaso there is no good way around of storing everything in the root of the Image13:08
*** jpich has quit IRC13:17
*** jpich has joined #openstack-sdks13:17
*** e0ne has quit IRC13:18
*** e0ne has joined #openstack-sdks13:27
*** ttsiouts has quit IRC13:35
mordredgtema: 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 go13:35
*** ttsiouts has joined #openstack-sdks13:35
*** ttsiouts has quit IRC13:36
*** ttsiouts has joined #openstack-sdks13:36
mordredin 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 payload13:37
mordredgtema: but that still might be crap of course13:52
*** ricolin has joined #openstack-sdks13:55
*** gkadam has joined #openstack-sdks14:02
*** gkadam has quit IRC14:03
*** Luzi has quit IRC14:24
*** e0ne has quit IRC14:27
*** e0ne has joined #openstack-sdks14:31
*** e0ne has quit IRC14:34
*** e0ne has joined #openstack-sdks14:41
*** bobh has joined #openstack-sdks14:44
*** e0ne has quit IRC14:48
*** e0ne has joined #openstack-sdks14:48
*** bobh has quit IRC14:49
*** bobh has joined #openstack-sdks14:50
cdentpas-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 IRC15:08
*** dhellmann has joined #openstack-sdks15:08
gtemamordred: yeah, this is also "crappy". I will try something similar to change with dynamic properties, but only local in Image15:10
mordredgtema: it's a hard problem with no *good* answers :)15:10
gtemaso basically in the image accept everything and create a "runtime" attribute out of it (strict string)15:11
*** e0ne has joined #openstack-sdks15:13
gtemamordred: btw I was a bit surprised with one your change where you turned off normalization (https://review.openstack.org/#/c/650903/)15:16
gtemado you intend to return simle Munches from the resource in the cloud layer? If yes I would definitely have much less problems with Image refactor15:17
mordredgtema: well, the idea there is to make the underlying Resource object have the correct data model15:17
gtemathat's good. But what about Image? Probably it will not work good here, or?15:17
mordredsince Resource is a subclass of dict, it can be used just the same15:18
mordredI'd like for us to get the Resource objects good enough to be able to do that15:18
mordredif we can15:18
gtemashould we then try it for Image?15:18
mordredI think so - yes - but this is where the hard problem you're working on comes in to play15:19
gtemayes, those dynamic things will be in the root then15:19
mordredbecause in the normalize/cloud layer, unknown server-side properties all get plopped into a general "properties" dict on the main dict15:19
mordredso if we move them to the root, it'll break cloud-layer users15:19
gtemaarghh15:20
mordred:)15:20
mordredit's good to start with the hardest examples - everything else will be easy after Image :)15:20
gtemaok, then somehow keeping such things really a "rest"15:20
gtemayeah. Ok, then I'm diving for next couple of days for next round with Image :D15:21
mordredI believe you can defeat it!15:21
gtemasure, will take some time though15:21
dtroyercdent, 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
cdentah dtroyer, yeah, if that works that would be much better15:29
* cdent tries it15:29
dtroyerthe more correct way of course is a null ath plugin, I have to re-constitute how to so that in my head15:29
dtroyerthe above options fall over when the particular command needs to see a service catalog for other reasons…15:31
cdentyeah, in my case a service catalog ought to be unnecessary15:31
dtroyerI was hoping that to be the case15:32
*** e0ne has quit IRC15:32
* cdent creeps slower closer15:37
cdentdtroyer: --os-token and --os-url gets me a bit closer, thank you15:38
cdentnew 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
edleafeOne thing you can't flush away easily: the API-SIG Office Hour!16:00
elmikolol16:00
dtroyercdent: I _think_ all state is ultimately held by the cliff App object, or decendant, so here the Shell object.  need to verify16:00
edleafe<sfx> trumpets playing </sfx>16:00
dtroyercdent: you are causing me to retrieve information from 3rd level offline storage… :)16:00
cdentthanks 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 trace16:01
dtroyeryeah, it is messy for sure.16:01
cdentIf I can get past this hump I think I'm there16:04
cdent<- famouslastwords16:04
edleafecdent: I was just thinking the same thing16:05
elmikolol16:08
dtroyerSo, 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
dtroyeroh, wrong above, s/CommandManager/ClientManager/16:11
cdentdtroyer: 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 instead16:12
dtroyerok, 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 work16:13
* cdent nods16:13
* cdent fires up the debugger16:13
dtroyerit 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.py16:19
cdenthmmm16:23
*** zbr has quit IRC16:34
*** jpich has quit IRC16:37
*** dave-mccowan has quit IRC16:39
*** zbr has joined #openstack-sdks16:41
*** ricolin has quit IRC16:44
*** ttsiouts has quit IRC16:44
*** ttsiouts has joined #openstack-sdks16:45
*** ttsiouts has quit IRC16:50
*** dtantsur is now known as dtantsur|afk16:50
elmikotake care edleafe dtantsur|afk o/17:01
edleafelater dude17:01
*** gtema has quit IRC17:04
*** jpena is now known as jpena|off17:10
cdentdtroyer: for reference, this seems to get me what I want: http://paste.openstack.org/show/749206/17:26
cdentbut only maybe, now on to the next thing :)17:26
cdentdamn, actually, maye not17:27
cdentit was a ruse!17:27
*** ralonsoh has quit IRC17:56
*** bobh has quit IRC17:58
*** bobh has joined #openstack-sdks18:03
openstackgerritMerged openstack/openstacksdk master: Removing region La1 from the list of regions.  https://review.openstack.org/65177018:07
*** bobh has quit IRC18:13
*** gmann is now known as gmann_afk18:15
*** bobh has joined #openstack-sdks18:16
dtroyercdent: 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
cdentdtroyer: yeah. I'm struggling to untangel that18:26
*** tosky has quit IRC18:26
dtroyerfortunately that is OSC code, not osc-lib or cliff, so theoretically you can do the right thing there with your version of that code18:26
dtroyerreally 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 fakes18:27
cdentwhat i've done so far is just hack ClientCache to always return a new instance18:27
cdentjust to get me on to some other errors18:27
dtroyerthat would work too18:27
dtroyeror even eliminate it and just make a new instance there directly18:27
dtroyerthe reason for the cache is to reduce module loading18:27
cdentI'll need to come back round and clean that out and put a different client in palce18:27
cdentbut I keep falling in rabbit holes :)18:28
dtroyeraround here thats like stumbling into a prairie dog town… ankle-breaking city18:28
dtroyerholes everywhere18:28
*** holser_ has quit IRC18:29
*** holser_ has joined #openstack-sdks19:09
openstackgerritMerged openstack/keystoneauth master: Update auth plugin name list in document  https://review.openstack.org/64892019:09
*** e0ne has joined #openstack-sdks19:11
*** gmann_afk is now known as gmann19:27
*** e0ne has quit IRC19:31
*** holser_ has quit IRC20:29
*** holser_ has joined #openstack-sdks20:44
*** whoami-rajat has quit IRC21:03
*** slaweq has quit IRC21:20
*** tosky has joined #openstack-sdks21:29
*** slaweq has joined #openstack-sdks21:37
*** slaweq has quit IRC21:50
*** holser_ has quit IRC21:53
cdentdtroyer: finally got it by doing a mock/monkeypath of __get__ on ClientCache. Is the least invasive option.22:02
*** bobh has quit IRC22:10
*** tosky has quit IRC22:15
*** slaweq has joined #openstack-sdks22:16
*** slaweq has quit IRC22:40
*** cdent has quit IRC23:05
*** cyberpear has quit IRC23:06
*** markvoelker has quit IRC23:21
*** tobiash has quit IRC23:21
*** dasp has quit IRC23:21
*** tbarron has quit IRC23:21
*** aspiers has quit IRC23:21
*** corvus has quit IRC23:21
*** markvoelker has joined #openstack-sdks23:27
*** tbarron has joined #openstack-sdks23:27
*** dasp has joined #openstack-sdks23:27
*** tobiash has joined #openstack-sdks23:27
*** aspiers has joined #openstack-sdks23:27
*** corvus has joined #openstack-sdks23:27
*** cyberpear has joined #openstack-sdks23:53
*** markvoelker has quit IRC23:59

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!