)]}'
{"zun/api/controllers/v1/zun_services.py":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"2e165dd84a959c7ff7c9190acfd40412ed572f3e","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _forced_down(self, context, body):"},{"line_number":87,"context_line":"        \"\"\"Set or unset forced_down flag for the service\"\"\""},{"line_number":88,"context_line":"        if \u0027True\u0027 \u003d\u003d body[\u0027forced_down\u0027]:"},{"line_number":89,"context_line":"            forced_down \u003d True"},{"line_number":90,"context_line":"        else:"},{"line_number":91,"context_line":"            forced_down \u003d False"},{"line_number":92,"context_line":"        return self._update(context, body[\u0027host\u0027], body[\u0027binary\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f044301_3085225b","line":89,"range":{"start_line":88,"start_character":8,"end_line":89,"end_character":30},"updated":"2017-05-09 07:56:25.000000000","message":"request you to check this parameter. And it may not always be \u0027True\u0027, it may be \u0027true\u0027. Better to validate it. For validation please check something like https://github.com/openstack/zun/blob/master/zun/api/controllers/v1/containers.py#L301","commit_id":"44c4a0388c1ba2ff47173bdd5ca4ce67720253a0"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"2ddc4f421d1f124bd1d2040972a3696b92f4cad8","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def _forced_down(self, context, body):"},{"line_number":89,"context_line":"        \"\"\"Set or unset forced_down flag for the service\"\"\""},{"line_number":90,"context_line":"        if (\u0027True\u0027 \u003d\u003d body[\u0027forced_down\u0027] or"},{"line_number":91,"context_line":"                \u0027true\u0027 \u003d\u003d body[\u0027forced_down\u0027]):"},{"line_number":92,"context_line":"            forced_down \u003d True"},{"line_number":93,"context_line":"        else:"},{"line_number":94,"context_line":"            forced_down \u003d False"},{"line_number":95,"context_line":"        return self._update(context, body[\u0027host\u0027], body[\u0027binary\u0027],"},{"line_number":96,"context_line":"                            {\"forced_down\": forced_down})"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3f044301_de704fa8","line":94,"range":{"start_line":90,"start_character":8,"end_line":94,"end_character":31},"updated":"2017-05-09 10:02:24.000000000","message":"Rather than doing string comparison, i would suggest to do something like https://github.com/openstack/zun/blob/master/zun/api/controllers/v1/containers.py#L212. Thoughts?","commit_id":"66f2b4b910dd45151a20482b28bcceb55fff7de7"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"cbc351302c868a620d5505e793a93202f8ea08fe","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    _custom_actions \u003d {"},{"line_number":59,"context_line":"        \u0027enable\u0027: [\u0027POST\u0027],"},{"line_number":60,"context_line":"        \u0027disable\u0027: [\u0027POST\u0027],"},{"line_number":61,"context_line":"        \u0027force_down\u0027: [\u0027POST\u0027],"},{"line_number":62,"context_line":"    }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def __init__(self, **kwargs):"},{"line_number":65,"context_line":"        super(ZunServiceController, self).__init__()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f044301_92b4ecd2","line":62,"range":{"start_line":61,"start_character":8,"end_line":62,"end_character":5},"updated":"2017-05-10 05:13:30.000000000","message":"shouldn\u0027t it be PUT call rather than POST call?","commit_id":"bc99476c5d70dfe859c00c1fee7390f7b50a8a1f"},{"author":{"_account_id":25026,"name":"Bin Zhou","email":"lakerzhou@gmail.com","username":"lakerzhou"},"change_message_id":"f6213ad8f9b7b0ee2b4c07ff71b274577a15a9bb","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                    {\u0027disabled\u0027: True,"},{"line_number":88,"context_line":"                                     \u0027disabled_reason\u0027: reason})"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _forced_down(self, context, body):"},{"line_number":91,"context_line":"        \"\"\"Set or unset forced_down flag for the service\"\"\""},{"line_number":92,"context_line":"        try:"},{"line_number":93,"context_line":"            forced_down \u003d strutils.bool_from_string(body[\u0027forced_down\u0027], True)"},{"line_number":94,"context_line":"        except ValueError as err:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f044301_c11ef9b9","line":91,"range":{"start_line":90,"start_character":8,"end_line":91,"end_character":59},"updated":"2017-05-12 01:20:26.000000000","message":"The function name is very confusing if the comments is correct, e.g. the function supports unset the flag too. I would use _update_forced_down().","commit_id":"84c23f156b2484fe52adc4584ae5d79cfee0efa3"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"f5a43adc5987f4d1453f3dee98a1406400b4cd41","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                                    {\u0027disabled\u0027: True,"},{"line_number":88,"context_line":"                                     \u0027disabled_reason\u0027: reason})"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _forced_down(self, context, body):"},{"line_number":91,"context_line":"        \"\"\"Set or unset forced_down flag for the service\"\"\""},{"line_number":92,"context_line":"        try:"},{"line_number":93,"context_line":"            forced_down \u003d strutils.bool_from_string(body[\u0027forced_down\u0027], True)"},{"line_number":94,"context_line":"        except ValueError as err:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f013ff3_fa238004","line":91,"range":{"start_line":90,"start_character":8,"end_line":91,"end_character":59},"in_reply_to":"3f044301_c11ef9b9","updated":"2017-05-13 16:24:48.000000000","message":"+1","commit_id":"84c23f156b2484fe52adc4584ae5d79cfee0efa3"}]}
