)]}'
{"doc/source/command-errors.rst":[{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":2,"context_line":"Command Errors"},{"line_number":3,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":4,"context_line":""},{"line_number":5,"context_line":"Hanlding errors in OpenStackClient commands is fairly straightforward.  An"},{"line_number":6,"context_line":"exception is thrown and handled by the application-level caller."},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"Note: There are many cases that need to be filled out here.  The initial"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_4586b0db","line":5,"range":{"start_line":5,"start_character":0,"end_line":5,"end_character":8},"updated":"2016-03-09 21:13:12.000000000","message":"Handling*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":9,"context_line":"version of this document considers the specific case of commands that make"},{"line_number":10,"context_line":"multiple REST API calls and how to handle when one or more of those calls fails."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"REAT API Errors"},{"line_number":13,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Multiple REST API Calls"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_8553986a","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":4},"updated":"2016-03-09 21:13:12.000000000","message":"REST*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                        snapshot.id,"},{"line_number":75,"context_line":"                        parsed_args.property,"},{"line_number":76,"context_line":"                    )"},{"line_number":77,"context_line":"                except !!!!!!!!!!:      # Need to define the excpetions to catch here"},{"line_number":78,"context_line":"                    self.app.log.error(\"Property set failed\")"},{"line_number":79,"context_line":"                    result \u003d 1"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_85da78e6","line":77,"range":{"start_line":77,"start_character":61,"end_line":77,"end_character":71},"updated":"2016-03-09 21:13:12.000000000","message":"exceptions*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":84,"context_line":"                        snapshot.id,"},{"line_number":85,"context_line":"                        parsed_args.state,"},{"line_number":86,"context_line":"                    )"},{"line_number":87,"context_line":"                except !!!!!!!!!!:      # Need to define the excpetions to catch here"},{"line_number":88,"context_line":"                    self.app.log.error(\"State set failed\")"},{"line_number":89,"context_line":"                    result \u003d 1"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_c5e00099","line":87,"range":{"start_line":87,"start_character":61,"end_line":87,"end_character":71},"updated":"2016-03-09 21:13:12.000000000","message":"exceptions*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                    snapshot.id,"},{"line_number":94,"context_line":"                    **kwargs"},{"line_number":95,"context_line":"                )"},{"line_number":96,"context_line":"            except !!!!!!!!!!:      # Need to define the excpetions to catch here"},{"line_number":97,"context_line":"                self.app.log.error(\"Update failed\")"},{"line_number":98,"context_line":"                result \u003d 1"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_05f5c855","line":96,"range":{"start_line":96,"start_character":57,"end_line":96,"end_character":67},"updated":"2016-03-09 21:13:12.000000000","message":"exceptions*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"cd6fb4e82390cb45cb4ec9e9fe61953c19145eab","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                self.app.log.error(\"Update failed\")"},{"line_number":98,"context_line":"                result \u003d 1"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            # NOTE(dtroyer): Thisrequires an addition in common.command.Command.run()"},{"line_number":101,"context_line":"            # to actually return the result of take_action() to App.run()."},{"line_number":102,"context_line":"            return result"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_a504d449","line":100,"range":{"start_line":100,"start_character":29,"end_line":100,"end_character":41},"updated":"2016-03-09 21:13:12.000000000","message":"This requires*","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":970,"name":"Dean Troyer","email":"dtroyer@gmail.com","username":"dtroyer"},"change_message_id":"b39a58adb71b4a4452f996abf4f1a0b8e42e81b3","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                self.app.log.error(\"Update failed\")"},{"line_number":98,"context_line":"                result \u003d 1"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            # NOTE(dtroyer): Thisrequires an addition in common.command.Command.run()"},{"line_number":101,"context_line":"            # to actually return the result of take_action() to App.run()."},{"line_number":102,"context_line":"            return result"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_b2bd0504","line":100,"in_reply_to":"5aef4532_05a5ba45","updated":"2016-03-10 17:25:05.000000000","message":"Maybe?  The thing is we don\u0027t always want to abort everything when a partial failure occurs.\n\nWe would need to follow through and make sue that we can do an exception that doesn\u0027t abort, say for interactive mode.","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"235f4d21b68fb71d3b1869434f01ff263bf3b658","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                self.app.log.error(\"Update failed\")"},{"line_number":98,"context_line":"                result \u003d 1"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            # NOTE(dtroyer): Thisrequires an addition in common.command.Command.run()"},{"line_number":101,"context_line":"            # to actually return the result of take_action() to App.run()."},{"line_number":102,"context_line":"            return result"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5aef4532_05a5ba45","line":100,"range":{"start_line":100,"start_character":29,"end_line":100,"end_character":41},"in_reply_to":"5aef4532_a504d449","updated":"2016-03-10 03:56:02.000000000","message":"How about raising an exception instead?","commit_id":"5a58a51409527e29d52e7fd27581d4b5d9c91d1e"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"4f28277f58d27f13c0e4233be21f1b77590d9807","unresolved":false,"context_lines":[{"line_number":47,"context_line":"``--state`` arguments are set using the ``reset_state()`` method, and the"},{"line_number":48,"context_line":"remaining arguments are set using the ``update()`` method."},{"line_number":49,"context_line":""},{"line_number":50,"context_line":".. code-block:: python"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    class SetSnapshot(command.Command):"},{"line_number":53,"context_line":"        \"\"\"Set snapshot properties\"\"\""}],"source_content_type":"text/x-rst","patch_set":2,"id":"5aef4532_32e63fb0","line":50,"range":{"start_line":50,"start_character":0,"end_line":50,"end_character":22},"updated":"2016-03-10 02:41:10.000000000","message":"tihs isn\u0027t rendering properly","commit_id":"2d8bdeded60c984e3b4c2bbe710d2c0aea85da64"},{"author":{"_account_id":6482,"name":"Steve Martinelli","email":"s.martinelli@gmail.com","username":"stevemar"},"change_message_id":"e1c5184727897a95fddaf528a36df3d66a73651d","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                       snapshot.id,"},{"line_number":75,"context_line":"                       parsed_args.property,"},{"line_number":76,"context_line":"                   )"},{"line_number":77,"context_line":"               except !!!!!!!!!!:      # Need to define the exceptions to catch here"},{"line_number":78,"context_line":"                   self.app.log.error(\"Property set failed\")"},{"line_number":79,"context_line":"                   result \u003d 1"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"5aef4532_cd95ba33","line":77,"range":{"start_line":77,"start_character":22,"end_line":77,"end_character":32},"updated":"2016-03-10 02:58:03.000000000","message":"apparently this isn\u0027t playing nice with the doc rendering","commit_id":"d4da5213fa703e2cd4f3add8c45875b5553c51ee"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"85b9eae04d299ae38aba21172edb09fbb418b749","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"The general pattern for handling OpenStackClient command-level errors is to"},{"line_number":17,"context_line":"raise a CommandError exception with an appropriate message.  This should include"},{"line_number":18,"context_line":"conditions arising from arguments that are not valid/allowed (that are not otherise"},{"line_number":19,"context_line":"enforced by ``argparse``) as well as errors arising from external conditions."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"External Errors"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_06590e8e","line":18,"updated":"2016-03-10 21:59:52.000000000","message":"typo...otherise","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"85b9eae04d299ae38aba21172edb09fbb418b749","unresolved":false,"context_lines":[{"line_number":67,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Most commands make a single REST API call via the supporting client library"},{"line_number":70,"context_line":"or SDK.  Errors baes on HTML return codes are usually handled well by default,"},{"line_number":71,"context_line":"but in some cases more specific or user-friendly messages need to be logged."},{"line_number":72,"context_line":"Trapping the exception and raising a CommandError exception with a useful"},{"line_number":73,"context_line":"message is the correct approach."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_060bce7d","line":70,"updated":"2016-03-10 21:59:52.000000000","message":"typo...baes","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"ee5d594d4659310113e1406b56c129bf70412654","unresolved":false,"context_lines":[{"line_number":67,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Most commands make a single REST API call via the supporting client library"},{"line_number":70,"context_line":"or SDK.  Errors baes on HTML return codes are usually handled well by default,"},{"line_number":71,"context_line":"but in some cases more specific or user-friendly messages need to be logged."},{"line_number":72,"context_line":"Trapping the exception and raising a CommandError exception with a useful"},{"line_number":73,"context_line":"message is the correct approach."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_45df83d5","line":70,"in_reply_to":"5aef4532_060bce7d","updated":"2016-03-11 03:45:17.000000000","message":"I think Richard meant based","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":17211,"name":"Brandon Palm","email":"bapalm@us.ibm.com","username":"bapalm"},"change_message_id":"695b35b41d52f25da93052d17db98e31e629119c","unresolved":false,"context_lines":[{"line_number":81,"context_line":"of the remainder of the command handler is defined as such:"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"* Whenever possible, all API calls will be made.  This may not be possible for"},{"line_number":84,"context_line":"  specific commands where the subsequent calls are dependant on the results of"},{"line_number":85,"context_line":"  an earlier call."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"* Any failure of an API call will be logged for the user"}],"source_content_type":"text/x-rst","patch_set":5,"id":"3afc51ec_6d953a3f","line":84,"range":{"start_line":84,"start_character":51,"end_line":84,"end_character":60},"updated":"2016-03-11 14:59:50.000000000","message":"dependent*\n\nhttp://grammarist.com/spelling/dependant-dependent/","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"85b9eae04d299ae38aba21172edb09fbb418b749","unresolved":false,"context_lines":[{"line_number":157,"context_line":"            self.app.log.error(\"Update failed\")"},{"line_number":158,"context_line":"            result +\u003d 1"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        # NOTE(dtroyer): We need to signal the error, and a non-zero return code,"},{"line_number":161,"context_line":"        #                without aborting prematurely"},{"line_number":162,"context_line":"        if result \u003e 0:"},{"line_number":163,"context_line":"            raise SomeNonFatalException "}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_e645026f","line":160,"updated":"2016-03-10 21:59:52.000000000","message":"Does CommandError work here?","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"85b9eae04d299ae38aba21172edb09fbb418b749","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # NOTE(dtroyer): We need to signal the error, and a non-zero return code,"},{"line_number":161,"context_line":"        #                without aborting prematurely"},{"line_number":162,"context_line":"        if result \u003e 0:"},{"line_number":163,"context_line":"            raise SomeNonFatalException "}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_4605d643","line":163,"updated":"2016-03-10 21:59:52.000000000","message":"nit...blank space","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"ee5d594d4659310113e1406b56c129bf70412654","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        # NOTE(dtroyer): We need to signal the error, and a non-zero return code,"},{"line_number":161,"context_line":"        #                without aborting prematurely"},{"line_number":162,"context_line":"        if result \u003e 0:"},{"line_number":163,"context_line":"            raise SomeNonFatalException "}],"source_content_type":"text/x-rst","patch_set":5,"id":"5aef4532_c5a0b344","line":163,"in_reply_to":"5aef4532_4605d643","updated":"2016-03-11 03:45:17.000000000","message":"+1","commit_id":"02e661294b43aca4a9cd5a40141e7efd50a273dc"}]}
