Monday, 2017-08-28

*** slaweq has joined #openstack-shade00:50
*** slaweq has quit IRC00:55
*** slaweq has joined #openstack-shade01:01
*** slaweq has quit IRC01:07
*** gkadam has joined #openstack-shade03:33
*** slaweq has joined #openstack-shade06:08
*** slaweq has quit IRC06:13
*** slaweq has joined #openstack-shade06:43
*** gkadam_ has joined #openstack-shade06:45
*** gkadam has quit IRC06:47
*** slaweq_ has joined #openstack-shade08:10
*** slaweq_ has quit IRC08:15
*** ioggstream has joined #openstack-shade08:17
*** slaweq_ has joined #openstack-shade09:11
*** slaweq_ has quit IRC09:16
*** slaweq_ has joined #openstack-shade10:12
*** slaweq_ has quit IRC10:17
*** jamielennox has quit IRC10:51
*** jamielennox has joined #openstack-shade10:52
*** slaweq_ has joined #openstack-shade11:13
*** slaweq_ has quit IRC11:18
*** ioggstream has quit IRC11:39
*** thrash|g0ne is now known as thrash11:49
*** slaweq_ has joined #openstack-shade12:14
*** slaweq_ has quit IRC12:20
*** gouthamr has quit IRC12:24
*** slaweq has quit IRC12:42
*** gouthamr has joined #openstack-shade12:45
*** slaweq has joined #openstack-shade12:45
*** thrash has quit IRC13:00
*** gkadam_ has quit IRC13:04
*** slaweq_ has joined #openstack-shade13:15
*** umbSublime has joined #openstack-shade13:18
umbSublimeif I don;t use project_name for my stack can I input a project_id in the cloud.yml file ??13:19
*** slaweq_ has quit IRC13:20
umbSublimewell a quick test confirmed I can for anyone else wondering13:22
*** thrash has joined #openstack-shade14:01
*** thrash has quit IRC14:01
*** thrash has joined #openstack-shade14:01
*** slaweq_ has joined #openstack-shade14:16
*** slaweq_ has quit IRC14:21
*** ioggstream has joined #openstack-shade14:32
*** slaweq_ has joined #openstack-shade15:17
*** slaweq_ has quit IRC15:22
*** thrash is now known as thrash|biab16:10
*** slaweq_ has joined #openstack-shade16:18
*** slaweq_ has quit IRC16:23
*** thrash|biab is now known as thrash16:59
*** ioggstream has quit IRC17:03
*** slaweq_ has joined #openstack-shade18:21
*** slaweq_ has quit IRC18:26
*** slaweq_ has joined #openstack-shade19:20
SamYaplemordred: /win 4421:02
SamYapleignore21:03
SamYaplemordred: im working on fixing the tests for https://review.openstack.org/#/c/496980/321:03
SamYapleis that how we want to proceed with the patch?21:03
SamYaplei dont see another way to do it without breaking how it may have been working in the past21:03
mordredSamYaple: I think it looks ok - quick question - what does the domain param do?21:17
mordreduser_domain, group_domain and project_domain all make sense - they help youfind those things by name21:18
SamYapleyou can grant a role to a user/group in a domain just like you would a project21:18
SamYapleuser==group, domain==project21:18
mordredgotcha. so passing domain is about telling it what to grant the role on21:18
SamYapleyes21:19
mordredk. SO - it seems like your patch can work without breaking people - since user, group and project should all accept name_or_id at the least, and the only way a person who was passing id would have worked was if they were passing by id, right?21:20
mordredso by adding those domain fields, you're essentially just adding filters for looking up user, group and project by name - so it seems like it should be additive21:20
mordred(I'm sure there's a detail in there somewhere - but on the surface it seems like a good change, pending test fixes, and one that should be not super compat-breaking)21:21
SamYapleif someone was passing (role_id, user_id, domain_name, project_name) and trying to grant the user a role in a project from 'domain_name' then they will now break21:21
SamYaplehaving to change domain to project_domain21:22
mordredah - before if a user passed project and domain it used domain as project_domain21:22
SamYapleyea21:22
SamYaplebut they would have to be passing a user object or user_id directly21:23
mordredSamYaple: it's ugly - but any reason you can't keep that? if project is passed use domain as a default value for the other domain fields?21:23
SamYapleotherwise it would break21:23
SamYaplehmmm21:23
*** gouthamr has quit IRC21:23
SamYaplewe would have to fail somehow if domain AND project are passed21:24
mordred"if domain and project: user_domain = user_domain or domain ; project_domain = project_domain or domain ; group_domain = group_domain or domain ; domain = None"21:24
SamYaplethe behaviour would still be different21:24
mordredbecause if you pass a value for project, you're saying that you want to grant a role on a project, so domain can be assumed to be a selector, not an assignment21:25
mordredand if you pass domain without project, you want to grant a role on a domain21:25
mordredyou could also sanely use domain as a default for user and group domain in the "if domain and not project" case, as the natural default would be to find the user and group that's in the domain you're granting on21:26
SamYaplei guess that is how it works today, and it wont break new behaviour21:26
SamYaplethe failure message might be a bit wierd for someone21:27
mordredoh, totally, I think it'll be a case where being extra verbose in the error message is important21:27
SamYaplelet me put something together and see if logic still works with that behaviour in mind21:27
mordred"you provided x, y and z and we can't figure out what the hell you were thinking"21:27
mordredcool21:27
SamYaplemaybe a small note about prefering the verbose *_domain arguments for logic-sake21:28
openstackgerritSam Yaple proposed openstack-infra/shade master: Allow domain_id for roles  https://review.openstack.org/49699221:39
openstackgerritSam Yaple proposed openstack-infra/shade master: Fix user role grants  https://review.openstack.org/49698021:39
SamYaplemordred: https://review.openstack.org/#/c/496980/4/shade/operatorcloud.py that logic *should* be correct. unless im missing some detail21:40
mordredSamYaple: yes - I think that looks right21:45
mordredSamYaple: I think it could be slightly further optimized by doing a get_domain in the initial if domain: block, setting user_domain and friends to the return of get_domain - and making sure that get_domain(dict(id='some-id')) does the "don't do a remote search if I was passed a dict" optimization21:47
mordredSamYaple: (I mention that because it might save you work in the unit test requests_mock - I otherwise think it could be a followup)21:47
mordredbut if it's less effort to do that now and poke less requests_mock entries in the eye, neat21:48
SamYaplemordred: yea i can make that work. also, https://review.openstack.org/#/c/498132/ <-- make get_domain work with dict(id='some-id')21:52
SamYaplei could do this work in _get_entity... but this seemed cleaner than having to lookup which function we are going to hand off too and setting up name args like that21:53
mordredSamYaple: yup. +3 on that22:00
*** slaweq_ has quit IRC22:11
*** slaweq_ has joined #openstack-shade22:12
*** slaweq_ has quit IRC22:17
*** slaweq_ has joined #openstack-shade22:43
*** slaweq_ has quit IRC22:47
*** olaph1 is now known as olaph22:52
openstackgerritSam Yaple proposed openstack-infra/shade master: Fix switched params  https://review.openstack.org/49813223:12
openstackgerritSam Yaple proposed openstack-infra/shade master: Fix user role grants  https://review.openstack.org/49698023:13
*** slaweq_ has joined #openstack-shade23:44
*** slaweq_ has quit IRC23:48
*** gouthamr has joined #openstack-shade23:54

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