Thursday, 2014-04-10

*** wchrisj has joined #openstack-sdks00:11
*** mhagedorn has quit IRC00:16
*** mhagedorn has joined #openstack-sdks00:18
*** mhagedorn has quit IRC00:43
*** WhatTheFoley has quit IRC00:43
*** mhagedorn has joined #openstack-sdks00:44
*** wchrisj has quit IRC01:08
*** jdag____ has joined #openstack-sdks01:19
*** mordred has quit IRC01:23
*** jamielennox has quit IRC01:23
*** bknudson has quit IRC01:23
*** elight has quit IRC01:23
*** jdag___ has quit IRC01:23
*** jdag____ is now known as jdag___01:23
*** mordred has joined #openstack-sdks01:24
*** elight has joined #openstack-sdks01:24
*** jamielennox has joined #openstack-sdks01:24
*** bknudson has joined #openstack-sdks01:25
*** krames has joined #openstack-sdks02:36
*** mhagedorn has quit IRC02:43
*** mhagedorn_ has joined #openstack-sdks02:43
*** wchrisj has joined #openstack-sdks02:58
*** wchrisj has quit IRC03:02
*** mhagedorn_ has quit IRC03:13
*** mhagedorn has joined #openstack-sdks03:14
*** krames has quit IRC03:35
*** wchrisj has joined #openstack-sdks03:42
*** wchrisj has quit IRC03:46
*** wchrisj has joined #openstack-sdks03:51
*** wchrisj has quit IRC04:06
*** wchrisj has joined #openstack-sdks04:29
*** wchrisj has quit IRC04:57
*** jamielennox is now known as jamielennox|away06:24
*** jamie_h has joined #openstack-sdks07:56
*** samchoi has quit IRC09:19
*** jamie_h has quit IRC12:13
*** jamie_h has joined #openstack-sdks12:37
*** mfer has joined #openstack-sdks13:04
*** krames has joined #openstack-sdks13:07
*** krames has quit IRC13:08
*** krames has joined #openstack-sdks13:08
*** terry_howe has joined #openstack-sdks13:25
*** wchrisj has joined #openstack-sdks13:34
*** wchrisj has quit IRC13:41
*** wchrisj has joined #openstack-sdks13:44
*** wchrisj has quit IRC13:46
*** wchrisj has joined #openstack-sdks14:27
*** etoews has joined #openstack-sdks14:37
*** jdag___ is now known as jdag14:57
mferanyone know what time the design summit stuff ends on Friday of the atlanta summit?15:33
mferdtroyer, mordred  or anyone else with experience ^^15:33
*** wchrisj has quit IRC15:37
mordredmfer: by late afternoon Friday I usually want to die15:38
mordredmfer: but it typically is a full day15:38
mfermordred so, it's useful to book flights out at night?15:38
mferi'm usually done with these kinds of things by Friday morning. No more ability to be really useful15:39
*** wchrisj has joined #openstack-sdks15:41
mordredmfer: yup. I think I'm leaving Saturday IIRC15:42
mferthanks15:42
glencmfer my flight out is at 3PM, so hopefully there's nothing interesting after that :)15:46
dtroyermfer: it is a full day, and my sessions are the last two… ;)15:55
dtroyerdevstack, that is, so youse guys probably don't care15:56
mferdtroyer you know yours are at the end of the day on Friday already?16:00
dtroyeronly the tracks have been assigned so far and I only have two for devstack16:01
dtroyernone of the cross-platform or anything like that is determined yet16:01
*** wchrisj has quit IRC16:03
*** wchrisj has joined #openstack-sdks16:08
mferok16:09
*** mhagedorn has quit IRC16:27
*** mhagedorn has joined #openstack-sdks16:27
*** mhagedorn_ has joined #openstack-sdks16:48
*** mhagedorn has quit IRC16:50
*** mhagedorn_ is now known as mhagedorn16:50
*** mhagedorn has quit IRC17:03
*** mhagedorn has joined #openstack-sdks17:03
*** wchrisj has quit IRC17:06
*** mhagedorn has quit IRC17:26
*** mhagedorn has joined #openstack-sdks17:27
*** WhatTheFoley has joined #openstack-sdks17:29
WhatTheFoleyhttps://review.openstack.org/86657 if anybody wants to look at .NET stuff...17:30
*** etoews has quit IRC17:40
elightmhagedorn: Are you having any luck with hptng inheriting from OSC tng?17:41
elightmhagedorn: I believe I see what the problem is with composition17:42
elightmhagedorn: The composing class (HP::Identity::Real) needs to advertise it’s collections/requests/mocked_requests but ALSO those of the OSC::Identity::Real it is composing17:42
*** wchrisj has joined #openstack-sdks17:42
elightmhagedorn: Inheritance may solve for this17:42
mhagedornelight… a bit of luck.. got requests collection working I think17:43
mhagedornwill know by COB17:43
elightk17:43
elightStill working on composition here to see if it can be done and what it would look like17:43
mhagedornhowever it means I have to know about @required from Service… that is a HUGE ick17:43
elighthttp://dl.dropboxusercontent.com/u/379705/images/what.gif17:43
mhagedorntalk about close coupling17:43
mhagedornI will put up a gist when I get it all working17:44
mhagedornharder to explain than to show17:44
mhagedornnot saying I love it though17:44
mhagedornfeels code smellish17:44
mhagedorn@required is the the way I am using to know that the hierarchy above me is all built correctly… basically.17:45
*** etoews has joined #openstack-sdks17:57
elightI think I liked it better when we had DI’able Authenticators. :-(18:19
elightmhagedorn: Looking at your compositional PR, I don’t see how it’s creating a Fog::HpTng::IdentityVx::Real18:28
elightmhagedorn: https://github.com/fog-openstack-tng/fog_hp_tng/blob/feature/inheritance/lib/fog/hptng/identity.rb#L13-L15 calls OSC which should then be creating an Fog::OSC::Identity….18:29
mhagedornelight, its not.  I gave up on it.18:46
mhagedornelight. when I tried to create an instance of OSC::Identity it immediatelly tried to auth using the form of the OSC requests.  Not acceptabl18:47
mhagedornbecuase extention layers have to be able to control the requests form, just like the OSC::Identity class does18:47
mhagedornelight, when you guys changed the underlying layer and switched to using real requests for like, create_token18:48
mhagedornthat took away the ability to customize at extention layers18:48
mhagedornthats when I realized that composition was problematic at best18:48
mhagedornthe minute you #new up an instance of OSC::Identy, there is an auth attempt, and that attempt happens with OSC requests.  Bad (in this case)18:49
elightmhagedorn: Which was why we were talking about injectable Authenticators19:00
mhagedornyeah19:00
mhagedornits a bit of a wash ‘cause I kind of like having each provider provider their own request files.....19:00
elightBut once you get past that, I think you’re still fighting Fog to expose the composed class’ requests/collections19:00
elightI *think* I know how to work around that but I hate it.19:01
mhagedornyeah…. working on a fix for that19:01
mhagedornbut I hate it19:01
elightheh19:01
mhagedornIf I can get this working, at least we will have something to throw darts at....19:02
*** jamie_h has quit IRC19:03
mhagedorn(and rolling up the requests seems to work… models in process)19:03
mhagedorn(but it only goes one layer up, which is probably as problematic as the original code)19:03
elightTemplateMethod pattern makes Evan sad.19:24
elightGetting there though...19:24
mhagedornelight :)19:31
mhagedornthis part of this effort is likely making everyone sad.  “how to make Fog do something it wasnt designed to do”19:31
elightAt least I didn’t say it this time. ;-)19:33
*** mhagedorn has quit IRC19:37
*** mhagedorn has joined #openstack-sdks19:37
*** etoews has quit IRC19:39
elightOh my. I should not have looked inside excon’s /lib. I knew this would hurt.19:40
*** etoews has joined #openstack-sdks19:40
elighthttps://github.com/geemus/excon/blob/master/lib/excon/connection.rb#L264-L26919:41
wchrisjHoly crap19:44
terry_howeIf only excon devs put that kind of effort into printing out debug output19:46
elightterry_howe: LOLOLOLOLOL19:46
elightterry_howe: funny because it’s true19:46
terry_howeyou do get used to it though19:46
elightterry_howe: https://www.youtube.com/watch?v=3vAnuBtyEYE19:47
terry_howe:)19:48
mhagedornterry_howe, never bother with that.. I just use CharlesProxy.. so much clearer19:59
elight?20:00
mhagedornsee the debug output comment20:00
mhagedornas in exconns is excrement20:00
elight+120:01
terry_howeI have not messed with CharlesProxy, looks cool20:01
mhagedornelight. closer but missing some secret sauce…all the collections, models and mocked_requests appear to be properly rolled up in a subclass.. however doing something like <Subclass>.users fails20:01
elighthttp://dl.dropboxusercontent.com/u/379705/images/single-facepalm.gif20:02
mhagedorneven though <Subclass>.collections now properly shows users in the list20:02
mhagedornso its working but I am feeling like I am right in the middle of fog-core magic20:02
elightyep20:02
elightThat’s better than me. I keep getting a 404 when I try to auth to Rackspace in my impl20:03
elightAnd it looks like the Excon::Connection has the right resource…. so….. o.020:03
*** Klumben has quit IRC20:03
elightAaand maybe I’ve got it.  Weird..20:04
*** Klumben has joined #openstack-sdks20:11
WhatTheFoleyhttps://review.openstack.org/86699 for all you .NET fans... (minor fixes that I wasnt able to make before the last review was merged)20:13
elightGah20:24
elightFinally got it auth'ing20:24
elightmhagedorn wchrisj: Template-method approach to Identity extensions is a bit painful.20:27
elightThough it’s a fuzzy line for me between the pain caused by that and Excon20:28
WhatTheFoleysharwell_: Thanks for the review20:38
*** krames has quit IRC20:44
mhagedornelight20:49
mhagedornup20:49
mhagedornyup20:49
*** jamielennox|away is now known as jamielennox20:49
mhagedornelight the inheritance approach also is painful :)20:49
elightmhagedorn: Actually, that’s where I’ve found myself (Template Method)20:50
elightInheritance20:50
elightAnd yes20:50
elightI’m a little surprised.20:50
elightI thought, from looking at Service#setup_requirements, that damn thing would correctly handle subclassing20:50
elightEvidently not...20:50
wchrisjelight bug in there?20:51
elightUnsure. Or I completely misunderstood the intent behind the code...20:51
elightmhagedorn: ah i’ve got it21:01
*** samchoi has joined #openstack-sdks21:01
mhagedornteach me21:01
elightrequests, collections, and mocked_requests are tracked in instance variables IN EACH SERVICE CLASS21:01
mhagedornyeah21:01
mhagedornhaving to do crap like:21:02
elightSo when you call #collections, that calls YourClass.collections21:02
elightSo you only see the collections defined in your particular subclass21:02
elightOh21:02
elightHrm21:02
elightBut I still don’t see the collections as actual methods here.21:02
elightOk, that’s only part of the problems then21:02
mhagedornelight https://gist.github.com/mwhagedorn/1042322821:03
elightdayumn21:04
elightthat’s the kind of nastiness I was writing for the compositional version21:04
elightThe compositional version of that was less ugly though untested...21:05
elightWelcome to the 9th circle of metaprogramming hell21:07
*** mfer has quit IRC21:09
elightOk, so I can see all of the request methods on my Identity subclass.21:11
elightI wasn’t even sure that hadn’t been somehow damaged21:11
WhatTheFoleyhttps://review.openstack.org/86716 for any .NET peepz out there. Minor bug fix.21:20
*** wchrisj has quit IRC21:54
*** wchrisj has joined #openstack-sdks22:04
*** mhagedorn has left #openstack-sdks22:36
wchrisjhey jamielennox23:22
jamielennoxhey23:23
wchrisjI've been looking at your sdk code23:23
wchrisjgood stuff23:23
wchrisjquestion23:24
jamielennoxsure, i don't consider it complete - i'm sure there will be plenty of problems with it but i think i prefer this approach to managers23:24
wchrisjwhy are the POST, GET, etc commands in resource.py, and not session.py?23:24
wchrisjseems like I had a discussion with someone recently where it was mentioned that session was basically the transport layer, HTTP23:25
wchrisjthose seem to "fit" better in session23:25
jamielennoxso session is something very global, it contains things that are with every single request23:25
wchrisjam I missing something?23:25
wchrisjso it's NOT the http transport layer, in your world?23:26
jamielennoxthere are always going to be some things that are common to just the way a subsection uses the session23:26
jamielennoxno - session is still the transport system23:26
jamielennoxand the requests in the resource.py file do send those through to the session object23:27
jamielennoxso lets take for example everything in keystoneclient is going to want to talk to the identity endpoint23:27
wchrisjok23:27
jamielennoxi want to provide an object to those methods so that the service_type='identity' value is set automatically rather than need that to be set that manually for every request23:28
jamielennoxso essentially i put a wrapper around the session23:28
wchrisjagreed23:28
jamielennoxso not only do i get the common parameters on the session, i get the parameters of the wrapper23:29
jamielennoxi've got exactly this pattern as a WIP review on keystoneclient now: https://review.openstack.org/#/c/86237/23:29
jamielennoxso the only reason i have those wrappers in resource is to add a couple of headers to every request23:30
wchrisjIn that review the HTTP verbs are a part of session, like I was suggesting23:31
wchrisjthat makes more sense to me23:31
jamielennoxwell it takes a session object so that you can do 1-M session-binding relationships23:32
wchrisjIn the session.py I am reviewing there are no verbs in session.py23:32
jamielennoxwhich review is this?23:32
wchrisjokhang on23:33
wchrisjhttps://review.openstack.org/#/c/86227/23:33
jamielennoxoh, right we are talking about my one23:34
wchrisjyeah23:34
jamielennoxi thought that, but i don't know what you mean then with no verbs in session.py23:34
jamielennoxoh23:35
jamielennoxright23:35
jamielennoxwow23:35
wchrisjno verbs23:35
jamielennoxok, so that's something that dtroyer has apparently left out at least for now23:35
jamielennoxi didn't realize that23:35
wchrisjdef head(self, url, **kwargs):23:35
wchrisj474        return self.request(url, 'HEAD', **kwargs)23:35
wchrisj47523:35
wchrisj476    def get(self, url, **kwargs):23:35
wchrisj477        return self.request(url, 'GET', **kwargs)23:35
wchrisj47823:35
wchrisj479    def post(self, url, **kwargs):23:35
wchrisj480        return self.request(url, 'POST', **kwargs)23:35
wchrisj48123:35
wchrisj482    def put(self, url, **kwargs):23:35
wchrisj483        return self.request(url, 'PUT', **kwargs)23:35
wchrisj48423:35
wchrisj485    def delete(self, url, **kwargs):23:35
wchrisj486        return self.request(url, 'DELETE', **kwargs)23:35
jamielennoxyea23:35
jamielennoxi'm not sure why they aren't on the session, they are in the keystoneclient version are23:35
wchrisjI'm still digesting, so just curious23:36
jamielennoxthey are only simple wrappers anyway so it's not a huge problem to add those later23:36
jamielennoxi guess he's just keeping it minimal for now23:36
jamielennoxbut yes, i expect that the verbs will get added to the session later23:36
wchrisjother question is how quickly could we get this sample code actually doing a very basic auth ("create_token")23:37
wchrisjI'd like to be able to play with this code23:37
jamielennoxi'm hoping to keep the same auth plugin structure as we have with keysteonclient23:37
jamielennoxi think he's just waiting for everything to settle down around that before adding it23:38
jamielennoxthere is some stuff like loading plugins from conf files still to be accepted23:38
jamielennoxi'm guessing that what we'll do is just add one very simple auth method so that we can do testing with the library23:39
jamielennoxand then work on full auth plugin structures later23:39
jamielennoxif you want to play with it now i would just hack up a basic v2 password auth into the session somewhere23:39
wchrisjok... makes sense...23:40
*** etoews has quit IRC23:49
*** wchrisj has quit IRC23:56

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