)]}'
{"zun/container/docker/driver.py":[{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"c398d55289a3029b05963075816aa80a55c36813","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        if not nets:"},{"line_number":505,"context_line":"            raise exception.ZunException(_("},{"line_number":506,"context_line":"                \"There is no neutron network available\"))"},{"line_number":507,"context_line":"        return nets[0]"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def _get_or_create_docker_network(self, context, network_api,"},{"line_number":510,"context_line":"                                      neutron_net_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ffa3b31_865a834c","line":507,"range":{"start_line":507,"start_character":8,"end_line":507,"end_character":22},"updated":"2017-04-19 05:55:32.000000000","message":"I think it may return different network for two containers if new network is created in between. Do we need to handle this via sorting it by creation time or some other mechanism?","commit_id":"fb1ede474fc73cd63360205edb1adb417258105b"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"2c6efa691d745570c12675f5cd4ee711b1c9f667","unresolved":false,"context_lines":[{"line_number":504,"context_line":"        if not nets:"},{"line_number":505,"context_line":"            raise exception.ZunException(_("},{"line_number":506,"context_line":"                \"There is no neutron network available\"))"},{"line_number":507,"context_line":"        return nets[0]"},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def _get_or_create_docker_network(self, context, network_api,"},{"line_number":510,"context_line":"                                      neutron_net_id):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ffa3b31_bf02086e","line":507,"range":{"start_line":507,"start_character":8,"end_line":507,"end_character":22},"in_reply_to":"7ffa3b31_865a834c","updated":"2017-04-19 22:10:46.000000000","message":"Done","commit_id":"fb1ede474fc73cd63360205edb1adb417258105b"}],"zun/network/kuryr_network.py":[{"author":{"_account_id":8264,"name":"Shunli Zhou","username":"ShunliZhou"},"change_message_id":"336ab90088a1eae0fa5c85735013021ac4803111","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def list_networks(self, **kwargs):"},{"line_number":113,"context_line":"        return self.docker.networks(**kwargs)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def connect_container_to_network(self, container, network_name):"},{"line_number":116,"context_line":"        \"\"\"Connect container to the network"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        This method will create a neutron port, retrieve the ip address(es)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_ecb82cc9","line":115,"range":{"start_line":115,"start_character":54,"end_line":115,"end_character":66},"updated":"2017-04-18 08:34:35.000000000","message":"s/network_name/network_id/, actually it\u0027s the docker network id.","commit_id":"2d0d9b7305d98f1fde7fb112ae664cafd702bdd5"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"3f61174773eec84d968a4c64aa2f230c980f040e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def list_networks(self, **kwargs):"},{"line_number":113,"context_line":"        return self.docker.networks(**kwargs)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def connect_container_to_network(self, container, network_name):"},{"line_number":116,"context_line":"        \"\"\"Connect container to the network"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        This method will create a neutron port, retrieve the ip address(es)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_345be4f7","line":115,"range":{"start_line":115,"start_character":54,"end_line":115,"end_character":66},"in_reply_to":"7ffa3b31_ecb82cc9","updated":"2017-04-18 20:24:47.000000000","message":"Both network_name and network_id will work here. I chose network_name mainly for consistency across APIs: other network operations (delete_network, inspect_network, and  disconnect_container_from_network) are using network_name.\n\nI don\u0027t mind choosing network_id as an alternative. Then, we need to change all the network APIs from network_name to network_id for consistency. This option will work for me as well. I can change it if this is the preference of majority.","commit_id":"2d0d9b7305d98f1fde7fb112ae664cafd702bdd5"},{"author":{"_account_id":8264,"name":"Shunli Zhou","username":"ShunliZhou"},"change_message_id":"336ab90088a1eae0fa5c85735013021ac4803111","unresolved":false,"context_lines":[{"line_number":118,"context_line":"        This method will create a neutron port, retrieve the ip address(es)"},{"line_number":119,"context_line":"        of the port, and pass them to docker.connect_container_to_network."},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        network \u003d self.inspect_network(network_name)"},{"line_number":122,"context_line":"        neutron_net_id \u003d network[\u0027Options\u0027][\u0027neutron.net.uuid\u0027]"},{"line_number":123,"context_line":"        neutron_port \u003d self.neutron.create_port({\u0027port\u0027: {"},{"line_number":124,"context_line":"            \u0027network_id\u0027: neutron_net_id,"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_6ccc1c6a","line":121,"range":{"start_line":121,"start_character":39,"end_line":121,"end_character":51},"updated":"2017-04-18 08:34:35.000000000","message":"ditto","commit_id":"2d0d9b7305d98f1fde7fb112ae664cafd702bdd5"},{"author":{"_account_id":8264,"name":"Shunli Zhou","username":"ShunliZhou"},"change_message_id":"336ab90088a1eae0fa5c85735013021ac4803111","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            kwargs[\u0027ipv4_address\u0027] \u003d ipv4_address"},{"line_number":140,"context_line":"        if ipv6_address:"},{"line_number":141,"context_line":"            kwargs[\u0027ipv6_address\u0027] \u003d ipv6_address"},{"line_number":142,"context_line":"        self.docker.connect_container_to_network("},{"line_number":143,"context_line":"            container[\u0027Id\u0027], network_name, **kwargs)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def disconnect_container_from_network(self, container, network_name):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_4c7280e5","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":48},"updated":"2017-04-18 08:34:35.000000000","message":"when nova bind vm port to neutron, there is a event mechanism to wait the port up. Maybe we also should have to wait the port up.","commit_id":"2d0d9b7305d98f1fde7fb112ae664cafd702bdd5"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"3f61174773eec84d968a4c64aa2f230c980f040e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"            kwargs[\u0027ipv4_address\u0027] \u003d ipv4_address"},{"line_number":140,"context_line":"        if ipv6_address:"},{"line_number":141,"context_line":"            kwargs[\u0027ipv6_address\u0027] \u003d ipv6_address"},{"line_number":142,"context_line":"        self.docker.connect_container_to_network("},{"line_number":143,"context_line":"            container[\u0027Id\u0027], network_name, **kwargs)"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def disconnect_container_from_network(self, container, network_name):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7ffa3b31_f4221c52","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":48},"in_reply_to":"7ffa3b31_4c7280e5","updated":"2017-04-18 20:24:47.000000000","message":"This method call will be eventually handled by Kuryr-libnetwork and Kuryr has a config to wait for the port to become active: https://github.com/openstack/kuryr-libnetwork/blob/master/kuryr_libnetwork/controllers.py#L349 . This feature is disabled by default and admins need to tune this option to enable it: https://github.com/openstack/kuryr/blob/9583a26274e293c69eb38eece46524be2d0a373e/kuryr/lib/config.py#L51 .\n\nPersonally, I lean to leave it to Kuryr and rely on Kuryr to handle it properly.","commit_id":"2d0d9b7305d98f1fde7fb112ae664cafd702bdd5"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"c398d55289a3029b05963075816aa80a55c36813","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class KuryrNetwork(network.Network):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def init(self, context, docker_api):"},{"line_number":32,"context_line":"        self.context \u003d context"},{"line_number":33,"context_line":"        self.docker \u003d docker_api"},{"line_number":34,"context_line":"        self.neutron \u003d clients.OpenStackClients(context).neutron()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7ffa3b31_e857d501","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":30},"updated":"2017-04-19 05:55:32.000000000","message":"we are not using self.context, do we need this?","commit_id":"fb1ede474fc73cd63360205edb1adb417258105b"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"2c6efa691d745570c12675f5cd4ee711b1c9f667","unresolved":false,"context_lines":[{"line_number":29,"context_line":"class KuryrNetwork(network.Network):"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    def init(self, context, docker_api):"},{"line_number":32,"context_line":"        self.context \u003d context"},{"line_number":33,"context_line":"        self.docker \u003d docker_api"},{"line_number":34,"context_line":"        self.neutron \u003d clients.OpenStackClients(context).neutron()"},{"line_number":35,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7ffa3b31_7ff8007a","line":32,"range":{"start_line":32,"start_character":8,"end_line":32,"end_character":30},"in_reply_to":"7ffa3b31_e857d501","updated":"2017-04-19 22:10:46.000000000","message":"Done","commit_id":"fb1ede474fc73cd63360205edb1adb417258105b"}]}
