)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":10,"context_line":"other methods that might require additional configuration options or"},{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"do not need neither a username nor a password). We implement several"},{"line_number":14,"context_line":"functions to handle this extra features, while remaining compatible with"},{"line_number":15,"context_line":"older plugins."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAN3%2F%2F4ug%3D","line":13,"updated":"2013-03-07 16:55:29.000000000","message":"\"does not need either a username or a password\" (attonit)","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":10,"context_line":"other methods that might require additional configuration options or"},{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"do not need neither a username nor a password). We implement several"},{"line_number":14,"context_line":"functions to handle this extra features, while remaining compatible with"},{"line_number":15,"context_line":"older plugins."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAN3%2F%2F3dI%3D","line":13,"in_reply_to":"AAAAN3%2F%2F4ug%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"do not need neither a username nor a password). We implement several"},{"line_number":14,"context_line":"functions to handle this extra features, while remaining compatible with"},{"line_number":15,"context_line":"older plugins."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Implements: blueprint authentication-plugins"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAN3%2F%2F4uY%3D","line":14,"updated":"2013-03-07 16:55:29.000000000","message":"s/this/these/ (attonit)","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"do not need neither a username nor a password). We implement several"},{"line_number":14,"context_line":"functions to handle this extra features, while remaining compatible with"},{"line_number":15,"context_line":"older plugins."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Implements: blueprint authentication-plugins"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAN3%2F%2F3dM%3D","line":14,"in_reply_to":"AAAAN3%2F%2F4uY%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"3c8c56b8114cb7e3dcc8d8b05b49cf4c88587105","unresolved":false,"context_lines":[{"line_number":10,"context_line":"other methods that might require additional configuration options or"},{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"does not need neither a username nor a password). This commit extends"},{"line_number":14,"context_line":"the current system to handle these extra features, while remaining"},{"line_number":15,"context_line":"compatible with older plugins."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAN3%2F%2F3AM%3D","line":13,"updated":"2013-03-08 16:49:13.000000000","message":"\"neither/nor\" needs to be \"either/or\" (attonit)","commit_id":"e96c1901e71df402cb01428bb1689b11f745792c"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"de252738c3339f3c2773008202212c356c478ceb","unresolved":false,"context_lines":[{"line_number":10,"context_line":"other methods that might require additional configuration options or"},{"line_number":11,"context_line":"that do not require a user to pass some options that are now compulsory"},{"line_number":12,"context_line":"(for example, X.509 authentication needs to get a certificate file, and"},{"line_number":13,"context_line":"does not need neither a username nor a password). This commit extends"},{"line_number":14,"context_line":"the current system to handle these extra features, while remaining"},{"line_number":15,"context_line":"compatible with older plugins."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAN3%2F%2FyeU%3D","line":13,"in_reply_to":"AAAAN3%2F%2F3AM%3D","updated":"2013-03-12 15:49:22.000000000","message":"Done","commit_id":"e96c1901e71df402cb01428bb1689b11f745792c"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ea45f5a3257c68e8824db19fb67516d2671648d4","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alvaro Lopez Garcia \u003caloga@ifca.unican.es\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-12 17:50:46 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve authentication plugins management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current auth plugin system lacks some functionality to be used with"},{"line_number":10,"context_line":"other methods that might require additional configuration options or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAN3%2F%2Fxk8%3D","line":7,"updated":"2013-03-12 22:40:58.000000000","message":"Trivial I know, but if you round-trip for some other reason, consider adding a full stop here to make it a proper sentence.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Alvaro Lopez Garcia \u003caloga@ifca.unican.es\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-03-12 17:50:46 +0100"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Improve authentication plugins management"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The current auth plugin system lacks some functionality to be used with"},{"line_number":10,"context_line":"other methods that might require additional configuration options or"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAN3%2F%2FxB8%3D","line":7,"in_reply_to":"AAAAN3%2F%2Fxk8%3D","updated":"2013-03-13 10:10:19.000000000","message":"Done","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"}],"novaclient/auth_plugin.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"85977da991381ac9b393c531f85a04cca12ae0a6","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    available plugins."},{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    ep_name \u003d \u0027openstack.client.AuthPlugin\u0027"},{"line_number":30,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":31,"context_line":"        try:"},{"line_number":32,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2Fybc%3D","line":29,"updated":"2013-03-12 16:16:24.000000000","message":"I\u0027d prefer to keep the endpoint name snake-cased, i.e., \u0027openstack.client.auth_plugin\u0027.  You might also consider keeping a cache of discovered plugins, so you don\u0027t need to do this loop twice, i.e.:\n\n    _discovered_plugins \u003d {}\n\n\n    def discover_auth_system_opts(parser):\n        ep_name \u003d \u0027openstack.client.auth_plugin\u0027\n        for ep in pkg_resources.iter_entry_points(ep_name):\n        try:\n            auth_plugin \u003d ep.load()\n            add_opts \u003d auth_plugin.add_opts\n        except Exception:\n            pass\n        else:\n            _discovered_plugins[ep.name] \u003d auth_plugin\n            group \u003d parser.add_argument_group(\"Auth-system \u0027%s\u0027 options\" %\n                                              ep.name)\n            add_opts(group)\n\nThat allows you to transform load_plugin() to something like this:\n\n    def load_plugin(auth_system):\n        if auth_system in _discovered_plugins:\n            return _discovered_plugins[auth_system]()\n\n        return DeprecatedAuthPlugin(auth_system)\n\nOf course, I am making the assumption that all auth plugins will have an add_opts() method, which might be an assumption you don\u0027t want to make…but correcting for that just entails a little bit of code moving in discover_auth_system_opts().  The other assumption, of course, is that discover_auth_system_opts() will always be called prior to load_plugin().","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"e4fdc502ac1e62375e49627357f2e922125529ad","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    available plugins."},{"line_number":27,"context_line":"    \"\"\""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    ep_name \u003d \u0027openstack.client.AuthPlugin\u0027"},{"line_number":30,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":31,"context_line":"        try:"},{"line_number":32,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FyTk%3D","line":29,"in_reply_to":"AAAAN3%2F%2Fybc%3D","updated":"2013-03-12 16:58:14.000000000","message":"I agree with you.\n\nThe plugins should inherit from BaseAuthPlugin, so I don\u0027t think we sould handle the add_opts absence.","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"85977da991381ac9b393c531f85a04cca12ae0a6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        try:"},{"line_number":32,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":33,"context_line":"            f \u003d ep.load().add_opts"},{"line_number":34,"context_line":"        except:"},{"line_number":35,"context_line":"            pass"},{"line_number":36,"context_line":"        else:"},{"line_number":37,"context_line":"            group \u003d parser.add_argument_group(\"Auth-system \u0027%s\u0027 options\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2Fyas%3D","line":34,"updated":"2013-03-12 16:16:24.000000000","message":"Except clauses should always at least specify \"Exception\".  Consider the case that some poorly coded add_opts() method instead prompts the user or enters an infinite loop, and the user then hits ^C; this raises a KeyboardInterrupt exception, which derives from BaseException.  This will get caught by a bare \"except:\" clause, but not by an \"except Exception:\" clause, which is why we prefer the latter.","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"e4fdc502ac1e62375e49627357f2e922125529ad","unresolved":false,"context_lines":[{"line_number":31,"context_line":"        try:"},{"line_number":32,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":33,"context_line":"            f \u003d ep.load().add_opts"},{"line_number":34,"context_line":"        except:"},{"line_number":35,"context_line":"            pass"},{"line_number":36,"context_line":"        else:"},{"line_number":37,"context_line":"            group \u003d parser.add_argument_group(\"Auth-system \u0027%s\u0027 options\" %"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FyU4%3D","line":34,"in_reply_to":"AAAAN3%2F%2Fyas%3D","updated":"2013-03-12 16:58:14.000000000","message":"Done","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"85977da991381ac9b393c531f85a04cca12ae0a6","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    def _load_endpoints(self):"},{"line_number":104,"context_line":"        ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":105,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":106,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":107,"context_line":"                self.get_auth_url \u003d ep.load()"},{"line_number":108,"context_line":"                break"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2Fyc8%3D","line":106,"updated":"2013-03-12 16:16:24.000000000","message":"Did you know iter_entry_points() takes a second argument?  I believe you can eliminate this \u0027if\u0027 by passing self.auth_system to that.","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"6232aab8ae718a2b56535e652ddd125efec2f821","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    def _load_endpoints(self):"},{"line_number":104,"context_line":"        ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":105,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":106,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":107,"context_line":"                self.get_auth_url \u003d ep.load()"},{"line_number":108,"context_line":"                break"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FxCE%3D","line":106,"in_reply_to":"AAAAN3%2F%2Fyc8%3D","updated":"2013-03-13 09:11:37.000000000","message":"Done","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"85977da991381ac9b393c531f85a04cca12ae0a6","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":105,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":106,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":107,"context_line":"                self.get_auth_url \u003d ep.load()"},{"line_number":108,"context_line":"                break"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        ep_name \u003d \u0027openstack.client.authenticate\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FyY4%3D","line":107,"updated":"2013-03-12 16:16:24.000000000","message":"I like to surround the ep.load() in a try/except block.  My thinking here is that it is perfectly legal for two different packages to install an entrypoint with the same name; if we try to load one of those entrypoints and get an ImportError or pkg_resources.UnknownExtra exception, we want to continue to walk the list and pick up any alternatives.  It\u0027s an unlikely thing, but users (and other programmers) do unlikely things every day, so…\n\nYou might want to glance at _lookup_handler() in https://github.com/klmitch/bark/blob/master/bark/handlers.py#L383 for an example of how I code with iter_entry_points().  (I have other examples as well; feel free to poke around my github code or ask for other suggestions…)","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"6232aab8ae718a2b56535e652ddd125efec2f821","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":105,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":106,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":107,"context_line":"                self.get_auth_url \u003d ep.load()"},{"line_number":108,"context_line":"                break"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"        ep_name \u003d \u0027openstack.client.authenticate\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FxCI%3D","line":107,"in_reply_to":"AAAAN3%2F%2FyY4%3D","updated":"2013-03-13 09:11:37.000000000","message":"Done","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ea45f5a3257c68e8824db19fb67516d2671648d4","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011 OpenStack LLC."},{"line_number":2,"context_line":"# Copyright 2013 Spanish National Research Council."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2Fxk4%3D","line":1,"updated":"2013-03-12 22:40:58.000000000","message":"I believe it is 2013 now :). Also should that be the foundation?","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2011 OpenStack LLC."},{"line_number":2,"context_line":"# Copyright 2013 Spanish National Research Council."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2FxB0%3D","line":1,"in_reply_to":"AAAAN3%2F%2Fxk4%3D","updated":"2013-03-13 10:10:19.000000000","message":"copy paste side-effects ;-)","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ea45f5a3257c68e8824db19fb67516d2671648d4","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    This function will try to populate the parser with options from the"},{"line_number":29,"context_line":"    available plugins."},{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    ep_name \u003d \u0027openstack.client.auth_plugin\u0027"},{"line_number":33,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":34,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2Fxk0%3D","line":31,"updated":"2013-03-12 22:40:58.000000000","message":"This blank line isn\u0027t needed and will cause unnecessary folding in vim.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    This function will try to populate the parser with options from the"},{"line_number":29,"context_line":"    available plugins."},{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    ep_name \u003d \u0027openstack.client.auth_plugin\u0027"},{"line_number":33,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":34,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2Fw%2FU%3D","line":31,"in_reply_to":"AAAAN3%2F%2Fxk0%3D","updated":"2013-03-13 10:10:19.000000000","message":"Although I agree that this is not necessary, my vim settings folded it properly.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ea45f5a3257c68e8824db19fb67516d2671648d4","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    ep_name \u003d \u0027openstack.client.auth_plugin\u0027"},{"line_number":33,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":34,"context_line":"        try:"},{"line_number":35,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":36,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":37,"context_line":"            add_opts_fn \u003d auth_plugin.add_opts"},{"line_number":38,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2Fxks%3D","line":35,"updated":"2013-03-12 22:40:58.000000000","message":"Prevent misconfigured auth-systems doing what?\n\nCould you rephrase?","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    ep_name \u003d \u0027openstack.client.auth_plugin\u0027"},{"line_number":33,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":34,"context_line":"        try:"},{"line_number":35,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":36,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":37,"context_line":"            add_opts_fn \u003d auth_plugin.add_opts"},{"line_number":38,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2FxBo%3D","line":35,"in_reply_to":"AAAAN3%2F%2Fxks%3D","updated":"2013-03-13 10:10:19.000000000","message":"Done","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"ea45f5a3257c68e8824db19fb67516d2671648d4","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":36,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":37,"context_line":"            add_opts_fn \u003d auth_plugin.add_opts"},{"line_number":38,"context_line":"        except Exception:"},{"line_number":39,"context_line":"            pass"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2Fxkk%3D","line":38,"updated":"2013-03-12 22:40:58.000000000","message":"I don\u0027t like this - it will silently hide any auth system that has trouble. making it into a support burden.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":36,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":37,"context_line":"            add_opts_fn \u003d auth_plugin.add_opts"},{"line_number":38,"context_line":"        except Exception:"},{"line_number":39,"context_line":"            pass"},{"line_number":40,"context_line":"        else:"},{"line_number":41,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2FxBw%3D","line":38,"in_reply_to":"AAAAN3%2F%2Fxkk%3D","updated":"2013-03-13 10:10:19.000000000","message":"I agree, I will catch only related exceptions.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"798a9e056e94ba41654d5e635a89ca300ca216d2","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.opts \u003d {}"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        self.get_auth_url \u003d lambda: None"},{"line_number":103,"context_line":"        self.parse_opts \u003d lambda args: self.opts"},{"line_number":104,"context_line":"        self.authenticate \u003d authenticate"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self._load_endpoints()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2FyOY%3D","line":103,"updated":"2013-03-12 17:14:36.000000000","message":"femtonit: Since we\u0027re only loading get_auth_url() and parse_opts() from entrypoints for old-style auth plugins, we can create a parse_opts() method and eliminate this assignment.","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"96b298733ceab86bc99d145e4e8659d79fabdd5c","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.opts \u003d {}"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        self.get_auth_url \u003d lambda: None"},{"line_number":103,"context_line":"        self.parse_opts \u003d lambda args: self.opts"},{"line_number":104,"context_line":"        self.authenticate \u003d authenticate"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        self._load_endpoints()"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAN3%2F%2FxBg%3D","line":103,"in_reply_to":"AAAAN3%2F%2FyOY%3D","updated":"2013-03-13 10:10:19.000000000","message":"Done","commit_id":"6332200ec4d05e5e290f48aa09fb1f74833c222b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":39,"context_line":"        except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e:"},{"line_number":40,"context_line":"            logging.debug(\"ERROR: Cannot load auth plugin %s\" % ep.name)"},{"line_number":41,"context_line":"            logger.debug(e, exc_info\u003d1)"},{"line_number":42,"context_line":"            continue"},{"line_number":43,"context_line":"        else:"},{"line_number":44,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2FwrA%3D","line":41,"updated":"2013-03-13 15:36:12.000000000","message":"logging.debug() followed by logger.debug()?","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"d118b761dc01d27dd19387d7af77782a00d1023e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            auth_plugin \u003d ep.load()"},{"line_number":39,"context_line":"        except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e:"},{"line_number":40,"context_line":"            logging.debug(\"ERROR: Cannot load auth plugin %s\" % ep.name)"},{"line_number":41,"context_line":"            logger.debug(e, exc_info\u003d1)"},{"line_number":42,"context_line":"            continue"},{"line_number":43,"context_line":"        else:"},{"line_number":44,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwk8%3D","line":41,"in_reply_to":"AAAAN3%2F%2FwrA%3D","updated":"2013-03-13 16:20:27.000000000","message":"Arrg, good catch.","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e:"},{"line_number":40,"context_line":"            logging.debug(\"ERROR: Cannot load auth plugin %s\" % ep.name)"},{"line_number":41,"context_line":"            logger.debug(e, exc_info\u003d1)"},{"line_number":42,"context_line":"            continue"},{"line_number":43,"context_line":"        else:"},{"line_number":44,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwq4%3D","line":42,"updated":"2013-03-13 15:36:12.000000000","message":"You don\u0027t need the continue; the else clause will be skipped anyway, so the next action will be to continue the loop.","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"d118b761dc01d27dd19387d7af77782a00d1023e","unresolved":false,"context_lines":[{"line_number":39,"context_line":"        except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e:"},{"line_number":40,"context_line":"            logging.debug(\"ERROR: Cannot load auth plugin %s\" % ep.name)"},{"line_number":41,"context_line":"            logger.debug(e, exc_info\u003d1)"},{"line_number":42,"context_line":"            continue"},{"line_number":43,"context_line":"        else:"},{"line_number":44,"context_line":"            _discovered_plugins[ep.name] \u003d auth_plugin"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwkw%3D","line":42,"in_reply_to":"AAAAN3%2F%2Fwq4%3D","updated":"2013-03-13 16:20:27.000000000","message":"Done","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # NOTE(aloga): If we arrive here, the plugin will be an old-style one,"},{"line_number":66,"context_line":"    # so we have to create a fake AuthPlugin for it."},{"line_number":67,"context_line":"    return DeprecatedAuthPlugin(auth_system)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class BaseAuthPlugin(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwqs%3D","line":67,"updated":"2013-03-13 15:36:12.000000000","message":"I wonder if discover_auth_systems() should also try to discover these legacy auth plugins?  Might increase startup time with too little benefit, however…\n\nAnyway, here\u0027s some sketchy code that demonstrates how this might be done…\n\n    def discover_legacy_auth_systems():\n        auth_urls \u003d {}\n        authenticates \u003d {}\n\n        # Suck in the defined entrypoints\n        for ep in pkg_resources.iter_entry_points(\u0027openstack.client.auth_url\u0027):\n            try:\n                auth_urls[ep.name] \u003d ep.load()\n            except (ImportError, pkg_resources.UnknownExtra, AttributeError):\n                pass\n        for ep in pkg_resources.iter_entry_points(\u0027openstack.client.authenticate\u0027):\n            try:\n                authenticates[ep.name] \u003d ep.load()\n            except (ImportError, pkg_resources.UnknownExtra, AttributeError):\n                pass\n\n        # Generate DeprecatedAuthPlugin instances\n        for auth_system in set(auth_urls.keys()) \u0026 set(authenticates.keys()):\n            auth_url \u003d auth_urls[auth_system]\n            authenticate \u003d authenticates[auth_system]\n            plugin \u003d DeprecatedAuthPlugin(auth_system, auth_url, authenticate)\n            _discovered_plugins[auth_system] \u003d plugin\n\nNote the use of set intersection in the final \u0027for\u0027 loop to ensure that only auth systems with both auth_url() and authenticate() entrypoints are added as legitimate plugins.","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"d118b761dc01d27dd19387d7af77782a00d1023e","unresolved":false,"context_lines":[{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    # NOTE(aloga): If we arrive here, the plugin will be an old-style one,"},{"line_number":66,"context_line":"    # so we have to create a fake AuthPlugin for it."},{"line_number":67,"context_line":"    return DeprecatedAuthPlugin(auth_system)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"class BaseAuthPlugin(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwig%3D","line":67,"in_reply_to":"AAAAN3%2F%2Fwqs%3D","updated":"2013-03-13 16:20:27.000000000","message":"I was thinking about this, but I do not know if it is worth or not. Eventually all the plugins should use the new schema so I do not know if it is worth or not.","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"}],"novaclient/auth_plugins.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def get_auth_system_url(auth_system):"},{"line_number":24,"context_line":"    \"\"\"Load plugin-based auth_url\"\"\""},{"line_number":25,"context_line":"    ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":26,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":27,"context_line":"        if ep.name \u003d\u003d auth_system:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4uU%3D","line":24,"updated":"2013-03-07 16:55:29.000000000","message":"Please end one-line docstrings like this with a period (femtonit)","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def get_auth_system_url(auth_system):"},{"line_number":24,"context_line":"    \"\"\"Load plugin-based auth_url\"\"\""},{"line_number":25,"context_line":"    ep_name \u003d \u0027openstack.client.auth_url\u0027"},{"line_number":26,"context_line":"    for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":27,"context_line":"        if ep.name \u003d\u003d auth_system:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3c8%3D","line":24,"in_reply_to":"AAAAN3%2F%2F4uU%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Discover options needed by the available auth-system."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    This function will call all the entry points"},{"line_number":36,"context_line":"    \"openstack.client.add_auth_opts\" so that the available auth systems can"},{"line_number":37,"context_line":"    populate its options to the parser."},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    ep_name \u003d \u0027openstack.client.add_auth_opts\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4t8%3D","line":36,"updated":"2013-03-07 16:55:29.000000000","message":"\"openstack.client.add_auth_opts\"?  Is this a general mechanism that\u0027s being contributed to all clients, then?","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"12fd334013b6dc435ab1dfde0d5187b72aacc48f","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Discover options needed by the available auth-system."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    This function will call all the entry points"},{"line_number":36,"context_line":"    \"openstack.client.add_auth_opts\" so that the available auth systems can"},{"line_number":37,"context_line":"    populate its options to the parser."},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    ep_name \u003d \u0027openstack.client.add_auth_opts\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F2%2FY%3D","line":36,"in_reply_to":"AAAAN3%2F%2F3AU%3D","updated":"2013-03-08 16:48:32.000000000","message":"Great :-)\n\nI though that you were not ok with the naming that\u0027s why I re-asked.","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"3956d052b86ac25aa33bb3b54e2d05cf68b0c0f4","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Discover options needed by the available auth-system."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    This function will call all the entry points"},{"line_number":36,"context_line":"    \"openstack.client.add_auth_opts\" so that the available auth systems can"},{"line_number":37,"context_line":"    populate its options to the parser."},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    ep_name \u003d \u0027openstack.client.add_auth_opts\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3AU%3D","line":36,"in_reply_to":"AAAAN3%2F%2F3YY%3D","updated":"2013-03-08 16:35:55.000000000","message":"Er, no problem, I was just asking a question to confirm my inference.","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    \"\"\"Discover options needed by the available auth-system."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    This function will call all the entry points"},{"line_number":36,"context_line":"    \"openstack.client.add_auth_opts\" so that the available auth systems can"},{"line_number":37,"context_line":"    populate its options to the parser."},{"line_number":38,"context_line":"    \"\"\""},{"line_number":39,"context_line":"    ep_name \u003d \u0027openstack.client.add_auth_opts\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3YY%3D","line":36,"in_reply_to":"AAAAN3%2F%2F4t8%3D","updated":"2013-03-08 09:47:22.000000000","message":"Yes, eventually it will be contributed to all clients (maybe all except keystone). What is the problem with that naming convention? It\u0027s quite general (it is not \"openstack.novaclient\" and I\u0027ve followed the existing name convention for the auth systems that are already available (hp auth system and rackspace so far)","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":43,"context_line":"            f \u003d ep.load()"},{"line_number":44,"context_line":"        except:"},{"line_number":45,"context_line":"            # print(\"WARNING: Cannot load auth plugin \u0027%s\u0027\" % ep.name)"},{"line_number":46,"context_line":"            pass"},{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            group \u003d parser.add_argument_group(\"Auth-system \u0027%s\u0027 options\" %"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4tg%3D","line":45,"updated":"2013-03-07 16:55:29.000000000","message":"Please remove debugging code, rather than simply commenting it out.","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":42,"context_line":"            # Catch any exceptions to prevent from misconfigured auth-systems"},{"line_number":43,"context_line":"            f \u003d ep.load()"},{"line_number":44,"context_line":"        except:"},{"line_number":45,"context_line":"            # print(\"WARNING: Cannot load auth plugin \u0027%s\u0027\" % ep.name)"},{"line_number":46,"context_line":"            pass"},{"line_number":47,"context_line":"        else:"},{"line_number":48,"context_line":"            group \u003d parser.add_argument_group(\"Auth-system \u0027%s\u0027 options\" %"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3dE%3D","line":45,"in_reply_to":"AAAAN3%2F%2F4tg%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"3c8c56b8114cb7e3dcc8d8b05b49cf4c88587105","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":66,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":67,"context_line":"                self._do_authenticate \u003d ep.load()"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _do_url(self):"},{"line_number":71,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2F2%2Fs%3D","line":68,"updated":"2013-03-08 16:49:13.000000000","message":"So, now we bring all three loops into a single function.  While I see this as no worse than the previous system, what I would really prefer—and yeah, we may not be able to get away with it, but we should try really hard to get there—is to have a *single* entrypoint loading a class; that class would then have these three methods.\n\nAnd I don\u0027t really like doing this as a monkeypatch, either.  If you\u0027re dead set on using this mechanism, I suggest something like:\n\n    def __init__(self, auth_system):\n        self.auth_system \u003d auth_system\n        self.opts \u003d {}\n\n        def authenticate(cls, auth_url):\n            raise exceptions.AuthSystemNotFound(self.auth_system)\n\n        self.auth_url \u003d lambda: None\n        self.parse_auth_opts \u003d lambda args: {}\n        self.authenticate \u003d authenticate\n\n        self._load_endpoints()","commit_id":"e96c1901e71df402cb01428bb1689b11f745792c"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"de252738c3339f3c2773008202212c356c478ceb","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        for ep in pkg_resources.iter_entry_points(ep_name):"},{"line_number":66,"context_line":"            if ep.name \u003d\u003d self.auth_system:"},{"line_number":67,"context_line":"                self._do_authenticate \u003d ep.load()"},{"line_number":68,"context_line":"                break"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def _do_url(self):"},{"line_number":71,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAN3%2F%2Fydg%3D","line":68,"in_reply_to":"AAAAN3%2F%2F2%2Fs%3D","updated":"2013-03-12 15:49:22.000000000","message":"I do not see the way of getting rid of this unless we break with existing auth-plugins.\n\nI\u0027ve reimplemented the loading mechanism so that new auth-plugins can inherit a base class and override their methods. Therefore we can load a single entry point pointing to a class, but we still have to deal with the old auth-systems.","commit_id":"e96c1901e71df402cb01428bb1689b11f745792c"}],"novaclient/client.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.projectid \u003d projectid"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if auth_system and auth_system !\u003d \u0027keystone\u0027 and not auth_plugin:"},{"line_number":53,"context_line":"            raise exceptions.AuthSystemNotFound(auth_system)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if not auth_url and auth_system and auth_system !\u003d \u0027keystone\u0027:"},{"line_number":56,"context_line":"            auth_url \u003d auth_plugin.get_auth_url()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2FwpI%3D","line":53,"updated":"2013-03-13 15:36:12.000000000","message":"Eventually, \u0027keystone\u0027 should be turned into one of these auth system plugins…","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"d118b761dc01d27dd19387d7af77782a00d1023e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        self.projectid \u003d projectid"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        if auth_system and auth_system !\u003d \u0027keystone\u0027 and not auth_plugin:"},{"line_number":53,"context_line":"            raise exceptions.AuthSystemNotFound(auth_system)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"        if not auth_url and auth_system and auth_system !\u003d \u0027keystone\u0027:"},{"line_number":56,"context_line":"            auth_url \u003d auth_plugin.get_auth_url()"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwlg%3D","line":53,"in_reply_to":"AAAAN3%2F%2FwpI%3D","updated":"2013-03-13 16:20:27.000000000","message":"This was my idea, but after this patch gets merged (along with X509, BasicAuth and some other common plugins)","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"}],"novaclient/shell.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"85977da991381ac9b393c531f85a04cca12ae0a6","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                if not url:"},{"line_number":612,"context_line":"                    if os_auth_system and os_auth_system !\u003d \u0027keystone\u0027:"},{"line_number":613,"context_line":"                        os_auth_url \u003d \\"},{"line_number":614,"context_line":"                            auth_plugin.get_auth_url()"},{"line_number":615,"context_line":"                else:"},{"line_number":616,"context_line":"                    os_auth_url \u003d url"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FyYg%3D","line":614,"updated":"2013-03-12 16:16:24.000000000","message":"Since you shortened the original call, I\u0027d really prefer that you eliminate the backslash continuation by moving this onto the previous line…","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"e4fdc502ac1e62375e49627357f2e922125529ad","unresolved":false,"context_lines":[{"line_number":611,"context_line":"                if not url:"},{"line_number":612,"context_line":"                    if os_auth_system and os_auth_system !\u003d \u0027keystone\u0027:"},{"line_number":613,"context_line":"                        os_auth_url \u003d \\"},{"line_number":614,"context_line":"                            auth_plugin.get_auth_url()"},{"line_number":615,"context_line":"                else:"},{"line_number":616,"context_line":"                    os_auth_url \u003d url"},{"line_number":617,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2FyVU%3D","line":614,"in_reply_to":"AAAAN3%2F%2FyYg%3D","updated":"2013-03-12 16:58:14.000000000","message":"Done","commit_id":"d94985411ecd9ee0169fb25b494351bc7d362457"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        streamhandler.setFormatter(logging.Formatter(streamformat))"},{"line_number":517,"context_line":"        # Set up the root logger to debug so that the submodules can"},{"line_number":518,"context_line":"        # print debug messages"},{"line_number":519,"context_line":"        logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":520,"context_line":"        logger.addHandler(streamhandler)"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    def main(self, argv):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2FwpE%3D","line":519,"updated":"2013-03-13 15:36:12.000000000","message":"Would you mind making this a separate patch?","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"e83439e5cb723c34ad7495fe1e84cf6a4525cbe2","unresolved":false,"context_lines":[{"line_number":516,"context_line":"        streamhandler.setFormatter(logging.Formatter(streamformat))"},{"line_number":517,"context_line":"        # Set up the root logger to debug so that the submodules can"},{"line_number":518,"context_line":"        # print debug messages"},{"line_number":519,"context_line":"        logging.basicConfig(level\u003dlogging.DEBUG)"},{"line_number":520,"context_line":"        logger.addHandler(streamhandler)"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    def main(self, argv):"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwl0%3D","line":519,"in_reply_to":"AAAAN3%2F%2FwpE%3D","updated":"2013-03-13 15:54:54.000000000","message":"Done","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"}],"tests/test_auth_plugins.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            parser \u003d argparse.ArgumentParser()"},{"line_number":185,"context_line":"            parser \u003d auth_plugins.discover_auth_system_opts(parser)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        test_discover()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_parse_auth_system_options(self):"},{"line_number":190,"context_line":"        class MockEntrypoint(pkg_resources.EntryPoint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4sk%3D","line":187,"updated":"2013-03-07 16:55:29.000000000","message":"I would rather you format this test like so:\n\n    @mock.patch.object(pkg_resources, \"iter_entry_points\")\n    def test_discover_auth_system_options(self, mock_iter_entry_points)\n        class MockEntrypoint(pkg_resources.EntryPoint):\n            …\n\n        mock_iter_entry_points.side_effect \u003d lambda _t: [MockEntrypoint(…)]\n\n        parser \u003d argparse.ArgumentParser()\n        parser \u003d auth_plugins.discover_auth_system_opts(parser)\n\n        # Add appropriate asserts here\n\nNote specifically the elimination of the inner function test_discover().\n\nI\u0027ll point out that this test has no assertions whatsoever, so it doesn\u0027t actually appear to test anything (except that no errors are raised).  I\u0027ll also point out that it is possible to do the MockEntrypoint class using mock.Mock(), perhaps with appropriate use of side_effect.","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":184,"context_line":"            parser \u003d argparse.ArgumentParser()"},{"line_number":185,"context_line":"            parser \u003d auth_plugins.discover_auth_system_opts(parser)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        test_discover()"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"    def test_parse_auth_system_options(self):"},{"line_number":190,"context_line":"        class MockEntrypoint(pkg_resources.EntryPoint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3ZU%3D","line":187,"in_reply_to":"AAAAN3%2F%2F4sk%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done.\n\nYou\u0027re totally right on the assertions... I sent to review the wrong version!","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4d74ce3f0d669e31c4235c93518aa0202b56c786","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            opts \u003d auth_plugins.parse_auth_system_opts(\"fake\", None)"},{"line_number":204,"context_line":"            self.assertIn(\"fake_argument\", opts)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        test_parse()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def test_auth_system_raises_exception_when_missing_auth_url(self):"},{"line_number":209,"context_line":"        class MockAuthUrlEntrypoint(pkg_resources.EntryPoint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F4sY%3D","line":206,"updated":"2013-03-07 16:55:29.000000000","message":"I have similar comments here, although this at least has an assertion…","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"4657a299fddbf02a7b0b4903bb687fffc2db5aff","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            opts \u003d auth_plugins.parse_auth_system_opts(\"fake\", None)"},{"line_number":204,"context_line":"            self.assertIn(\"fake_argument\", opts)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"        test_parse()"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def test_auth_system_raises_exception_when_missing_auth_url(self):"},{"line_number":209,"context_line":"        class MockAuthUrlEntrypoint(pkg_resources.EntryPoint):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAN3%2F%2F3ZM%3D","line":206,"in_reply_to":"AAAAN3%2F%2F4sY%3D","updated":"2013-03-08 09:47:22.000000000","message":"Done","commit_id":"c9ab14eef5f4aa7005ede0a842ade9a15409d304"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"4cb792c82ebbd4cf3ab6f176574b93ef9cab7310","unresolved":false,"context_lines":[{"line_number":213,"context_line":""},{"line_number":214,"context_line":"        mock_request \u003d mock_http_request()"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        @mock.patch.object(requests, \"request\", mock_request)"},{"line_number":217,"context_line":"        def test_auth_call():"},{"line_number":218,"context_line":"            auth_plugin.discover_auth_systems()"},{"line_number":219,"context_line":"            plugin \u003d auth_plugin.load_plugin(\"fake\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAN3%2F%2Fwo4%3D","line":216,"updated":"2013-03-13 15:36:12.000000000","message":"Is there a reason this mock is here on this inner function?  I would rather have it moved to the top-level test_auth_system_success() function and eliminate the inner function…","commit_id":"c7f94c61153217d31e05f4c9b92282fc88bd566f"}]}
