)]}'
{"openstackclient/network/v2/port.py":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"a061db579da0ae572387295611ca85eea62b893a","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":387,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":388,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":389,"context_line":"            attrs[\u0027binding:profile\u0027].update(getattr(obj, \u0027binding:profile\u0027))"},{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_0f30eb06","line":389,"updated":"2016-04-08 12:47:18.000000000","message":"You can use obj.binding_profile here.","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"1b14ac9f9944ccf052f2d916b747f179dfb452e0","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":387,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":388,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":389,"context_line":"            attrs[\u0027binding:profile\u0027].update(getattr(obj, \u0027binding:profile\u0027))"},{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a18252c_b7c4805f","line":389,"in_reply_to":"7a1b2928_60ba42e3","updated":"2016-04-13 06:14:40.000000000","message":"+1\n\nPlease refer to the file openstack/network/v2/port.py in sdk. The Port class translates binding:xxx to bind_xxx, I think.","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"ad333516f826e22a2aefcd076b9af1fdd2385910","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":387,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":388,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":389,"context_line":"            attrs[\u0027binding:profile\u0027].update(getattr(obj, \u0027binding:profile\u0027))"},{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_60ba42e3","line":389,"in_reply_to":"7a1b2928_d0e86419","updated":"2016-04-11 14:13:31.000000000","message":"Please double-check because I do see the property in the SDK Port resource.","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"12f070e34534e8b42ecf116fbdc020dbf76d9840","unresolved":false,"context_lines":[{"line_number":386,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":387,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":388,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":389,"context_line":"            attrs[\u0027binding:profile\u0027].update(getattr(obj, \u0027binding:profile\u0027))"},{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_d0e86419","line":389,"in_reply_to":"9a061dce_0f30eb06","updated":"2016-04-11 02:47:49.000000000","message":"I dont think obj.binding_profile exists actually","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"a061db579da0ae572387295611ca85eea62b893a","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_5208c828","line":393,"updated":"2016-04-08 12:47:18.000000000","message":"Why doesn\u0027t this use obj.fixed_ips as-is?","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"ad333516f826e22a2aefcd076b9af1fdd2385910","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_2077aa3b","line":393,"in_reply_to":"7a1b2928_b0ede827","updated":"2016-04-11 14:13:31.000000000","message":"I would be helpful to add a comment about the append problem and why it must be done this way.  I guess, I still don\u0027t understand.","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"12f070e34534e8b42ecf116fbdc020dbf76d9840","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_b0ede827","line":393,"in_reply_to":"9a061dce_5208c828","updated":"2016-04-11 02:47:49.000000000","message":"the list was not appending properly as required and displayed by neutronclient ( I created the tests based on the outputs currently demonstrated by neutronclient for openstackclient), thats why I used this code","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"877271fed09ecab4cd44bd8e52b91403ee662083","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a18252c_cdffc865","line":393,"updated":"2016-04-13 15:42:56.000000000","message":"Why not include everything already in the list?","commit_id":"e5657eca6b5c529ac21fbab40fc253c03e0f3fe7"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"216954602f96376b7ce7609018a6e58f698a8ec7","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a122d0e_8b26b314","line":393,"in_reply_to":"5a18252c_21b9ce15","updated":"2016-04-15 15:23:38.000000000","message":"I appears that router \"routes\" are handled differently and they are a list of dicts.  Oh well, so much for consistency in the API.","commit_id":"e5657eca6b5c529ac21fbab40fc253c03e0f3fe7"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"3ba062cc41b2f1ef19b34d3b66d6054caa8c75fa","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a18252c_21b9ce15","line":393,"in_reply_to":"5a18252c_8c047b18","updated":"2016-04-15 00:22:54.000000000","message":"Actually if port-create does not create fixed_ip, the fixed_ip is left as [{}], which is the default.\nSame goes for other such similar fields which are a complex data structure( list of dicts  and all)","commit_id":"e5657eca6b5c529ac21fbab40fc253c03e0f3fe7"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"b7e46dc424a93c1f75770fc1179419ff8b2999ee","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a18252c_8c047b18","line":393,"in_reply_to":"5a18252c_bdb1c891","updated":"2016-04-14 13:25:32.000000000","message":"Thanks for the explanation Reedip.  It sure is odd that neutron does this.","commit_id":"e5657eca6b5c529ac21fbab40fc253c03e0f3fe7"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"c1b3559f134c14fbc0e53d86e29d4bfb4f19d000","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":391,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":392,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":393,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":394,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":395,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":396,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a18252c_bdb1c891","line":393,"in_reply_to":"5a18252c_cdffc865","updated":"2016-04-14 00:28:10.000000000","message":"Example:\na) User sets some fixed_ip 10.0.0.2 during port create\nobj.fixed_ips \u003d [{\"ip_address\": \"10.0.0.2\"}]\nb) User clears this information using --no-fixed-ip\nobj.fixed_ips \u003d [{}]\nc)User passes --fixed-ip ip\u003d10.0.0.1\nattrs[\u0027fixed_ips\u0027] becomes 10.0.0.1\nIf I add the list directly\nattrs[\u0027fixed_ips\u0027] \u003d [{\"ip_address\": \"10.0.0.2\"}, {} ]\n\nTo fix this condition, I used the for loop","commit_id":"e5657eca6b5c529ac21fbab40fc253c03e0f3fe7"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"a110d0f6a15e12ede2a72515833e2acb33d3dc48","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            # When user unsets the fixed_ips, obj.fixed_ips \u003d [{}]."},{"line_number":394,"context_line":"            # Adding the obj.fixed_ips list to attrs[\u0027fixed_ips\u0027]"},{"line_number":395,"context_line":"            # would therefore add an empty dictionary, while we need"},{"line_number":396,"context_line":"            # to append the attrs[\u0027fixed_ips\u0027] iff there is some info"},{"line_number":397,"context_line":"            # in the obj.fixed_ips. Therefore I have opted for this `for` loop"},{"line_number":398,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":399,"context_line":"        elif parsed_args.no_fixed_ip:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_62f01f68","line":396,"range":{"start_line":396,"start_character":49,"end_line":396,"end_character":50},"updated":"2016-04-14 08:52:18.000000000","message":"Redundant \u0027f\u0027.","commit_id":"c92ac9d9110524ffb4c672a5b1c3cdc08e38e717"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"89d42e3bbb52d6a7a67d578357d41141b3a6a4ed","unresolved":false,"context_lines":[{"line_number":393,"context_line":"            # When user unsets the fixed_ips, obj.fixed_ips \u003d [{}]."},{"line_number":394,"context_line":"            # Adding the obj.fixed_ips list to attrs[\u0027fixed_ips\u0027]"},{"line_number":395,"context_line":"            # would therefore add an empty dictionary, while we need"},{"line_number":396,"context_line":"            # to append the attrs[\u0027fixed_ips\u0027] iff there is some info"},{"line_number":397,"context_line":"            # in the obj.fixed_ips. Therefore I have opted for this `for` loop"},{"line_number":398,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":399,"context_line":"        elif parsed_args.no_fixed_ip:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_41904a95","line":396,"range":{"start_line":396,"start_character":49,"end_line":396,"end_character":50},"in_reply_to":"5a18252c_62f01f68","updated":"2016-04-15 00:20:41.000000000","message":"Its not, \n\"If and only if\" is abbreviated to iff , specially used in Mathematics ( I loved maths in my school days, so this lingered on)\nReference: https://en.wikipedia.org/wiki/If_and_only_if","commit_id":"c92ac9d9110524ffb4c672a5b1c3cdc08e38e717"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"a110d0f6a15e12ede2a72515833e2acb33d3dc48","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            # would therefore add an empty dictionary, while we need"},{"line_number":396,"context_line":"            # to append the attrs[\u0027fixed_ips\u0027] iff there is some info"},{"line_number":397,"context_line":"            # in the obj.fixed_ips. Therefore I have opted for this `for` loop"},{"line_number":398,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":399,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":400,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_022b2b95","line":398,"range":{"start_line":398,"start_character":34,"end_line":398,"end_character":68},"updated":"2016-04-14 08:52:18.000000000","message":"So, this loop is to avoid adding empty dict {} to fixed_ips, right ?  If so, how about just check if fixed_ips is empty or containing an empty dict ?  This loop is a little difficult to read.","commit_id":"c92ac9d9110524ffb4c672a5b1c3cdc08e38e717"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"89d42e3bbb52d6a7a67d578357d41141b3a6a4ed","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            # would therefore add an empty dictionary, while we need"},{"line_number":396,"context_line":"            # to append the attrs[\u0027fixed_ips\u0027] iff there is some info"},{"line_number":397,"context_line":"            # in the obj.fixed_ips. Therefore I have opted for this `for` loop"},{"line_number":398,"context_line":"            attrs[\u0027fixed_ips\u0027] +\u003d [ip for ip in obj.fixed_ips if ip]"},{"line_number":399,"context_line":"        elif parsed_args.no_fixed_ip:"},{"line_number":400,"context_line":"            attrs[\u0027fixed_ips\u0027] \u003d []"},{"line_number":401,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a18252c_c1f29a05","line":398,"range":{"start_line":398,"start_character":34,"end_line":398,"end_character":68},"in_reply_to":"5a18252c_022b2b95","updated":"2016-04-15 00:20:41.000000000","message":"Actually this is more in line with a List-comprehension in python.\nI think I would favor this over a simpler method to allow others to understand and use this login in their own code as well.\nSure its difficult at first, but knowing that Python has this power allows for a shorter and much quicker code generation.","commit_id":"c92ac9d9110524ffb4c672a5b1c3cdc08e38e717"}],"openstackclient/tests/network/v2/test_port.py":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"a061db579da0ae572387295611ca85eea62b893a","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        self.network.update_port.assert_called_once_with(self._port, **attrs)"},{"line_number":295,"context_line":"        self.assertIsNone(result)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_append_fixed_ip(self):"},{"line_number":298,"context_line":"        _testport \u003d network_fakes.FakePort.create_one_port("},{"line_number":299,"context_line":"            {\u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00270.0.0.1\u0027}]})"},{"line_number":300,"context_line":"        self.network.find_port \u003d mock.Mock(return_value\u003d_testport)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a061dce_327274ae","line":297,"updated":"2016-04-08 12:47:18.000000000","message":"I think this should test binding profile too.","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"12f070e34534e8b42ecf116fbdc020dbf76d9840","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        self.network.update_port.assert_called_once_with(self._port, **attrs)"},{"line_number":295,"context_line":"        self.assertIsNone(result)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def test_append_fixed_ip(self):"},{"line_number":298,"context_line":"        _testport \u003d network_fakes.FakePort.create_one_port("},{"line_number":299,"context_line":"            {\u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00270.0.0.1\u0027}]})"},{"line_number":300,"context_line":"        self.network.find_port \u003d mock.Mock(return_value\u003d_testport)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a1b2928_10f3fc0b","line":297,"in_reply_to":"9a061dce_327274ae","updated":"2016-04-11 02:47:49.000000000","message":"Sure, will add it in the next iteration","commit_id":"e7ac85ad9e2d3f17a37d22ce311dfb170bdd6998"}]}
