)]}'
{"openstack/connection.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7298d3b8ce33a1045b5d7ca382ebacc9e1a941fe","unresolved":false,"context_lines":[{"line_number":18,"context_line":"USER_AGENT \u003d \u0027OSPythonSDK\u0027"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class Connection(object):"},{"line_number":22,"context_line":"    AUTH_PLUGIN_NAMESPACE \u003d \"openstack.auth.plugin\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_5114ab43","line":21,"updated":"2014-09-24 15:09:16.000000000","message":"This class has 3 methods that have to be called in order to work properly -- if the auth and transport aren\u0027t set up before the session, the session doesn\u0027t work. Would it make more sense to have make the constructor take the Transport() and Auth() instances as arguments?","commit_id":"5a8286585dc7086ec44388ae7f1bc65aad286ed6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7298d3b8ce33a1045b5d7ca382ebacc9e1a941fe","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \"\"\""},{"line_number":41,"context_line":"        self.xport \u003d transport.Transport(verify\u003dverify, user_agent\u003duser_agent)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def create_authenticator(self, name, **auth_args):"},{"line_number":44,"context_line":"        \"\"\"Create an authenticator for the connection."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        :param string name: Name of the authorization plugin."}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_ce4b9685","line":43,"updated":"2014-09-24 15:09:16.000000000","message":"We need, somewhere, to have a list of the arg names. Is the idea that the developer would look at the plugin documentation to see which names to use? Are we going to allow different plugins to use the same name for different purposes, or different names for the same purpose (some generic arg names like \"verify\" or \"url\" might have multiple meanings)?","commit_id":"5a8286585dc7086ec44388ae7f1bc65aad286ed6"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"7298d3b8ce33a1045b5d7ca382ebacc9e1a941fe","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        )"},{"line_number":55,"context_line":"        plugin \u003d mgr.driver"},{"line_number":56,"context_line":"        valid_list \u003d plugin.valid_options"},{"line_number":57,"context_line":"        args \u003d {}"},{"line_number":58,"context_line":"        for k in valid_list:"},{"line_number":59,"context_line":"            if k in auth_args:"},{"line_number":60,"context_line":"                args[k] \u003d auth_args[k]"}],"source_content_type":"text/x-python","patch_set":2,"id":"da9df570_ae2bb292","line":57,"updated":"2014-09-24 15:09:16.000000000","message":"args \u003d dict( (n, args[n]) for n in valid_list if n in args )","commit_id":"5a8286585dc7086ec44388ae7f1bc65aad286ed6"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"51ec60f2b58ee230375fcb670b128c383a87f950","unresolved":false,"context_lines":[{"line_number":22,"context_line":"class Connection(object):"},{"line_number":23,"context_line":"    AUTH_PLUGIN_NAMESPACE \u003d \"openstack.auth.plugin\""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    def __init__(self, transport\u003dNone, authenticator\u003dNone, preference\u003dNone):"},{"line_number":26,"context_line":"        \"\"\"Connection to a cloud provider."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"        Context for a connection to a cloud provider.  The context"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_7b666c52","line":25,"updated":"2014-10-08 18:25:27.000000000","message":"Especially since this is more user facing, I think it would look better if xport, auth, and sess weren\u0027t short-hand, so transport, authenticator, and session, respectively.\n\nThis just stuck out in the examples returning conn.sess and conn.auth","commit_id":"9a13964133bd39da82c98e4fb8328d6b0ec0537a"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"51ec60f2b58ee230375fcb670b128c383a87f950","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        else:"},{"line_number":40,"context_line":"            self.sess \u003d None"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def create(self, verify\u003dTrue, user_agent\u003dUSER_AGENT, preference\u003dNone,"},{"line_number":43,"context_line":"               auth_plugin\u003dNone, **auth_args):"},{"line_number":44,"context_line":"        \"\"\"Create the context for a connection to a cloud provider."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_0f7a7a23","line":42,"updated":"2014-10-08 18:25:27.000000000","message":"I feel like the __init__ and create methods might be named backwards, as I think the common case is going to be to need to call this create method. Creating from the existing parts feels like the secondary entry point to me, so I\u0027d like to be able to get everything I need out of \"x \u003d Connection(...)\"","commit_id":"9a13964133bd39da82c98e4fb8328d6b0ec0537a"},{"author":{"_account_id":8257,"name":"Brian Curtin","email":"brian@python.org","username":"briancurtin"},"change_message_id":"51ec60f2b58ee230375fcb670b128c383a87f950","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        self._create_authenticator(auth_plugin, **auth_args)"},{"line_number":54,"context_line":"        self.sess \u003d session.Session(self.xport, self.auth, preference)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def _create_transport(self, verify, user_agent):"},{"line_number":57,"context_line":"        if self.xport:"},{"line_number":58,"context_line":"            return"},{"line_number":59,"context_line":"        self.xport \u003d transport.Transport(verify\u003dverify, user_agent\u003duser_agent)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baa201ad_4fdf22d6","line":56,"updated":"2014-10-08 18:25:27.000000000","message":"This and the next _create function should be returning the value they\u0027re creating.\n\nIf create moves to being __init__ per the other comment, then I think it becomes more clear that you\u0027d want these to be returning values since you\u0027d want to have the self values defined in there.","commit_id":"9a13964133bd39da82c98e4fb8328d6b0ec0537a"}]}
