)]}'
{"etc/zun/policy.json":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b8a6acc2f7b75cf0a9e7b96fc6a3668b7b65041b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"host:get_all\": \"rule:admin_api\","},{"line_number":46,"context_line":"    \"host:get\": \"rule:admin_api\","},{"line_number":47,"context_line":"    \"capsule:create\": \"rule:default\","},{"line_number":48,"context_line":"    \"capsule:delete\": \"rule:admin_or_user\","},{"line_number":49,"context_line":"    \"capsule:get\": \"rule:default\","},{"line_number":50,"context_line":"    \"capsule:get_all\": \"rule:default\""},{"line_number":51,"context_line":"}"}],"source_content_type":"application/json","patch_set":11,"id":"9f436f4f_157a8223","line":48,"range":{"start_line":48,"start_character":28,"end_line":48,"end_character":41},"updated":"2017-08-08 16:29:28.000000000","message":"First, it seems there is no rule called \u0027admin_or_user\u0027. Second, it is better to separate capsule:delete and capsule:delete_all_tenants.","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"d3fe8291fa43535a70ca88ff36cd51b48d0c11e8","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    \"host:get_all\": \"rule:admin_api\","},{"line_number":46,"context_line":"    \"host:get\": \"rule:admin_api\","},{"line_number":47,"context_line":"    \"capsule:create\": \"rule:default\","},{"line_number":48,"context_line":"    \"capsule:delete\": \"rule:admin_or_user\","},{"line_number":49,"context_line":"    \"capsule:get\": \"rule:default\","},{"line_number":50,"context_line":"    \"capsule:get_all\": \"rule:default\""},{"line_number":51,"context_line":"}"}],"source_content_type":"application/json","patch_set":11,"id":"9f436f4f_36fafe74","line":48,"range":{"start_line":48,"start_character":28,"end_line":48,"end_character":41},"in_reply_to":"9f436f4f_157a8223","updated":"2017-08-10 09:56:01.000000000","message":"Done","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"}],"zun/api/controllers/experimental/capsules.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b8a6acc2f7b75cf0a9e7b96fc6a3668b7b65041b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        containers_spec \u003d utils.check_capsule_template(capsules_spec)"},{"line_number":105,"context_line":"        capsule_dict[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":106,"context_line":"        new_capsule \u003d objects.Capsule(context, **capsule_dict)"},{"line_number":107,"context_line":"        new_capsule.create(context)"},{"line_number":108,"context_line":"        new_capsule.project_id \u003d context.project_id"},{"line_number":109,"context_line":"        new_capsule.user_id \u003d context.user_id"},{"line_number":110,"context_line":"        new_capsule.containers \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_ea8ddd7b","line":107,"range":{"start_line":107,"start_character":20,"end_line":107,"end_character":26},"updated":"2017-08-08 16:29:28.000000000","message":"Could we set the project_id and user_id before persisting capsule into DB in here?","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"d3fe8291fa43535a70ca88ff36cd51b48d0c11e8","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        containers_spec \u003d utils.check_capsule_template(capsules_spec)"},{"line_number":105,"context_line":"        capsule_dict[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":106,"context_line":"        new_capsule \u003d objects.Capsule(context, **capsule_dict)"},{"line_number":107,"context_line":"        new_capsule.create(context)"},{"line_number":108,"context_line":"        new_capsule.project_id \u003d context.project_id"},{"line_number":109,"context_line":"        new_capsule.user_id \u003d context.user_id"},{"line_number":110,"context_line":"        new_capsule.containers \u003d []"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_b6d38e38","line":107,"range":{"start_line":107,"start_character":20,"end_line":107,"end_character":26},"in_reply_to":"9f436f4f_ea8ddd7b","updated":"2017-08-10 09:56:01.000000000","message":"Done","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b8a6acc2f7b75cf0a9e7b96fc6a3668b7b65041b","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                capsule_dict[\u0027uuid\u0027])"},{"line_number":139,"context_line":"            container_dict[\u0027name\u0027] \u003d name"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            if container_dict.get(\u0027args\u0027, None) and \\"},{"line_number":142,"context_line":"                    container_dict.get(\u0027command\u0027, None):"},{"line_number":143,"context_line":"                container_dict \u003d self._transfer_list_to_str(container_dict,"},{"line_number":144,"context_line":"                                                            \u0027command\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_ca0459c9","line":141,"range":{"start_line":141,"start_character":42,"end_line":141,"end_character":46},"updated":"2017-08-08 16:29:28.000000000","message":"nit: this can be removed since the default value is None: https://docs.python.org/2/library/stdtypes.html#dict.get .","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"d3fe8291fa43535a70ca88ff36cd51b48d0c11e8","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                capsule_dict[\u0027uuid\u0027])"},{"line_number":139,"context_line":"            container_dict[\u0027name\u0027] \u003d name"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"            if container_dict.get(\u0027args\u0027, None) and \\"},{"line_number":142,"context_line":"                    container_dict.get(\u0027command\u0027, None):"},{"line_number":143,"context_line":"                container_dict \u003d self._transfer_list_to_str(container_dict,"},{"line_number":144,"context_line":"                                                            \u0027command\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_56ea22ac","line":141,"range":{"start_line":141,"start_character":42,"end_line":141,"end_character":46},"in_reply_to":"9f436f4f_ca0459c9","updated":"2017-08-10 09:56:01.000000000","message":"Done","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b8a6acc2f7b75cf0a9e7b96fc6a3668b7b65041b","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                container_dict.pop(\u0027args\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # NOTE(kevinz): Don\u0027t support pod remapping, will find a"},{"line_number":160,"context_line":"            # easy way to implement thie."},{"line_number":161,"context_line":"            # if container need to open some port, just open it in container,"},{"line_number":162,"context_line":"            # user can change the security group and getting access to port."},{"line_number":163,"context_line":"            if container_dict.get(\u0027ports\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_cad21935","line":160,"range":{"start_line":160,"start_character":36,"end_line":160,"end_character":40},"updated":"2017-08-08 16:29:28.000000000","message":"typo","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"d3fe8291fa43535a70ca88ff36cd51b48d0c11e8","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                container_dict.pop(\u0027args\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # NOTE(kevinz): Don\u0027t support pod remapping, will find a"},{"line_number":160,"context_line":"            # easy way to implement thie."},{"line_number":161,"context_line":"            # if container need to open some port, just open it in container,"},{"line_number":162,"context_line":"            # user can change the security group and getting access to port."},{"line_number":163,"context_line":"            if container_dict.get(\u0027ports\u0027):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_96d64a27","line":160,"range":{"start_line":160,"start_character":36,"end_line":160,"end_character":40},"in_reply_to":"9f436f4f_cad21935","updated":"2017-08-10 09:56:01.000000000","message":"Done","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":23365,"name":"feng.shengqin","email":"feng.shengqin@zte.com.cn","username":"FengShengqin"},"change_message_id":"d2d60fc2a05ddcad95542fb8c3c7869d0c7ac878","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        new_capsule.containers.append(sandbox_container)"},{"line_number":132,"context_line":"        new_capsule.containers_uuids.append(sandbox_container.uuid)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        for k in range(0, count):"},{"line_number":135,"context_line":"            container_dict \u003d containers_spec[k]"},{"line_number":136,"context_line":"            container_dict[\u0027project_id\u0027] \u003d context.project_id"},{"line_number":137,"context_line":"            container_dict[\u0027user_id\u0027] \u003d context.user_id"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_cfde0210","line":134,"range":{"start_line":134,"start_character":17,"end_line":134,"end_character":32},"updated":"2017-08-15 08:14:47.000000000","message":"range(count) works well too.","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"83ccca9c6a71e3b57a3b68cdd0673c53980a4237","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        new_capsule.containers.append(sandbox_container)"},{"line_number":132,"context_line":"        new_capsule.containers_uuids.append(sandbox_container.uuid)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        for k in range(0, count):"},{"line_number":135,"context_line":"            container_dict \u003d containers_spec[k]"},{"line_number":136,"context_line":"            container_dict[\u0027project_id\u0027] \u003d context.project_id"},{"line_number":137,"context_line":"            container_dict[\u0027user_id\u0027] \u003d context.user_id"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_c5d3835f","line":134,"range":{"start_line":134,"start_character":17,"end_line":134,"end_character":32},"in_reply_to":"9f436f4f_cfde0210","updated":"2017-08-15 08:56:10.000000000","message":"Done","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":23365,"name":"feng.shengqin","email":"feng.shengqin@zte.com.cn","username":"FengShengqin"},"change_message_id":"d2d60fc2a05ddcad95542fb8c3c7869d0c7ac878","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                container_dict.pop(\u0027args\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # NOTE(kevinz): Don\u0027t support pod remapping, will find a"},{"line_number":160,"context_line":"            # easy way to implement the."},{"line_number":161,"context_line":"            # if container need to open some port, just open it in container,"},{"line_number":162,"context_line":"            # user can change the security group and getting access to port."},{"line_number":163,"context_line":"            if container_dict.get(\u0027ports\u0027):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_ec7af4b7","line":160,"range":{"start_line":160,"start_character":36,"end_line":160,"end_character":39},"updated":"2017-08-15 08:14:47.000000000","message":"the?","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"5100ecf12011acb1823b917a9d1ad91f02abca50","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                container_dict.pop(\u0027args\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # NOTE(kevinz): Don\u0027t support pod remapping, will find a"},{"line_number":160,"context_line":"            # easy way to implement the."},{"line_number":161,"context_line":"            # if container need to open some port, just open it in container,"},{"line_number":162,"context_line":"            # user can change the security group and getting access to port."},{"line_number":163,"context_line":"            if container_dict.get(\u0027ports\u0027):"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_eaead4d5","line":160,"range":{"start_line":160,"start_character":36,"end_line":160,"end_character":39},"in_reply_to":"9f436f4f_ec7af4b7","updated":"2017-08-15 08:55:06.000000000","message":"Done","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"}],"zun/common/utils.py":[{"author":{"_account_id":23365,"name":"feng.shengqin","email":"feng.shengqin@zte.com.cn","username":"FengShengqin"},"change_message_id":"d2d60fc2a05ddcad95542fb8c3c7869d0c7ac878","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"def check_capsule_template(tpl):"},{"line_number":319,"context_line":"    # TODO(kevinz): add volume spec check"},{"line_number":320,"context_line":"    if tpl.get(\u0027kind\u0027, None) !\u003d \u0027capsule\u0027:"},{"line_number":321,"context_line":"        raise exception.InvalidCapsuleTemplate(\"kind fields need to \""},{"line_number":322,"context_line":"                                               \"be set as capsule\")"},{"line_number":323,"context_line":"    spec_field \u003d tpl.get(\u0027spec\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_6cb4c4d1","line":320,"range":{"start_line":320,"start_character":33,"end_line":320,"end_character":40},"updated":"2017-08-15 08:14:47.000000000","message":"Would we define this kind as \"Capsule\"?\nk8s defines Pod,Sevices,Deployment,et, and uppercase the first letter.","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"5100ecf12011acb1823b917a9d1ad91f02abca50","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"def check_capsule_template(tpl):"},{"line_number":319,"context_line":"    # TODO(kevinz): add volume spec check"},{"line_number":320,"context_line":"    if tpl.get(\u0027kind\u0027, None) !\u003d \u0027capsule\u0027:"},{"line_number":321,"context_line":"        raise exception.InvalidCapsuleTemplate(\"kind fields need to \""},{"line_number":322,"context_line":"                                               \"be set as capsule\")"},{"line_number":323,"context_line":"    spec_field \u003d tpl.get(\u0027spec\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_4a40c0a5","line":320,"range":{"start_line":320,"start_character":33,"end_line":320,"end_character":40},"in_reply_to":"9f436f4f_6cb4c4d1","updated":"2017-08-15 08:55:06.000000000","message":"Aha, good point.\nI think it will be better to support both uppercase and lowercase. So that it make more friendly to user","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":23365,"name":"feng.shengqin","email":"feng.shengqin@zte.com.cn","username":"FengShengqin"},"change_message_id":"d2d60fc2a05ddcad95542fb8c3c7869d0c7ac878","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    if tpl.get(\u0027kind\u0027, None) !\u003d \u0027capsule\u0027:"},{"line_number":321,"context_line":"        raise exception.InvalidCapsuleTemplate(\"kind fields need to \""},{"line_number":322,"context_line":"                                               \"be set as capsule\")"},{"line_number":323,"context_line":"    spec_field \u003d tpl.get(\u0027spec\u0027, None)"},{"line_number":324,"context_line":"    if spec_field.get(\u0027containers\u0027, None) is None:"},{"line_number":325,"context_line":"        raise exception.InvalidCapsuleTemplate(\"No valid containers field\")"},{"line_number":326,"context_line":"    containers_spec \u003d spec_field.get(\u0027containers\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_2c26bc16","line":323,"range":{"start_line":323,"start_character":4,"end_line":323,"end_character":14},"updated":"2017-08-15 08:14:47.000000000","message":"when spec_field is None, it would raise exception.","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"5100ecf12011acb1823b917a9d1ad91f02abca50","unresolved":false,"context_lines":[{"line_number":320,"context_line":"    if tpl.get(\u0027kind\u0027, None) !\u003d \u0027capsule\u0027:"},{"line_number":321,"context_line":"        raise exception.InvalidCapsuleTemplate(\"kind fields need to \""},{"line_number":322,"context_line":"                                               \"be set as capsule\")"},{"line_number":323,"context_line":"    spec_field \u003d tpl.get(\u0027spec\u0027, None)"},{"line_number":324,"context_line":"    if spec_field.get(\u0027containers\u0027, None) is None:"},{"line_number":325,"context_line":"        raise exception.InvalidCapsuleTemplate(\"No valid containers field\")"},{"line_number":326,"context_line":"    containers_spec \u003d spec_field.get(\u0027containers\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9f436f4f_aa95ec34","line":323,"range":{"start_line":323,"start_character":4,"end_line":323,"end_character":14},"in_reply_to":"9f436f4f_2c26bc16","updated":"2017-08-15 08:55:06.000000000","message":"Done","commit_id":"eaa229c07d9cf0d521813129225cb0dda29e72dc"}],"zun/compute/api.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b2dd95d9fa8c15ca67c0bf571c92bd7719338b9c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            new_capsule.save(context)"},{"line_number":146,"context_line":"            return"},{"line_number":147,"context_line":"        self.rpcapi.capsule_create(context, host_state[\u0027host\u0027], new_capsule,"},{"line_number":148,"context_line":"                                   host_state[\u0027limits\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_d76379b0","line":148,"range":{"start_line":148,"start_character":35,"end_line":148,"end_character":45},"updated":"2017-08-11 14:19:52.000000000","message":"This needs an update due to the addition of requested_networks parameters.","commit_id":"827fc1ab01fedde336e2b120cef881b0112edebf"}],"zun/compute/manager.py":[{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"a812688a8c622a8f8b46e81b60512cd60a63b2a0","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            return"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        if self.use_sandbox:"},{"line_number":104,"context_line":"            if container.set_sandbox_id(\"sandbox_id\") is None:"},{"line_number":105,"context_line":"                sandbox \u003d self._create_sandbox(context, container,"},{"line_number":106,"context_line":"                                               requested_networks, reraise)"},{"line_number":107,"context_line":"                if sandbox is None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df3967d1_1255c5c6","line":104,"range":{"start_line":104,"start_character":12,"end_line":104,"end_character":62},"updated":"2017-08-01 09:40:59.000000000","message":"container.set_sandbox_id doesn\u0027t return anything so this check is unnecessary.","commit_id":"716ad6a2b378a774e38c6b24f9ebccbb0e5d74a2"},{"author":{"_account_id":22406,"name":"Kien Nguyen","email":"kiennt2609@gmail.com","username":"kiennt"},"change_message_id":"d23ef40ba378969d741ff23c523a0371f70ac8de","unresolved":false,"context_lines":[{"line_number":677,"context_line":"                    return"},{"line_number":678,"context_line":"                except Exception:"},{"line_number":679,"context_line":"                    return"},{"line_number":680,"context_line":"    "},{"line_number":681,"context_line":"    def capsule_create(self, context, capsule, limits):"},{"line_number":682,"context_line":"        utils.spawn_n(self._do_capsule_create, context, capsule, limits)"},{"line_number":683,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"df3967d1_7e14dd4e","line":680,"range":{"start_line":680,"start_character":0,"end_line":680,"end_character":4},"updated":"2017-08-01 09:30:02.000000000","message":"blank line contains whitespace","commit_id":"716ad6a2b378a774e38c6b24f9ebccbb0e5d74a2"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"b8a6acc2f7b75cf0a9e7b96fc6a3668b7b65041b","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        for k in range(1, count):"},{"line_number":700,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":701,"context_line":"            created_container \u003d \\"},{"line_number":702,"context_line":"                self._do_container_create(context,"},{"line_number":703,"context_line":"                                          capsule.containers[k],"},{"line_number":704,"context_line":"                                          requested_networks,"},{"line_number":705,"context_line":"                                          sandbox,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_5b13990e","line":702,"range":{"start_line":702,"start_character":21,"end_line":702,"end_character":41},"updated":"2017-08-08 16:29:28.000000000","message":"The method _do_coontainer_create is doing two things:\n\n1. Create a sandbox if needed\n2. Create a container\n\nIt seems what you need is #2 (not #1). Then, how about further refactor the code. For example, you could create a method A for doing #2. Then, have both _do_container_create and _do_capsule_create call the method A instead?","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"d3fe8291fa43535a70ca88ff36cd51b48d0c11e8","unresolved":false,"context_lines":[{"line_number":699,"context_line":"        for k in range(1, count):"},{"line_number":700,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":701,"context_line":"            created_container \u003d \\"},{"line_number":702,"context_line":"                self._do_container_create(context,"},{"line_number":703,"context_line":"                                          capsule.containers[k],"},{"line_number":704,"context_line":"                                          requested_networks,"},{"line_number":705,"context_line":"                                          sandbox,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_da062c87","line":702,"range":{"start_line":702,"start_character":21,"end_line":702,"end_character":41},"in_reply_to":"9f436f4f_5b13990e","updated":"2017-08-10 09:56:01.000000000","message":"Good point ~ I will do","commit_id":"6ccdfb906d71a5613772eb427775d9c7ec9f7bca"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"90d851556b54aa63a4b1c9957ca2bcfae175925d","unresolved":false,"context_lines":[{"line_number":696,"context_line":"        capsule.containers[0].save(context)"},{"line_number":697,"context_line":"        sandbox \u003d self._create_sandbox(context,"},{"line_number":698,"context_line":"                                       capsule.containers[0],"},{"line_number":699,"context_line":"                                       reraise)"},{"line_number":700,"context_line":"        self._update_task_state(context, capsule.containers[0], None)"},{"line_number":701,"context_line":"        capsule.containers[0].status \u003d consts.RUNNING"},{"line_number":702,"context_line":"        capsule.containers[0].save(context)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_6cf1b6cd","line":699,"range":{"start_line":699,"start_character":39,"end_line":699,"end_character":46},"updated":"2017-08-11 02:54:54.000000000","message":"The parameter is unmatched. The third parameter needs to be requested_networks.","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"71ea390bf711cc9ef326ac3e36b07fd67a4d651e","unresolved":false,"context_lines":[{"line_number":696,"context_line":"        capsule.containers[0].save(context)"},{"line_number":697,"context_line":"        sandbox \u003d self._create_sandbox(context,"},{"line_number":698,"context_line":"                                       capsule.containers[0],"},{"line_number":699,"context_line":"                                       reraise)"},{"line_number":700,"context_line":"        self._update_task_state(context, capsule.containers[0], None)"},{"line_number":701,"context_line":"        capsule.containers[0].status \u003d consts.RUNNING"},{"line_number":702,"context_line":"        capsule.containers[0].save(context)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_dbb28de6","line":699,"range":{"start_line":699,"start_character":39,"end_line":699,"end_character":46},"in_reply_to":"9f436f4f_6cf1b6cd","updated":"2017-08-11 09:46:30.000000000","message":"Done","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"90d851556b54aa63a4b1c9957ca2bcfae175925d","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        capsule.containers[0].save(context)"},{"line_number":703,"context_line":"        sandbox_id \u003d capsule.containers[0].get_sandbox_id()"},{"line_number":704,"context_line":"        count \u003d len(capsule.containers)"},{"line_number":705,"context_line":"        requested_networks \u003d None"},{"line_number":706,"context_line":"        for k in range(1, count):"},{"line_number":707,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":708,"context_line":"            capsule.containers[k].addresses \u003d capsule.containers[0].addresses"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_0cc0ea4f","line":705,"range":{"start_line":705,"start_character":29,"end_line":705,"end_character":33},"updated":"2017-08-11 02:54:54.000000000","message":"I don\u0027t think None will work. It needs to be a dict that containers either a \u0027network\u0027 or \u0027port\u0027. Ideally, this parameter should be passed down by zun-api.","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"f37af464f7fc2ca1d468fc36795d0548d043fa66","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        capsule.containers[0].save(context)"},{"line_number":703,"context_line":"        sandbox_id \u003d capsule.containers[0].get_sandbox_id()"},{"line_number":704,"context_line":"        count \u003d len(capsule.containers)"},{"line_number":705,"context_line":"        requested_networks \u003d None"},{"line_number":706,"context_line":"        for k in range(1, count):"},{"line_number":707,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":708,"context_line":"            capsule.containers[k].addresses \u003d capsule.containers[0].addresses"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_38175ff0","line":705,"range":{"start_line":705,"start_character":29,"end_line":705,"end_character":33},"in_reply_to":"9f436f4f_0cc0ea4f","updated":"2017-08-11 09:17:37.000000000","message":"Hi Hongbin,\nActually I find that the requested_networks: requested_networks \u003d container_dict.get(\u0027nets\u0027, [])\n\nI wonder the nets represent what thing? A sub-network that already exist? Or an PORT that already created?\n\nFor capsule, I think only the sandbox container can choose to join an exist net or port, for functional container, it\u0027s better to forbid it.","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":22076,"name":"Kevin Zhao","email":"kevin.zhao@linaro.org","username":"KevinZhao"},"change_message_id":"71ea390bf711cc9ef326ac3e36b07fd67a4d651e","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        capsule.containers[0].save(context)"},{"line_number":703,"context_line":"        sandbox_id \u003d capsule.containers[0].get_sandbox_id()"},{"line_number":704,"context_line":"        count \u003d len(capsule.containers)"},{"line_number":705,"context_line":"        requested_networks \u003d None"},{"line_number":706,"context_line":"        for k in range(1, count):"},{"line_number":707,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":708,"context_line":"            capsule.containers[k].addresses \u003d capsule.containers[0].addresses"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_bbb589cf","line":705,"range":{"start_line":705,"start_character":29,"end_line":705,"end_character":33},"in_reply_to":"9f436f4f_38175ff0","updated":"2017-08-11 09:46:30.000000000","message":"@Hongbin,\nI\u0027ve add a requested_networks by getting from the spec. And for one capsule, it has an requested_networks, which will be passed from API to compute","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"53fb9a4023cba49fa3f778a3ba80b194ccbd3a23","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        capsule.containers[0].save(context)"},{"line_number":703,"context_line":"        sandbox_id \u003d capsule.containers[0].get_sandbox_id()"},{"line_number":704,"context_line":"        count \u003d len(capsule.containers)"},{"line_number":705,"context_line":"        requested_networks \u003d None"},{"line_number":706,"context_line":"        for k in range(1, count):"},{"line_number":707,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":708,"context_line":"            capsule.containers[k].addresses \u003d capsule.containers[0].addresses"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_128eafcf","line":705,"range":{"start_line":705,"start_character":29,"end_line":705,"end_character":33},"in_reply_to":"9f436f4f_38175ff0","updated":"2017-08-11 15:05:19.000000000","message":"Hi Kevin,\n\nHere is the details about the \u0027nets\u0027 parameter. First, this parameter is optional. If it is unspecified, Zun will find an existing neutron network and boot container from it. Second, users can specify an existing port by setting \u0027nets\u0027 as [{\u0027port\u0027: \u0027\u003cport_id_or_name\u003e\u0027}]. Then, Zun will boot a container by using that port. Third, users can specify an existing neutron network [1] by setting \u0027nets\u0027 as [{\u0027netowrk\u0027: \u0027\u003cneutron_net_id_or_name\u003e\u0027}]. Then, Zun will boot a container in that network. Lastly, the \u0027nets\u0027 parameter is a list. That means users can boot a container from multiple networks/ports by giving [{\u0027network\u0027, ...}, {\u0027network\u0027, ...}, ...]\n\nFor capsule, I think you can apply this parameter to the infra container as you did in the latest patchset :).\n\n[1] https://review.openstack.org/#/c/491123/","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"53fb9a4023cba49fa3f778a3ba80b194ccbd3a23","unresolved":false,"context_lines":[{"line_number":702,"context_line":"        capsule.containers[0].save(context)"},{"line_number":703,"context_line":"        sandbox_id \u003d capsule.containers[0].get_sandbox_id()"},{"line_number":704,"context_line":"        count \u003d len(capsule.containers)"},{"line_number":705,"context_line":"        requested_networks \u003d None"},{"line_number":706,"context_line":"        for k in range(1, count):"},{"line_number":707,"context_line":"            capsule.containers[k].set_sandbox_id(sandbox_id)"},{"line_number":708,"context_line":"            capsule.containers[k].addresses \u003d capsule.containers[0].addresses"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_d2c147e6","line":705,"range":{"start_line":705,"start_character":29,"end_line":705,"end_character":33},"in_reply_to":"9f436f4f_bbb589cf","updated":"2017-08-11 15:05:19.000000000","message":"Yes, I like this approach.","commit_id":"6f9324a3ca4f0fbff59444362678611594c5041d"}]}
