)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"3bdee868e6f1e6c497400eb07b8ca92a3f0cb3cb","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Reedip \u003creedip.banerjee@nectechnologies.in\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-23 11:53:08 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add overwrite option to ``osc port set``"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The overwrite option allows user to overwrite either the"},{"line_number":10,"context_line":"binding-profile or the fixed-ips of a specific port."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bab6814e_41230756","line":7,"updated":"2016-05-23 17:57:14.000000000","message":"Please update commit message to reflect the changes.","commit_id":"6bff463c90739c306fe3d6324f251ec70731297e"}],"doc/source/command-objects/port.rst":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"a04b10da8389a36e10117a351a22c3088b7a7a69","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        [--host \u003chost-id\u003e]"},{"line_number":132,"context_line":"        [--enable | --disable]"},{"line_number":133,"context_line":"        [--name \u003cname\u003e]"},{"line_number":134,"context_line":"        [--overwrite]"},{"line_number":135,"context_line":"        \u003cport\u003e"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_85aa1018","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":21},"updated":"2016-05-18 07:31:05.000000000","message":"please update document according to latest implement.","commit_id":"293256d21fa64b2468f2631ec0a6e946145003d1"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"5952983b8e55e2154961db9ab0f52a2960a101d9","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        [--host \u003chost-id\u003e]"},{"line_number":132,"context_line":"        [--enable | --disable]"},{"line_number":133,"context_line":"        [--name \u003cname\u003e]"},{"line_number":134,"context_line":"        [--overwrite]"},{"line_number":135,"context_line":"        \u003cport\u003e"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_cb633419","line":134,"range":{"start_line":134,"start_character":8,"end_line":134,"end_character":21},"in_reply_to":"bab6814e_85aa1018","updated":"2016-05-23 11:51:24.000000000","message":"Done","commit_id":"293256d21fa64b2468f2631ec0a6e946145003d1"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"c64926ff7440dd37cba3b89fcf54c1359a559d2f","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        [--name \u003cname\u003e]"},{"line_number":148,"context_line":"        \u003cport\u003e"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":".. option:: --fixed-ip subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    Desired IP and/or subnet (name or ID) for this port:"},{"line_number":153,"context_line":"    subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e"},{"line_number":154,"context_line":"    (repeat option to set multiple fixed IP addresses)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":".. option:: --no-fixed-ip"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Clear existing information of fixed IP addresses"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":".. option:: --device \u003cdevice-id\u003e"},{"line_number":161,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7a8ec9b2_001ba9ca","line":158,"range":{"start_line":150,"start_character":0,"end_line":158,"end_character":52},"updated":"2016-09-18 09:08:30.000000000","message":"The same comment with subnet commands. We\u0027d better doc what will happen when both these two options are specified.","commit_id":"924e0b783e5fb5509b4852df2276d59ed1f0f792"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"c64926ff7440dd37cba3b89fcf54c1359a559d2f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    VNIC type for this port (direct | direct-physical | macvtap | normal | baremetal,"},{"line_number":172,"context_line":"    default: normal)"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":".. option:: --binding-profile \u003cbinding-profile\u003e"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    Custom data to be passed as binding:profile. Data may"},{"line_number":177,"context_line":"    be passed as \u003ckey\u003e\u003d\u003cvalue\u003e or JSON."},{"line_number":178,"context_line":"    (repeat option to set multiple binding:profile data)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":".. option:: --no-binding-profile"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"    Clear existing information of binding:profile"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":".. option:: --host \u003chost-id\u003e"},{"line_number":185,"context_line":""}],"source_content_type":"text/x-rst","patch_set":9,"id":"7a8ec9b2_207c25eb","line":182,"range":{"start_line":174,"start_character":0,"end_line":182,"end_character":49},"updated":"2016-09-18 09:08:30.000000000","message":"ditto","commit_id":"924e0b783e5fb5509b4852df2276d59ed1f0f792"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"9f570da123ce586f5506b6f19729ac348f368622","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    Clear existing information of fixed IP addresses."},{"line_number":159,"context_line":"    Specify both --fixed-ip and --no-fixed-ip"},{"line_number":160,"context_line":"    to overwrite the current fixed ip information."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":".. option:: --device \u003cdevice-id\u003e"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-rst","patch_set":11,"id":"7a8ec9b2_1071bba8","line":160,"range":{"start_line":160,"start_character":35,"end_line":160,"end_character":49},"updated":"2016-09-20 19:50:43.000000000","message":"IP addresses","commit_id":"2763340822f1c919e5c7092d13fb0cbb99e22cbe"}],"openstackclient/network/v2/port.py":[{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"d044d77fae88c6113178bc8937fda922f102bf5b","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def get_parser(self, prog_name):"},{"line_number":344,"context_line":"        parser \u003d super(SetPort, self).get_parser(prog_name)"},{"line_number":345,"context_line":"        _add_updatable_args(parser)"},{"line_number":346,"context_line":"        parser.add_argument("},{"line_number":347,"context_line":"            \u0027--overwrite\u0027,"},{"line_number":348,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":349,"context_line":"            default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_eb98597a","line":346,"updated":"2016-04-20 11:43:22.000000000","message":"I don\u0027t like this option.  I think it would be better to simply remove the mutually exclusive group and allow an overwrite if both a specified.","commit_id":"2adc97975738cf69bf2bd3f955d3737d1441124c"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"e1cb9649e7c4153b0debb49ef43659963030db10","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def get_parser(self, prog_name):"},{"line_number":344,"context_line":"        parser \u003d super(SetPort, self).get_parser(prog_name)"},{"line_number":345,"context_line":"        _add_updatable_args(parser)"},{"line_number":346,"context_line":"        parser.add_argument("},{"line_number":347,"context_line":"            \u0027--overwrite\u0027,"},{"line_number":348,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":349,"context_line":"            default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_7a395bd8","line":346,"in_reply_to":"1a122d0e_786b54b7","updated":"2016-04-21 18:20:57.000000000","message":"I was thinking that --fixed-ip and --no-fixed-ip would no longer be mutually exclusive (similar for the binding profile options).  Then if both --fixed-ip and --no-fixed-ip are specified \u0027fixed_ips\u0027 would only contain the values specified on the command instead of appending like is done today.\n\nMaybe the best thing to do is first work out the design by updating the current devref.","commit_id":"2adc97975738cf69bf2bd3f955d3737d1441124c"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"0640855bb4d6b6bcaf794f4b1730c592311328ef","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def get_parser(self, prog_name):"},{"line_number":344,"context_line":"        parser \u003d super(SetPort, self).get_parser(prog_name)"},{"line_number":345,"context_line":"        _add_updatable_args(parser)"},{"line_number":346,"context_line":"        parser.add_argument("},{"line_number":347,"context_line":"            \u0027--overwrite\u0027,"},{"line_number":348,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":349,"context_line":"            default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_abaf817b","line":346,"in_reply_to":"1a122d0e_eb98597a","updated":"2016-04-20 11:44:36.000000000","message":"Also, it would be good to update the devref for this support as well.","commit_id":"2adc97975738cf69bf2bd3f955d3737d1441124c"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"e1627d9a848bba266bd5cd3491d57e59eff40b7f","unresolved":false,"context_lines":[{"line_number":343,"context_line":"    def get_parser(self, prog_name):"},{"line_number":344,"context_line":"        parser \u003d super(SetPort, self).get_parser(prog_name)"},{"line_number":345,"context_line":"        _add_updatable_args(parser)"},{"line_number":346,"context_line":"        parser.add_argument("},{"line_number":347,"context_line":"            \u0027--overwrite\u0027,"},{"line_number":348,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":349,"context_line":"            default\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_786b54b7","line":346,"in_reply_to":"1a122d0e_eb98597a","updated":"2016-04-21 00:35:41.000000000","message":"I think by mutually exclusive group, you are talking about only fixed-ip or binding-profile can be overwritten and you do not agree to it.\n\nI knew this would be a topic of discussion and thats why I posted this patch :)\n\nI refrained from using both binding-profile and fixed-ip for one use case.\n\n\nAssume the port has the following properties( just an  example)\n\n port \u003d { \u0027name\u0027: \"Neo\",\n          \u0027fixed-ip\u0027: \"Nebuchadnezzar\",\n          \u0027binding:profile\u0027: \"Trinity\"}\n\nNow, the user wants to Overwrite fixed-ip from Nebuchadnezzar to Morpheus and wants to append \"Oracle\" to the binding:profile.\n\nIf I remove the mutually exclusive group,  and user executes\n\n openstack port set --fixed-ip Morpheus --overwrite --binding-profile Oracle\n\nthen the resultant port would be:\n\n port \u003d { \u0027name\u0027: \"Neo\",\n          \u0027fixed-ip\u0027: \"Morphues\",\n          \u0027binding:profile\u0027: \"Oracle\"}   \u003c-- Append didnt happen here\n\n\nIf I keep the mutual-exclusiveness, I can stop the above mishap from happening and allow the user to \"Free his mind\" ( Yeah I am a great fan of Matrix )\n\nDo you agree with the above use-case ??\nAnd if so, how can we solve it?","commit_id":"2adc97975738cf69bf2bd3f955d3737d1441124c"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"a04b10da8389a36e10117a351a22c3088b7a7a69","unresolved":false,"context_lines":[{"line_number":398,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":399,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":400,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":401,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":402,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":403,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":404,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_d7116bb1","line":401,"range":{"start_line":401,"start_character":41,"end_line":401,"end_character":47},"updated":"2016-05-18 07:31:05.000000000","message":"If we use current port.binding_profile to update the input option attrs[\u0027binding:profile\u0027], the item with same key will never be updated from CLI, like this:\n\n    {\u0027key1\u0027: \u0027input_value\u0027}.update({\u0027key1\u0027: \u0027current_value\u0027})\n\n\nmy test case:\n\nhttp://paste.openstack.org/show/497447/","commit_id":"293256d21fa64b2468f2631ec0a6e946145003d1"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"3bdee868e6f1e6c497400eb07b8ca92a3f0cb3cb","unresolved":false,"context_lines":[{"line_number":355,"context_line":"            metavar\u003d\"\u003cname\u003e\","},{"line_number":356,"context_line":"            help\u003d_(\"Set port name\")"},{"line_number":357,"context_line":"        )"},{"line_number":358,"context_line":"        parser.add_argument("},{"line_number":359,"context_line":"            \u0027--fixed-ip\u0027,"},{"line_number":360,"context_line":"            metavar\u003d\u0027subnet\u003d\u003csubnet\u003e,ip-address\u003d\u003cip-address\u003e\u0027,"},{"line_number":361,"context_line":"            action\u003dparseractions.MultiKeyValueAction,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_21708371","line":358,"updated":"2016-05-23 17:57:14.000000000","message":"Please update the documentation since this is no longer mutually exclusive.","commit_id":"6bff463c90739c306fe3d6324f251ec70731297e"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"3bdee868e6f1e6c497400eb07b8ca92a3f0cb3cb","unresolved":false,"context_lines":[{"line_number":369,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":370,"context_line":"            help\u003d_(\"Clear existing information of fixed IP addresses\")"},{"line_number":371,"context_line":"        )"},{"line_number":372,"context_line":"        parser.add_argument("},{"line_number":373,"context_line":"            \u0027--binding-profile\u0027,"},{"line_number":374,"context_line":"            metavar\u003d\u0027\u003cbinding-profile\u003e\u0027,"},{"line_number":375,"context_line":"            action\u003dparseractions.KeyValueAction,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_e1103b02","line":372,"updated":"2016-05-23 17:57:14.000000000","message":"Please update the documentation since this is no longer mutually exclusive.","commit_id":"6bff463c90739c306fe3d6324f251ec70731297e"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"d8701f70956ee158917b671a2fd826897f68cd05","unresolved":false,"context_lines":[{"line_number":120,"context_line":"    if parsed_args.disable:"},{"line_number":121,"context_line":"        attrs[\u0027admin_state_up\u0027] \u003d False"},{"line_number":122,"context_line":"    if parsed_args.binding_profile is not None:"},{"line_number":123,"context_line":"        attrs[\u0027binding:profile\u0027] \u003d parsed_args.binding_profile"},{"line_number":124,"context_line":"    if parsed_args.vnic_type is not None:"},{"line_number":125,"context_line":"        attrs[\u0027binding:vnic_type\u0027] \u003d parsed_args.vnic_type"},{"line_number":126,"context_line":"    if parsed_args.host:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_5c2b5594","line":123,"range":{"start_line":123,"start_character":8,"end_line":123,"end_character":62},"updated":"2016-09-12 07:17:54.000000000","message":"here","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"d8701f70956ee158917b671a2fd826897f68cd05","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":452,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":453,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":454,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":455,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":456,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":457,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_07789ac3","line":454,"range":{"start_line":454,"start_character":16,"end_line":454,"end_character":68},"updated":"2016-09-12 07:17:54.000000000","message":"My question at here:\n\nIf current port have binding profile value like: abc\u003dabc, but we specifiy new binding profile value to set the same key, like this: \"osc port set --binding-profile abc\u003d123 foo_port\", the attrs[\u0027binding:profile\u0027] would be abc\u003dabc, looks like the new value(123) isn\u0027t updated, that why I add comments in PS3, I think we should use the current value to update the input value.\n\n    tmp_binding_profile \u003d copy.deepcopy(obj.binding_profile)\n    tmp_binding_profile.update(attrs[\u0027binding:profile\u0027])\n    attrs[\u0027binding:profile\u0027] \u003d tmp_binding_profile","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"a87ec178c8f563fbbfaac2d9a513d229949fcfd5","unresolved":false,"context_lines":[{"line_number":451,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":452,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":453,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":454,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":455,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":456,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":457,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_9944fd1b","line":454,"range":{"start_line":454,"start_character":16,"end_line":454,"end_character":68},"in_reply_to":"9a89bdaa_07789ac3","updated":"2016-09-12 11:38:43.000000000","message":"Hi RuiChen , I would like to discuss this further, but not for this patch.\nThe reason is currently this patch is used to overwrite the key-value pair.\n\nCurrently NeutronClient does not support Append, it only supports Overwrite.\nI need to check this functionality in neutronclient","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":14937,"name":"Tang Chen","email":"imtangchen@163.com","username":"tangchen"},"change_message_id":"ff63ee4fa3edec6b83e961685f578f18047816ed","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        _prepare_fixed_ips(self.app.client_manager, parsed_args)"},{"line_number":449,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":450,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":451,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":452,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":453,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":454,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":455,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":456,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":457,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":458,"context_line":"            # When user unsets the fixed_ips, obj.fixed_ips \u003d [{}]."},{"line_number":459,"context_line":"            # Adding the obj.fixed_ips list to attrs[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_d8405f0a","line":456,"range":{"start_line":451,"start_character":0,"end_line":456,"end_character":41},"updated":"2016-09-11 06:27:45.000000000","message":"This seems incorrect. Maybe I\u0027m wrong, but it seems a little unreasonable to me.\n\nReferring to the discussion before, IIUC, Richard suggested this:\n\nappend:\n    --fixed-ip xxx.xxx.xxx.xxx\noverwrite:\n    --no-fixed-ip --fixed-ip xxx.xxx.xxx.xxx\n\nHere, what does \"overwrite\" mean ?  In my understanding, it means clear the original fixed-ip first, and then set it to xxx.xxx.xxx.xxx\n\nBut the code in this patch will just clear the original one. And the --fixed-ip option following the --no option makes no sense.\n\nSo, if I misunderstood Richard, and this is really what we are going to do, then I don\u0027t quite like it. I think \"overwrite\" and \"clear\" mean different things.\n\nI suggest:\n\n--fixed-ip option only: append\n--no-fixed-ip option only: clear\n--no-fixed-ip and --fixed-ip options: overrite, which means clear first, and then append\n\nBut I still think this is not easy for users to understand...","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"d8701f70956ee158917b671a2fd826897f68cd05","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        _prepare_fixed_ips(self.app.client_manager, parsed_args)"},{"line_number":449,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":450,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":451,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":452,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":453,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":454,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":455,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":456,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":457,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":458,"context_line":"            # When user unsets the fixed_ips, obj.fixed_ips \u003d [{}]."},{"line_number":459,"context_line":"            # Adding the obj.fixed_ips list to attrs[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_87374aaf","line":456,"range":{"start_line":451,"start_character":0,"end_line":456,"end_character":41},"in_reply_to":"9a89bdaa_b88abb18","updated":"2016-09-12 07:17:54.000000000","message":"I think Reedip is right, the attrs[\u0027binding:profile\u0027] had been set at the place see my aboving comment. If we specified both \"--no-binding-profile\" and \"--binding-profile\" options, the binding-profile value would been overrided, that match the rules:\n\n1. --binding-profile: append\n2. --no-binding-profile: clean\n3. --binding-profile \u0026 --no-binding-profile: override","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"84fe99c4e8313f63b45e028a1ead75b22ddee5cc","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        _prepare_fixed_ips(self.app.client_manager, parsed_args)"},{"line_number":449,"context_line":"        attrs \u003d _get_attrs(self.app.client_manager, parsed_args)"},{"line_number":450,"context_line":"        obj \u003d client.find_port(parsed_args.port, ignore_missing\u003dFalse)"},{"line_number":451,"context_line":"        if \u0027binding:profile\u0027 in attrs:"},{"line_number":452,"context_line":"            # Do not modify attrs if both binding_profile/no_binding given"},{"line_number":453,"context_line":"            if not parsed_args.no_binding_profile:"},{"line_number":454,"context_line":"                attrs[\u0027binding:profile\u0027].update(obj.binding_profile)"},{"line_number":455,"context_line":"        elif parsed_args.no_binding_profile:"},{"line_number":456,"context_line":"            attrs[\u0027binding:profile\u0027] \u003d {}"},{"line_number":457,"context_line":"        if \u0027fixed_ips\u0027 in attrs:"},{"line_number":458,"context_line":"            # When user unsets the fixed_ips, obj.fixed_ips \u003d [{}]."},{"line_number":459,"context_line":"            # Adding the obj.fixed_ips list to attrs[\u0027fixed_ips\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_b88abb18","line":456,"range":{"start_line":451,"start_character":0,"end_line":456,"end_character":41},"in_reply_to":"9a89bdaa_d8405f0a","updated":"2016-09-11 06:51:05.000000000","message":"Hi Tangchen,\nCan you tell me what you feel is incorrect?\n\na) if --no-binding-profile is not provided, then the attrs[binding_profile] is updated with the obj\u0027s binding_profile ( which is the existing value ).\nSo this handled the append scenario , where only --binding-profile is specified\n\nb) if both --binding-profile and --no-binding-profile is specified, then the attrs[binding_profile] is NOT updated with the existing value of obj\u0027s binding_profile.\nSo this handles the overwrite scenario where in we REJECT the current value of the binding_profile, and assume the new value to be correct one.\n\nc) if only --no-binding-profile is specified, then we REJECT the current value of binding profile and set it to [].\nSo this handles the clear scenario , where in only --no-binding-profile is set.\n\nPlease let me know if there are any doubts?","commit_id":"62649ef8949bd25cf5bc0ebd0c32b46a4acb1760"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"9f570da123ce586f5506b6f19729ac348f368622","unresolved":false,"context_lines":[{"line_number":422,"context_line":"            action\u003d\u0027store_true\u0027,"},{"line_number":423,"context_line":"            help\u003d_(\"Clear existing information of fixed IP addresses.\""},{"line_number":424,"context_line":"                   \"Specify both --fixed-ip and --no-fixed-ip \""},{"line_number":425,"context_line":"                   \"to overwrite the current fixed ip information.\")"},{"line_number":426,"context_line":"        )"},{"line_number":427,"context_line":"        parser.add_argument("},{"line_number":428,"context_line":"            \u0027--binding-profile\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a8ec9b2_105a9b2a","line":425,"range":{"start_line":425,"start_character":51,"end_line":425,"end_character":65},"updated":"2016-09-20 19:50:43.000000000","message":"IP addresses","commit_id":"2763340822f1c919e5c7092d13fb0cbb99e22cbe"}],"openstackclient/tests/network/v2/test_port.py":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"a04b10da8389a36e10117a351a22c3088b7a7a69","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        }"},{"line_number":336,"context_line":"        self.network.update_port.assert_called_once_with(_testport, **attrs)"},{"line_number":337,"context_line":"        self.assertIsNone(result)"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"    def test_set_this(self):"},{"line_number":340,"context_line":"        arglist \u003d ["},{"line_number":341,"context_line":"            \u0027--disable\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_1712d362","line":338,"updated":"2016-05-18 07:31:05.000000000","message":"I think adding an overwrite binding:profile case make sense.","commit_id":"293256d21fa64b2468f2631ec0a6e946145003d1"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"3bdee868e6f1e6c497400eb07b8ca92a3f0cb3cb","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        self.network.update_port.assert_called_once_with(_testport, **attrs)"},{"line_number":315,"context_line":"        self.assertIsNone(result)"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"    def test_overwrite_fixed_ip(self):"},{"line_number":318,"context_line":"        _testport \u003d network_fakes.FakePort.create_one_port("},{"line_number":319,"context_line":"            {\u0027fixed_ips\u0027: [{\u0027ip_address\u0027: \u00270.0.0.1\u0027}]})"},{"line_number":320,"context_line":"        self.network.find_port \u003d mock.Mock(return_value\u003d_testport)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_61c28b54","line":317,"updated":"2016-05-23 17:57:14.000000000","message":"I think it would be good to test binding profile too.","commit_id":"6bff463c90739c306fe3d6324f251ec70731297e"}],"releasenotes/notes/add-overwrite-option-190a9c6904d53dab.yaml":[{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"a04b10da8389a36e10117a351a22c3088b7a7a69","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    ``port set`` command now has an --overwrite option which"},{"line_number":5,"context_line":"    allows the user to overwrite fixed-ips or binding-profile"},{"line_number":6,"context_line":"    of a port."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"bab6814e_a5c0f4e1","line":4,"range":{"start_line":4,"start_character":36,"end_line":4,"end_character":48},"updated":"2016-05-18 07:31:05.000000000","message":"please update release notes according to latest implement.","commit_id":"293256d21fa64b2468f2631ec0a6e946145003d1"},{"author":{"_account_id":8410,"name":"Richard Theis","email":"rtheis@us.ibm.com","username":"rtheis"},"change_message_id":"2395b4b6bb05853c441d9648471a770b8bb6aa3f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    ``port set`` command now allows the user to overwrite fixed-ips or binding-profile"},{"line_number":5,"context_line":"    of a port."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"7a8ec9b2_b7e6cfe5","line":4,"updated":"2016-09-17 00:16:42.000000000","message":"Please add the blueprint link.","commit_id":"db55bf30d71a51482a59f740e5ea63f53845ee70"},{"author":{"_account_id":17776,"name":"Reedip","email":"reedip.banerjee@gmail.com","username":"Reedip"},"change_message_id":"f88856593a0c0f3f0e67010d1bf82cb6b01de60f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    ``port set`` command now allows the user to overwrite fixed-ips or binding-profile"},{"line_number":5,"context_line":"    of a port."}],"source_content_type":"text/x-yaml","patch_set":8,"id":"7a8ec9b2_37d63c4f","line":4,"in_reply_to":"7a8ec9b2_b7e6cfe5","updated":"2016-09-17 04:05:04.000000000","message":"Done","commit_id":"db55bf30d71a51482a59f740e5ea63f53845ee70"}]}
