)]}'
{"zun/api/controllers/v1/containers.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":600,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":601,"context_line":"    @exception.wrap_pecan_controller_exception"},{"line_number":602,"context_line":"    @validation.validated(schema.container_update)"},{"line_number":603,"context_line":"    def resize_container(self, container_ident, **kwargs):"},{"line_number":604,"context_line":"        \"\"\"Resize an existing container."},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"        :param container_ident: UUID or name of a container."}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_853509de","line":603,"range":{"start_line":603,"start_character":8,"end_line":603,"end_character":24},"updated":"2018-06-16 18:19:12.000000000","message":"This is a new API so we need to bump the API version for this change. See here for details: https://docs.openstack.org/zun/latest/contributor/api-microversion.html","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":607,"context_line":"        :param kwargs: cpu/memory to be updated."},{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        container \u003d utils.get_container(container_ident)"},{"line_number":610,"context_line":"        check_policy_on_container(container.as_dict(), \"container:update\")"},{"line_number":611,"context_line":"        utils.validate_container_state(container, \u0027update\u0027)"},{"line_number":612,"context_line":"        if \u0027memory\u0027 in kwargs:"},{"line_number":613,"context_line":"            kwargs[\u0027memory\u0027] \u003d str(kwargs[\u0027memory\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_0578198d","line":610,"range":{"start_line":610,"start_character":8,"end_line":610,"end_character":33},"updated":"2018-06-16 18:19:12.000000000","message":"We need to update the policy file (https://github.com/openstack/zun/blob/master/zun/common/policies/container.py) for adding a new rule for resize.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":607,"context_line":"        :param kwargs: cpu/memory to be updated."},{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        container \u003d utils.get_container(container_ident)"},{"line_number":610,"context_line":"        check_policy_on_container(container.as_dict(), \"container:update\")"},{"line_number":611,"context_line":"        utils.validate_container_state(container, \u0027update\u0027)"},{"line_number":612,"context_line":"        if \u0027memory\u0027 in kwargs:"},{"line_number":613,"context_line":"            kwargs[\u0027memory\u0027] \u003d str(kwargs[\u0027memory\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_c558e132","line":610,"range":{"start_line":610,"start_character":66,"end_line":610,"end_character":72},"updated":"2018-06-16 18:19:12.000000000","message":"resize","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":608,"context_line":"        \"\"\""},{"line_number":609,"context_line":"        container \u003d utils.get_container(container_ident)"},{"line_number":610,"context_line":"        check_policy_on_container(container.as_dict(), \"container:update\")"},{"line_number":611,"context_line":"        utils.validate_container_state(container, \u0027update\u0027)"},{"line_number":612,"context_line":"        if \u0027memory\u0027 in kwargs:"},{"line_number":613,"context_line":"            kwargs[\u0027memory\u0027] \u003d str(kwargs[\u0027memory\u0027])"},{"line_number":614,"context_line":"        if \u0027cpu\u0027 in kwargs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_e5807d4c","line":611,"range":{"start_line":611,"start_character":51,"end_line":611,"end_character":57},"updated":"2018-06-16 18:19:12.000000000","message":"resize","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            kwargs[\u0027cpu\u0027] \u003d float(kwargs[\u0027cpu\u0027])"},{"line_number":616,"context_line":"        context \u003d pecan.request.context"},{"line_number":617,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":618,"context_line":"        container \u003d compute_api.resize_container(context, container, kwargs)"},{"line_number":619,"context_line":"        return view.format_container(pecan.request.host_url, container,"},{"line_number":620,"context_line":"                                     context)"},{"line_number":621,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_059d79ba","line":618,"range":{"start_line":618,"start_character":8,"end_line":618,"end_character":17},"updated":"2018-06-16 18:19:12.000000000","message":"I guess resize_container won\u0027t return anything. Is it correct? If yes, then this is not needed.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":618,"context_line":"        container \u003d compute_api.resize_container(context, container, kwargs)"},{"line_number":619,"context_line":"        return view.format_container(pecan.request.host_url, container,"},{"line_number":620,"context_line":"                                     context)"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":623,"context_line":"    @exception.wrap_pecan_controller_exception"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_25b51533","line":620,"updated":"2018-06-16 18:19:12.000000000","message":"I guess the processing is not completed at this point? If yes, then we need to change the returned code to 202 (by default, it returns 200 which means the processing is completed):\n\n  pecan.response.status \u003d 202","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"6c65e349210c4ccdce4f686fb70f43be31639302","unresolved":false,"context_lines":[{"line_number":610,"context_line":"        container \u003d utils.get_container(container_ident)"},{"line_number":611,"context_line":"        check_policy_on_container(container.as_dict(),"},{"line_number":612,"context_line":"                                  \"container:resize_container\")"},{"line_number":613,"context_line":"        utils.validate_container_state(container, \u0027resize_container\u0027)"},{"line_number":614,"context_line":"        if \u0027memory\u0027 in kwargs:"},{"line_number":615,"context_line":"            kwargs[\u0027memory\u0027] \u003d str(kwargs[\u0027memory\u0027])"},{"line_number":616,"context_line":"        if \u0027cpu\u0027 in kwargs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_9c8304cc","line":613,"range":{"start_line":613,"start_character":14,"end_line":613,"end_character":38},"updated":"2018-06-19 02:45:05.000000000","message":"In order to make this work, we need to update this: https://github.com/openstack/zun/blob/master/zun/common/utils.py#L50 . Need to add \u0027resize_container\u0027 to there.","commit_id":"9ab35cb8f106906ae193c215ff9f870a1be2c8f2"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"b17a0c1feda81ab752a7336ca0dbd3ec97ad42e0","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        return view.format_container(pecan.request.host_url, container,"},{"line_number":599,"context_line":"                                     context)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    @base.Controller.api_version(\"1.8\")"},{"line_number":602,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":603,"context_line":"    @exception.wrap_pecan_controller_exception"},{"line_number":604,"context_line":"    @validation.validated(schema.container_update)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_1e290836","line":601,"range":{"start_line":601,"start_character":33,"end_line":601,"end_character":39},"updated":"2018-06-20 06:46:24.000000000","message":"It should be 1.18.","commit_id":"c83452cdf5d313619cb794635ebe9a84943d6877"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"f39abc42eec1bd56ee2b2eddc6889590f9d86dbd","unresolved":false,"context_lines":[{"line_number":598,"context_line":"        return view.format_container(context, pecan.request.host_url,"},{"line_number":599,"context_line":"                                     container)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    @base.Controller.api_version(\"1.8\")"},{"line_number":602,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":603,"context_line":"    @exception.wrap_pecan_controller_exception"},{"line_number":604,"context_line":"    @validation.validated(schema.container_update)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_ef81f4fc","line":601,"range":{"start_line":601,"start_character":30,"end_line":601,"end_character":39},"updated":"2018-06-20 08:43:15.000000000","message":"api_version is still not updated.","commit_id":"a50cba5616418b216c2811944e496ab1d0f4e40f"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"50c01719889eeb8789c9355e21b8edba447d224f","unresolved":false,"context_lines":[{"line_number":620,"context_line":"        compute_api \u003d pecan.request.compute_api"},{"line_number":621,"context_line":"        compute_api.resize_container(context, container, kwargs)"},{"line_number":622,"context_line":"        pecan.response.status \u003d 202"},{"line_number":623,"context_line":"        return view.format_container(pecan.request.host_url, container,"},{"line_number":624,"context_line":"                                     context)"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":627,"context_line":"    @exception.wrap_pecan_controller_exception"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_af0bfb1f","line":624,"range":{"start_line":623,"start_character":38,"end_line":624,"end_character":44},"updated":"2018-06-20 12:56:25.000000000","message":"You can put context as first argument. https://review.openstack.org/#/c/574224/3/zun/api/controllers/v1/containers.py","commit_id":"66609245eb5d28c6ef8bf63f8cef85ca4831a131"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"bfba9ba41dea2e2fdcdb2182279d4c216f339f3b","unresolved":false,"context_lines":[{"line_number":621,"context_line":"        compute_api.resize_container(context, container, kwargs)"},{"line_number":622,"context_line":"        pecan.response.status \u003d 202"},{"line_number":623,"context_line":"        return view.format_container(pecan.request.host_url, container,"},{"line_number":624,"context_line":"                                     context)"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    @pecan.expose(\u0027json\u0027)"},{"line_number":627,"context_line":"    @exception.wrap_pecan_controller_exception"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_4bff7733","line":624,"range":{"start_line":624,"start_character":37,"end_line":624,"end_character":44},"updated":"2018-06-23 18:28:20.000000000","message":"Recently, we have moved the \u0027context\u0027 parameter to the first: https://github.com/openstack/zun/commit/9d05d7fdc042b6366b5720feccb393ed1e406324","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"}],"zun/api/controllers/versions.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"bfba9ba41dea2e2fdcdb2182279d4c216f339f3b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    * 1.16 - Modify restart_policy to capsule spec content"},{"line_number":52,"context_line":"    * 1.17 - Add support for detaching ports"},{"line_number":53,"context_line":"    * 1.18 - Modify the response of network list"},{"line_number":54,"context_line":"    * 1.18 - Intoduce container resize API"},{"line_number":55,"context_line":"\"\"\""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"BASE_VER \u003d \u00271.1\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_0bf5ff50","line":54,"range":{"start_line":54,"start_character":8,"end_line":54,"end_character":10},"updated":"2018-06-23 18:28:20.000000000","message":"This looks like a merging problem. The version 1.18 is token by another patch. We need to take the next version, which is 1.19.","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"}],"zun/common/policies/container.py":[{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"b17a0c1feda81ab752a7336ca0dbd3ec97ad42e0","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        description\u003d\u0027Resize an existing  container.\u0027,"},{"line_number":425,"context_line":"        operations\u003d["},{"line_number":426,"context_line":"            {"},{"line_number":427,"context_line":"                \u0027path\u0027: \u0027/v1/containers/{container_ident}\u0027,"},{"line_number":428,"context_line":"                \u0027method\u0027: \u0027PATCH\u0027"},{"line_number":429,"context_line":"            }"},{"line_number":430,"context_line":"        ]"},{"line_number":431,"context_line":"    ),"},{"line_number":432,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_7ec35c39","line":429,"range":{"start_line":427,"start_character":16,"end_line":429,"end_character":13},"updated":"2018-06-20 06:46:24.000000000","message":"Here method should be \"POST\u0027 which you added in _custom_actions and you should be pass resize in the url also like in nova [1]\n\nhttps://github.com/openstack/nova/blob/afcf078715554e3efe5b71d583586dc112159299/nova/policies/servers.py#L235","commit_id":"c83452cdf5d313619cb794635ebe9a84943d6877"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"f39abc42eec1bd56ee2b2eddc6889590f9d86dbd","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        description\u003d\u0027Resize an existing  container.\u0027,"},{"line_number":425,"context_line":"        operations\u003d["},{"line_number":426,"context_line":"            {"},{"line_number":427,"context_line":"                \u0027path\u0027: \u0027/v1/containers/{container_ident}\u0027,"},{"line_number":428,"context_line":"                \u0027method\u0027: \u0027POST\u0027"},{"line_number":429,"context_line":"            }"},{"line_number":430,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_2f04cc7d","line":427,"range":{"start_line":427,"start_character":40,"end_line":427,"end_character":58},"updated":"2018-06-20 08:43:15.000000000","message":"Here still need to add resize container in the url like in nova.","commit_id":"a50cba5616418b216c2811944e496ab1d0f4e40f"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"c027cb492ea652265dbb6c07448f8bd4cd7a800b","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        description\u003d\u0027Resize an existing  container.\u0027,"},{"line_number":425,"context_line":"        operations\u003d["},{"line_number":426,"context_line":"            {"},{"line_number":427,"context_line":"                \u0027path\u0027: \u0027/v1/containers/{container_ident}/resize_container\u0027,"},{"line_number":428,"context_line":"                \u0027method\u0027: \u0027POST\u0027"},{"line_number":429,"context_line":"            }"},{"line_number":430,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_5423cabe","line":427,"range":{"start_line":427,"start_character":58,"end_line":427,"end_character":74},"updated":"2018-06-21 05:43:33.000000000","message":"resize","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"},{"author":{"_account_id":25571,"name":"Rajat Sharma","email":"rajat.sharma@india.nec.com","username":"rajat29"},"change_message_id":"145074184709546ee5b2aadd61bb65b4a389ed29","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        description\u003d\u0027Resize an existing  container.\u0027,"},{"line_number":425,"context_line":"        operations\u003d["},{"line_number":426,"context_line":"            {"},{"line_number":427,"context_line":"                \u0027path\u0027: \u0027/v1/containers/{container_ident}/resize_container\u0027,"},{"line_number":428,"context_line":"                \u0027method\u0027: \u0027POST\u0027"},{"line_number":429,"context_line":"            }"},{"line_number":430,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_5fe52309","line":427,"range":{"start_line":427,"start_character":58,"end_line":427,"end_character":74},"in_reply_to":"5f7c97a3_5423cabe","updated":"2018-06-21 05:59:45.000000000","message":"It\u0027ll be resize_container only.","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"},{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"0fb08d77dac40bff7a9614907b5c0186fb2f0306","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        description\u003d\u0027Resize an existing  container.\u0027,"},{"line_number":425,"context_line":"        operations\u003d["},{"line_number":426,"context_line":"            {"},{"line_number":427,"context_line":"                \u0027path\u0027: \u0027/v1/containers/{container_ident}/resize_container\u0027,"},{"line_number":428,"context_line":"                \u0027method\u0027: \u0027POST\u0027"},{"line_number":429,"context_line":"            }"},{"line_number":430,"context_line":"        ]"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_664f2135","line":427,"range":{"start_line":427,"start_character":58,"end_line":427,"end_character":74},"in_reply_to":"5f7c97a3_5fe52309","updated":"2018-06-22 03:22:59.000000000","message":"@rajat Nova is using \u0027resize\u0027 in its code. It is better to align with Nova and using the same in here as well.[1]\n\nhttps://github.com/openstack/nova/blob/afcf078715554e3efe5b71d583586dc112159299/nova/policies/servers.py#L242","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"}],"zun/common/utils.py":[{"author":{"_account_id":25695,"name":"Deepak Mourya","email":"deepakmoriya7@gmail.com","username":"deepak_mourya"},"change_message_id":"c027cb492ea652265dbb6c07448f8bd4cd7a800b","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    \u0027remove_security_group\u0027: [consts.CREATED, consts.RUNNING, consts.STOPPED,"},{"line_number":83,"context_line":"                              consts.PAUSED],"},{"line_number":84,"context_line":"    \u0027resize_container\u0027: [consts.CREATED, consts.RUNNING, consts.STOPPED,"},{"line_number":85,"context_line":"                         consts.PAUSED]"},{"line_number":86,"context_line":"}"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"VALID_CONTAINER_FILED \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_7409262f","line":85,"updated":"2018-06-21 05:43:33.000000000","message":"what if resize_container will go in to the error state.?","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"},{"author":{"_account_id":25571,"name":"Rajat Sharma","email":"rajat.sharma@india.nec.com","username":"rajat29"},"change_message_id":"145074184709546ee5b2aadd61bb65b4a389ed29","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    \u0027remove_security_group\u0027: [consts.CREATED, consts.RUNNING, consts.STOPPED,"},{"line_number":83,"context_line":"                              consts.PAUSED],"},{"line_number":84,"context_line":"    \u0027resize_container\u0027: [consts.CREATED, consts.RUNNING, consts.STOPPED,"},{"line_number":85,"context_line":"                         consts.PAUSED]"},{"line_number":86,"context_line":"}"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"VALID_CONTAINER_FILED \u003d {"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_5ff763d5","line":85,"in_reply_to":"5f7c97a3_7409262f","updated":"2018-06-21 05:59:45.000000000","message":"I don\u0027t think increasing CPU or Memory will cause container to go in error state. And this resize api is just like Update container api.","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"}],"zun/compute/manager.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"        self.driver.network_attach(context, container, requested_network)"},{"line_number":1199,"context_line":"        self._update_task_state(context, container, None)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"    def network_create(self, context, network):"},{"line_number":1202,"context_line":"        LOG.debug(\u0027Create network\u0027)"},{"line_number":1203,"context_line":"        try:"},{"line_number":1204,"context_line":"            docker_network \u003d self.driver.create_network(context, network)"},{"line_number":1205,"context_line":"            network.network_id \u003d docker_network[\u0027Id\u0027]"},{"line_number":1206,"context_line":"            network.save()"},{"line_number":1207,"context_line":"        except exception.NetworkNotFound as e:"},{"line_number":1208,"context_line":"            LOG.error(six.text_type(e))"},{"line_number":1209,"context_line":"            return"},{"line_number":1210,"context_line":"        except exception.DockerError as e:"},{"line_number":1211,"context_line":"            LOG.error(\"Error occurred while calling Docker network API: %s\","},{"line_number":1212,"context_line":"                      six.text_type(e))"},{"line_number":1213,"context_line":"            raise"},{"line_number":1214,"context_line":"        except Exception as e:"},{"line_number":1215,"context_line":"            LOG.exception(\"Unexpected exception: %s\", six.text_type(e))"},{"line_number":1216,"context_line":"            raise"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @translate_exception"},{"line_number":1219,"context_line":"    def resize_container(self, context, container, patch):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_a237dbfe","line":1216,"range":{"start_line":1201,"start_character":0,"end_line":1216,"end_character":17},"updated":"2018-06-16 18:19:12.000000000","message":"I guess this is a merging issue. The method network_create should be left untouched.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"            raise"},{"line_number":1217,"context_line":""},{"line_number":1218,"context_line":"    @translate_exception"},{"line_number":1219,"context_line":"    def resize_container(self, context, container, patch):"},{"line_number":1220,"context_line":"        LOG.debug(\u0027Updating a container: %s\u0027, container.uuid)"},{"line_number":1221,"context_line":"        old_container \u003d container.obj_clone()"},{"line_number":1222,"context_line":"        # Update only the fields that have changed"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_258e7579","line":1219,"range":{"start_line":1219,"start_character":8,"end_line":1219,"end_character":24},"updated":"2018-06-16 18:19:12.000000000","message":"Let\u0027s spawn a thread for this, like below (UNTESTED):\n\n    def resize_container(self, context, container):\n        @utils.synchronized(container.uuid)\n        def do_container_resize():\n            self._do_container_resize(context, container)\n\n    def _do_container_resize(...):\n        # your code in here","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":1239,"context_line":"            LOG.error(\"Error occurred while calling docker API: %s\","},{"line_number":1240,"context_line":"                      six.text_type(e))"},{"line_number":1241,"context_line":"            raise"},{"line_number":1242,"context_line":"\u003e\u003e\u003e\u003e\u003e\u003e\u003e 53daf0e... [WIP]Introduce container resize API"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_024ecf95","line":1242,"range":{"start_line":1242,"start_character":0,"end_line":1242,"end_character":54},"updated":"2018-06-16 18:19:12.000000000","message":"This needs to be removed.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"6c65e349210c4ccdce4f686fb70f43be31639302","unresolved":false,"context_lines":[{"line_number":1207,"context_line":"    def resize_container(self, context, container, patch):"},{"line_number":1208,"context_line":"        @utils.synchronized(container.uuid)"},{"line_number":1209,"context_line":"        def do_container_resize():"},{"line_number":1210,"context_line":"            self._do_container_resize(context, container, patch)"},{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"    @translate_exception"},{"line_number":1213,"context_line":"    def _do_resize_container(self, context, container, patch):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_df9baec5","line":1210,"range":{"start_line":1210,"start_character":17,"end_line":1210,"end_character":37},"updated":"2018-06-19 02:45:05.000000000","message":"Here should be _do_resize_container","commit_id":"9ab35cb8f106906ae193c215ff9f870a1be2c8f2"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"6c65e349210c4ccdce4f686fb70f43be31639302","unresolved":false,"context_lines":[{"line_number":1208,"context_line":"        @utils.synchronized(container.uuid)"},{"line_number":1209,"context_line":"        def do_container_resize():"},{"line_number":1210,"context_line":"            self._do_container_resize(context, container, patch)"},{"line_number":1211,"context_line":""},{"line_number":1212,"context_line":"    @translate_exception"},{"line_number":1213,"context_line":"    def _do_resize_container(self, context, container, patch):"},{"line_number":1214,"context_line":"        LOG.debug(\u0027Resizing a Container: %s\u0027, container.uuid)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3fac22ed","line":1211,"updated":"2018-06-19 02:45:05.000000000","message":"We need to call the method in here:\n\n  utils.spawn_n(do_container_resize)","commit_id":"9ab35cb8f106906ae193c215ff9f870a1be2c8f2"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"bfba9ba41dea2e2fdcdb2182279d4c216f339f3b","unresolved":false,"context_lines":[{"line_number":1222,"context_line":"        @utils.synchronized(container.uuid)"},{"line_number":1223,"context_line":"        def do_container_resize():"},{"line_number":1224,"context_line":"            self._do_resize_container(context, container, patch)"},{"line_number":1225,"context_line":"            utils.spawn_n(do_container_resize)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"    @translate_exception"},{"line_number":1228,"context_line":"    def _do_resize_container(self, context, container, patch):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_cb98671c","line":1225,"range":{"start_line":1225,"start_character":18,"end_line":1225,"end_character":25},"updated":"2018-06-23 18:28:20.000000000","message":"We need to spawn a thread in the outer level. Otherwise, there will be no effect for this operation.","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"bfba9ba41dea2e2fdcdb2182279d4c216f339f3b","unresolved":false,"context_lines":[{"line_number":1225,"context_line":"            utils.spawn_n(do_container_resize)"},{"line_number":1226,"context_line":""},{"line_number":1227,"context_line":"    @translate_exception"},{"line_number":1228,"context_line":"    def _do_resize_container(self, context, container, patch):"},{"line_number":1229,"context_line":"        LOG.debug(\u0027Resizing a Container: %s\u0027, container.uuid)"},{"line_number":1230,"context_line":"        old_container \u003d container.obj_clone()"},{"line_number":1231,"context_line":"        # Update only the fields that have changed"}],"source_content_type":"text/x-python","patch_set":9,"id":"5f7c97a3_2b879bb8","line":1228,"range":{"start_line":1228,"start_character":8,"end_line":1228,"end_character":28},"updated":"2018-06-23 18:28:20.000000000","message":"This method is exactly the same as method \u0027container_update\u0027 at line #792. We don\u0027t have to re-define the same method. Instead, simply re-use the existing method should be sufficient.","commit_id":"469fa1362a1c9b0497caaacc557556b8fe8b5ef8"}],"zun/compute/rpcapi.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"6c65e349210c4ccdce4f686fb70f43be31639302","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        return self._call(container.host, \u0027container_update\u0027,"},{"line_number":124,"context_line":"                          container\u003dcontainer, patch\u003dpatch)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def resize_container(self, context, container, cpu, memory):"},{"line_number":127,"context_line":"        self._cast(container.host, \u0027resize_container\u0027,"},{"line_number":128,"context_line":"                   cpu\u003dcpu, memory\u003dmemory)"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_3fc3c28c","line":126,"range":{"start_line":126,"start_character":51,"end_line":126,"end_character":62},"updated":"2018-06-19 02:45:05.000000000","message":"According to how you called this method [1], the API definition should be:\n\n  def resize_container(self, context, container, patch):\n\n[1] https://review.openstack.org/#/c/573651/4/zun/compute/api.py","commit_id":"9ab35cb8f106906ae193c215ff9f870a1be2c8f2"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"6c65e349210c4ccdce4f686fb70f43be31639302","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def resize_container(self, context, container, cpu, memory):"},{"line_number":127,"context_line":"        self._cast(container.host, \u0027resize_container\u0027,"},{"line_number":128,"context_line":"                   cpu\u003dcpu, memory\u003dmemory)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    @check_container_host"},{"line_number":131,"context_line":"    def container_attach(self, context, container):"}],"source_content_type":"text/x-python","patch_set":4,"id":"5f7c97a3_1f4da63a","line":128,"range":{"start_line":128,"start_character":19,"end_line":128,"end_character":41},"updated":"2018-06-19 02:45:05.000000000","message":"According to the API you defined in [1], you should call it in this way: \n\n  self._cast(container.host, \u0027resize_container\u0027,\n                   container\u003dcontainer, patch\u003dpatch)\n\n[1] https://review.openstack.org/#/c/573651/4/zun/compute/manager.py","commit_id":"9ab35cb8f106906ae193c215ff9f870a1be2c8f2"}],"zun/container/docker/driver.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @check_container_id"},{"line_number":800,"context_line":"    @wrap_docker_error"},{"line_number":801,"context_line":"    def update(self, context, container):"},{"line_number":802,"context_line":"        patch \u003d container.obj_get_changes()"},{"line_number":803,"context_line":""},{"line_number":804,"context_line":"        args \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_850c293a","line":801,"range":{"start_line":801,"start_character":8,"end_line":801,"end_character":14},"updated":"2018-06-16 18:19:12.000000000","message":"This one is the same as the new \u0027resize\u0027 method.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"c093a32c5fff5b0b5d053256f723ca172acdce2e","unresolved":false,"context_lines":[{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"    @check_container_id"},{"line_number":1142,"context_line":"    @wrap_docker_error"},{"line_number":1143,"context_line":"    def resize_container(self, context, container):"},{"line_number":1144,"context_line":"        patch \u003d container.obj_get_changes()"},{"line_number":1145,"context_line":""},{"line_number":1146,"context_line":"        args \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_650f8d2f","line":1143,"range":{"start_line":1143,"start_character":8,"end_line":1143,"end_character":24},"updated":"2018-06-16 18:19:12.000000000","message":"Is this method the same as the one at line #801? We just need one of them.","commit_id":"abe30406a14b52d773007249a8927cec91505c57"}]}
