)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":11,"context_line":"allow the port creation to accept the name of the node instead of the UUID of"},{"line_number":12,"context_line":"the node. E.g. In request body pass \"node_name\" instead of \"node_uuid\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I89202f950674c0ee982ee1eef10f77d3c74b142d"},{"line_number":15,"context_line":"Related-Bug: #1439901"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"1a6eadb0_1801c105","line":14,"updated":"2016-12-14 21:45:15.000000000","message":"needs \"Co-Authored-By: Mario Villaplana \u003cmario.villaplana@gmail.com\u003e\" so that people don\u0027t take my +/-1 as seriously :)","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5563605e45238aa298da87b3d1aeb68380a8669e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow logical name along with UUID in port creation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027 and"},{"line_number":10,"context_line":"\u0027address\u0027 specified in the body. Now that we have logical names, we should"},{"line_number":11,"context_line":"allow the port creation to accept the name of the node instead of the UUID of"},{"line_number":12,"context_line":"the node. E.g. In request body pass \"node_name\" instead of \"node_uuid\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a430d35_222b0fed","line":9,"updated":"2017-02-03 23:13:05.000000000","message":"nit: lines are too long\n\nto enable checking line length in vim:\n:set ruler","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9d86506a53a64cca36a410ef029393ca420570a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow logical name along with UUID in port creation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027 and"},{"line_number":10,"context_line":"\u0027address\u0027 specified in the body. Now that we have logical names, we should"},{"line_number":11,"context_line":"allow the port creation to accept the name of the node instead of the UUID of"},{"line_number":12,"context_line":"the node. E.g. In request body pass \"node_name\" instead of \"node_uuid\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a430d35_b18794b3","line":9,"in_reply_to":"1a430d35_222b0fed","updated":"2017-02-09 01:31:41.000000000","message":"Done","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5563605e45238aa298da87b3d1aeb68380a8669e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027 and"},{"line_number":10,"context_line":"\u0027address\u0027 specified in the body. Now that we have logical names, we should"},{"line_number":11,"context_line":"allow the port creation to accept the name of the node instead of the UUID of"},{"line_number":12,"context_line":"the node. E.g. In request body pass \"node_name\" instead of \"node_uuid\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I89202f950674c0ee982ee1eef10f77d3c74b142d"},{"line_number":15,"context_line":"Related-Bug: #1439901"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a430d35_e22027fa","line":12,"updated":"2017-02-03 23:13:05.000000000","message":"It would be nice to include info if:\n- only one of there values are allowed in the body\n- if both can be passed in the body, what happens if they\u0027re incompatible","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9d86506a53a64cca36a410ef029393ca420570a","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027 and"},{"line_number":10,"context_line":"\u0027address\u0027 specified in the body. Now that we have logical names, we should"},{"line_number":11,"context_line":"allow the port creation to accept the name of the node instead of the UUID of"},{"line_number":12,"context_line":"the node. E.g. In request body pass \"node_name\" instead of \"node_uuid\""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I89202f950674c0ee982ee1eef10f77d3c74b142d"},{"line_number":15,"context_line":"Related-Bug: #1439901"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"1a430d35_3169e4f9","line":12,"in_reply_to":"1a430d35_e22027fa","updated":"2017-02-09 01:31:41.000000000","message":"Just mentioned pass either one value.\nIn case both of them are passed exception will be raised if port is getting created with the address that already has port associated https://github.com/openstack/ironic/blob/master/ironic/db/sqlalchemy/api.py#L501","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"3cf32eac00d8995fd05ed33946201a1eeb90f0ea","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Anup Navare \u003canup.d.navare@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-08 17:07:51 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow logical name along with UUID in port creation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027"},{"line_number":10,"context_line":"and \u0027address\u0027 specified in the body. Now that we have logical names,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"fa31d9ce_132f5df7","line":7,"range":{"start_line":7,"start_character":19,"end_line":7,"end_character":29},"updated":"2017-02-16 18:56:04.000000000","message":"nit: At first glance it sounds like logical name has to be passed along with UUID. After reading the message, it is clear. If there is another patch, may be reword the title line? Thanks.","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e3fbe5cf085558969a1da6355c412ac5a7de0d48","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Anup Navare \u003canup.d.navare@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-02-08 17:07:51 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Allow logical name along with UUID in port creation"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently a port can be created via a POST /v1/ports, with \u0027node_uuid\u0027"},{"line_number":10,"context_line":"and \u0027address\u0027 specified in the body. Now that we have logical names,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da36d5c6_c9aa9185","line":7,"range":{"start_line":7,"start_character":19,"end_line":7,"end_character":29},"in_reply_to":"fa31d9ce_132f5df7","updated":"2017-02-17 19:20:20.000000000","message":"Just mentioned Allow logical names in port creation. Tried to keep it simple.","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"}],"doc/source/dev/webapi-version-history.rst":[{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"aa7ce2f55a9fb9a7522f9aec632bb4d21f65d452","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"**1.31** (Ocata)"}],"source_content_type":"text/x-rst","patch_set":18,"id":"1a1ced50_f05a7782","line":9,"range":{"start_line":9,"start_character":14,"end_line":9,"end_character":21},"updated":"2017-03-20 14:20:48.000000000","message":"s/version/version,","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_84cdc667","line":7,"range":{"start_line":7,"start_character":56,"end_line":7,"end_character":61},"updated":"2017-04-09 14:48:48.000000000","message":"We can only create one port per request\ns/names/name/","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2b1ace333010bce9f4ff449eff04a7d7c4937800","unresolved":false,"context_lines":[{"line_number":4,"context_line":""},{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_5b065b1e","line":7,"range":{"start_line":7,"start_character":56,"end_line":7,"end_character":61},"in_reply_to":"bff0334d_84cdc667","updated":"2017-04-10 18:37:18.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_c4af4e7b","line":8,"range":{"start_line":8,"start_character":13,"end_line":8,"end_character":16},"updated":"2017-04-09 14:48:48.000000000","message":"We can\u0027t do it in the same time, do we?\ns/and/or/","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_a4b44ad2","line":8,"range":{"start_line":8,"start_character":53,"end_line":8,"end_character":56},"updated":"2017-04-09 14:48:48.000000000","message":"ditto","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_44c33e39","line":8,"range":{"start_line":8,"start_character":26,"end_line":8,"end_character":31},"updated":"2017-04-09 14:48:48.000000000","message":"s/ports/port","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2b1ace333010bce9f4ff449eff04a7d7c4937800","unresolved":false,"context_lines":[{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_3b0b9724","line":8,"range":{"start_line":8,"start_character":26,"end_line":8,"end_character":31},"in_reply_to":"bff0334d_44c33e39","updated":"2017-04-10 18:37:18.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2b1ace333010bce9f4ff449eff04a7d7c4937800","unresolved":false,"context_lines":[{"line_number":5,"context_line":"**1.32** (Pike)"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Adds a property ``node_name`` to allow logical node names while"},{"line_number":8,"context_line":"    creating and updating ports via \u0027POST /v1/ports\u0027 and \u0027PATCH /v1/ports\u0027."},{"line_number":9,"context_line":"    From this version either ``node_uuid`` or ``node_name``"},{"line_number":10,"context_line":"    can be passed in the request body."},{"line_number":11,"context_line":""}],"source_content_type":"text/x-rst","patch_set":19,"id":"bff0334d_1b145343","line":8,"range":{"start_line":8,"start_character":13,"end_line":8,"end_character":16},"in_reply_to":"bff0334d_c4af4e7b","updated":"2017-04-10 18:37:18.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"}],"ironic/api/controllers/v1/port.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8df0f2771187062b7d9e6f48a69ec0885b59b5d5","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":164,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":165,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":166,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":169,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_26f21f70","line":166,"updated":"2016-12-02 10:17:20.000000000","message":"I thought the idea of the RFE would be to allow using the name to do the operations on ports but we wouldn\u0027t save it to the port object at all.\n\nWhat if the node changes it\u0027s name ?","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"466ff4d32d73e5f96aceca42f91361b2c6a53f8a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":164,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":165,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":166,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":169,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_8d3e80d8","line":166,"in_reply_to":"3a71b18c_26f21f70","updated":"2016-12-09 18:29:19.000000000","message":"Lucas, I see that even if the curl call use node_name to create a port, port is internally attached with node-uuid. So when ever node name changes and makes a call to update_node(),  node will undergo changes but port will remain attached to node\u0027s UUID.","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"acce54c7bf6351f9ed05490cb382d94b0658ffaa","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":164,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":165,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":166,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":169,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_6deb48b1","line":166,"in_reply_to":"3a71b18c_26f21f70","updated":"2016-12-07 19:46:55.000000000","message":"Thanks for your inputs Lucas. But I agree with Mario. I am not making a call to db. Please correct me. \nWith respect to node name change, I will edit the function and make appropriate changes if node name changes. Still working on it. Thanks for giving me the thought of node name change.","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"7b3a99a009a96f9441abc29139ea57cee969ff03","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":164,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":165,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":166,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":169,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_4d7bec7b","line":166,"in_reply_to":"3a71b18c_26f21f70","updated":"2016-12-07 19:33:43.000000000","message":"This is just an API object, so it won\u0027t be saved to the DB, right?\n\nWe may need some special logic to handle nodes without names, though.","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"466ff4d32d73e5f96aceca42f91361b2c6a53f8a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":164,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":165,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":166,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":169,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_4377d79e","line":166,"in_reply_to":"3a71b18c_4d7bec7b","updated":"2016-12-09 18:29:19.000000000","message":"Yes Mario, I see that node names can be NULL so may be I can add a check to see if the node_name indeed exists or add a unit test. Will include that in my next patchset. Thanks","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def _set_node_name(self, value):"},{"line_number":130,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":131,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":132,"context_line":"                LOG.warning(\"The current version do not support logical names.\""},{"line_number":133,"context_line":"                            \"Please use node_uuid in the request body.\")"},{"line_number":134,"context_line":"                raise exception.NotAcceptable()"},{"line_number":135,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_9815d141","line":132,"range":{"start_line":132,"start_character":49,"end_line":132,"end_character":51},"updated":"2016-12-14 21:45:15.000000000","message":"nit: s/do/does","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def _set_node_name(self, value):"},{"line_number":130,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":131,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":132,"context_line":"                LOG.warning(\"The current version do not support logical names.\""},{"line_number":133,"context_line":"                            \"Please use node_uuid in the request body.\")"},{"line_number":134,"context_line":"                raise exception.NotAcceptable()"},{"line_number":135,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_d81bc971","line":132,"range":{"start_line":132,"start_character":72,"end_line":132,"end_character":78},"updated":"2016-12-14 21:45:15.000000000","message":"s/names/node names, to be more clear","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                    # db access"},{"line_number":142,"context_line":"                    self._node_uuid \u003d node.uuid"},{"line_number":143,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":144,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":145,"context_line":"                    raise"},{"line_number":146,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":147,"context_line":"            self._node_name \u003d wtypes.Unset"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_785ab52b","line":144,"updated":"2016-12-14 21:45:15.000000000","message":"Maybe comment here similar to L116 that 404 is inappropriate because this is a Port request, not a Node request","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0b0baa325085d02ae19f57e5776a51e1a73f5ef1","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                    # db access"},{"line_number":142,"context_line":"                    self._node_uuid \u003d node.uuid"},{"line_number":143,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":144,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":145,"context_line":"                    raise"},{"line_number":146,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":147,"context_line":"            self._node_name \u003d wtypes.Unset"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_d0097496","line":144,"in_reply_to":"1a6eadb0_785ab52b","updated":"2017-01-19 02:18:32.000000000","message":"Thanks for review. But, I am calling Node.get. L116 seems to be changed as it is calling Portgroup.get in try.","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.fields.append(\u0027node_id\u0027)"},{"line_number":203,"context_line":"        setattr(self, \u0027node_uuid\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":206,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        # NOTE: portgroup_id is an attribute created on-the-fly"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_58a33900","line":205,"updated":"2016-12-14 21:45:15.000000000","message":"nit: You can put this and the code on L189 into one if block.","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0b0baa325085d02ae19f57e5776a51e1a73f5ef1","unresolved":false,"context_lines":[{"line_number":202,"context_line":"        self.fields.append(\u0027node_id\u0027)"},{"line_number":203,"context_line":"        setattr(self, \u0027node_uuid\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":206,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"        # NOTE: portgroup_id is an attribute created on-the-fly"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_3061c805","line":205,"in_reply_to":"1a6eadb0_58a33900","updated":"2017-01-19 02:18:32.000000000","message":"Done in Patch Set 4","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":545,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":546,"context_line":"            raise exception.NotAcceptable()"},{"line_number":547,"context_line":"        if not (\u0027node_uuid\u0027 in pdict):"},{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":550,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_78f635fa","line":547,"updated":"2016-12-14 21:45:15.000000000","message":"Can you leave a comment here indicating that node_uuid will be automatically set if node_name is specified during the POST call? Otherwise, it will appear to readers of this code as though you\u0027re just checking for node_uuid by itself.","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0b0baa325085d02ae19f57e5776a51e1a73f5ef1","unresolved":false,"context_lines":[{"line_number":544,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":545,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":546,"context_line":"            raise exception.NotAcceptable()"},{"line_number":547,"context_line":"        if not (\u0027node_uuid\u0027 in pdict):"},{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":550,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_90529c33","line":547,"in_reply_to":"1a6eadb0_78f635fa","updated":"2017-01-19 02:18:32.000000000","message":"Updated in Patch Set 4","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"cecc3e3ca440729ca2ff407bd258ea5c3dfa2190","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self.node_id \u003d node.id"},{"line_number":87,"context_line":"                # Adding the value to _node_name as well to avoid multiple"},{"line_number":88,"context_line":"                # db access"},{"line_number":89,"context_line":"                self._node_name \u003d node.name"},{"line_number":90,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":91,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"},{"line_number":92,"context_line":"                # response for a POST request to create a Port"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_249de465","line":89,"updated":"2017-02-03 19:51:24.000000000","message":"Just wondering about the case of logical names not supported. Does it apply here?","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"b0646a28c954664d3cdc49f44cca701d85b70a9a","unresolved":false,"context_lines":[{"line_number":86,"context_line":"                self.node_id \u003d node.id"},{"line_number":87,"context_line":"                # Adding the value to _node_name as well to avoid multiple"},{"line_number":88,"context_line":"                # db access"},{"line_number":89,"context_line":"                self._node_name \u003d node.name"},{"line_number":90,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":91,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"},{"line_number":92,"context_line":"                # response for a POST request to create a Port"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_e71d9967","line":89,"in_reply_to":"1a430d35_249de465","updated":"2017-02-03 22:27:10.000000000","message":"In this case it will get the node using id by calling get_by_id() and name would be None.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5563605e45238aa298da87b3d1aeb68380a8669e","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_e2e587a8","line":137,"updated":"2017-02-03 23:13:05.000000000","message":"I think InvalidRequest is better here... but I don\u0027t insist on that","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9d86506a53a64cca36a410ef029393ca420570a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_713d2cdc","line":137,"in_reply_to":"1a430d35_e2e587a8","updated":"2017-02-09 01:31:41.000000000","message":"I just followed how did for portgroup_uuid as it was recently added as a property, at L546. But open to other exception if that suits here.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"7471979e10ee47346c03dcd5b68a32d1a1084cc6","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"},{"line_number":168,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":169,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":170,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":171,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    pxe_enabled \u003d types.boolean"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_f1f9d74e","line":170,"updated":"2017-02-03 21:45:09.000000000","message":"There needs to be a space above this line.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"acf5ac5c07d8cb87e331258764d115b7e071a13b","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"},{"line_number":168,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":169,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":170,"context_line":"    node_name \u003d wsme.wsproperty(wtypes.text, _get_node_name, _set_node_name)"},{"line_number":171,"context_line":"    \"\"\"The logical name of the node this port belongs to\"\"\""},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    pxe_enabled \u003d types.boolean"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_cc4ac754","line":170,"in_reply_to":"1a430d35_f1f9d74e","updated":"2017-02-09 01:34:11.000000000","message":"Done","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"cecc3e3ca440729ca2ff407bd258ea5c3dfa2190","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":547,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        # (aNuposic): This check is to make sure the port is not created"},{"line_number":550,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":551,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":552,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_24fa4443","line":549,"updated":"2017-02-03 19:51:24.000000000","message":"s/(aNuposic)/NOTE(aNuposic)","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"7471979e10ee47346c03dcd5b68a32d1a1084cc6","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":547,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        # (aNuposic): This check is to make sure the port is not created"},{"line_number":550,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":551,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":552,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_311d1f74","line":549,"in_reply_to":"1a430d35_24fa4443","updated":"2017-02-03 21:45:09.000000000","message":"+1","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"959d635de6d70c1764807738e1139a8519c621ec","unresolved":false,"context_lines":[{"line_number":546,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":547,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        # (aNuposic): This check is to make sure the port is not created"},{"line_number":550,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":551,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":552,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_ec2ea38a","line":549,"in_reply_to":"1a430d35_24fa4443","updated":"2017-02-09 01:32:49.000000000","message":"Done","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"7471979e10ee47346c03dcd5b68a32d1a1084cc6","unresolved":false,"context_lines":[{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        # (aNuposic): This check is to make sure the port is not created"},{"line_number":550,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":551,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":552,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":553,"context_line":"            raise exception.NotAcceptable(msg)"},{"line_number":554,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_6c20ae9c","line":551,"updated":"2017-02-03 21:45:09.000000000","message":"How was this check enforced before? Foreign key relationship? We should probably stick to that method if it works here.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"eaea58fed6f350c72d557bf8a9b750b6519a1d32","unresolved":false,"context_lines":[{"line_number":548,"context_line":"            raise exception.NotAcceptable()"},{"line_number":549,"context_line":"        # (aNuposic): This check is to make sure the port is not created"},{"line_number":550,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":551,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":552,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":553,"context_line":"            raise exception.NotAcceptable(msg)"},{"line_number":554,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_e76cb99e","line":551,"in_reply_to":"1a430d35_6c20ae9c","updated":"2017-02-04 00:29:44.000000000","message":"Earlier node_uuid was a mandatory field and hence this check was not required.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"3cf32eac00d8995fd05ed33946201a1eeb90f0ea","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":555,"context_line":"            raise exception.Invalid(msg)"},{"line_number":556,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":557,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa31d9ce_6e126e5a","line":554,"updated":"2017-02-16 18:56:04.000000000","message":"nit: If another patch, it may be usefule to add \"Port cannot be created.\" to this msg.","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"5c27e7874a4bf98e4974f34ef2c3ae0192eb951b","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":555,"context_line":"            raise exception.Invalid(msg)"},{"line_number":556,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":557,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_e9867512","line":554,"in_reply_to":"fa31d9ce_69250809","updated":"2017-02-17 19:21:43.000000000","message":"Done","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e3fbe5cf085558969a1da6355c412ac5a7de0d48","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":555,"context_line":"            raise exception.Invalid(msg)"},{"line_number":556,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":557,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"da36d5c6_29cb2d74","line":554,"in_reply_to":"fa31d9ce_6e126e5a","updated":"2017-02-17 19:20:20.000000000","message":"Done","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"dbe711825b1def9d8b54b0365a733d921e79acf4","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"node_uuid or node_name is required.\")"},{"line_number":555,"context_line":"            raise exception.Invalid(msg)"},{"line_number":556,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":557,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa31d9ce_69250809","line":554,"in_reply_to":"fa31d9ce_6e126e5a","updated":"2017-02-16 19:41:53.000000000","message":"Please fix this before landing, thanks","commit_id":"2f2ea889c2f1159e33487b7e0f29f7746c28f5c7"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1ed3785c10d611f5a46a55ac7dec01f57305b04e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_7426c317","line":134,"updated":"2017-02-20 09:10:15.000000000","message":"No _LW translation. I\u0027m not sure that this logging is needed because error will be returned to client synchronously.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"cf1a78e534100c0d864acd07c5bb27e503a2e4a8","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_4eb1c8e0","line":134,"in_reply_to":"da36d5c6_7426c317","updated":"2017-02-22 17:58:38.000000000","message":"I will use _LW translation. I am using the warning so that user will know why it raised NotAcceptable. If it finds more better i can send the warning message directly to NotAcceptable()?","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"8d6063cbdf9821f14f5c287e4a08db98128f8fb3","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":193,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":194,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        fields.append(\u0027portgroup_uuid\u0027)"},{"line_number":197,"context_line":"        for field in fields:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_b6847ad4","line":194,"updated":"2017-02-22 03:23:25.000000000","message":"Wait, so there is no way to specify node_name in kwargs? As you do kwargs.get(node_id) here.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"524e30ec7148f5741ebd8c6609977ad5af447ba2","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":193,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":194,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        fields.append(\u0027portgroup_uuid\u0027)"},{"line_number":197,"context_line":"        for field in fields:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_1fb8dbc7","line":194,"in_reply_to":"da36d5c6_05cee159","updated":"2017-02-22 19:32:08.000000000","message":"There is no node_name in kwargs and so if done like kwargs.get(\u0027node_name\u0027, wtypes.Unset) then node_name property would be set to Unset as per L149. If done kwargs.get(\u0027node_id\u0027) then control will enter try block at L139 and will fetch the correct node with name.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"1ba00478d5c129698cf099ca35b12ae97201b068","unresolved":false,"context_lines":[{"line_number":191,"context_line":""},{"line_number":192,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":193,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":194,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        fields.append(\u0027portgroup_uuid\u0027)"},{"line_number":197,"context_line":"        for field in fields:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_05cee159","line":194,"in_reply_to":"da36d5c6_b6847ad4","updated":"2017-02-22 10:27:14.000000000","message":"Nice catch. It should be node_name instead.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"8c66d24a68541c1cd5e715528fae4d9efda26735","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":194,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        fields.append(\u0027portgroup_uuid\u0027)"},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."},{"line_number":199,"context_line":"            if hasattr(self, field):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_0e97f990","line":196,"range":{"start_line":196,"start_character":0,"end_line":196,"end_character":39},"updated":"2017-02-21 18:52:03.000000000","message":"Nit: Move L196 to L191 to keep comment+code together.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"13ab6b2f94b1a36b02b4e9ac3ab8fc0ea50abbee","unresolved":false,"context_lines":[{"line_number":193,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":194,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        fields.append(\u0027portgroup_uuid\u0027)"},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."},{"line_number":199,"context_line":"            if hasattr(self, field):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_eea6fc51","line":196,"range":{"start_line":196,"start_character":0,"end_line":196,"end_character":39},"in_reply_to":"da36d5c6_0e97f990","updated":"2017-02-22 18:25:48.000000000","message":"Done","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"8c66d24a68541c1cd5e715528fae4d9efda26735","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_b985595a","line":553,"range":{"start_line":553,"start_character":0,"end_line":553,"end_character":62},"updated":"2017-02-21 18:52:03.000000000","message":"I\u0027m not sure if we should check with api_utils.allow_node_name_on_ports().\n\nSuppose an API call with version 1.31 that only passes the node_name (which is invalid call). Version 1.31 allows node_uuid only; versions 1.32+ allow either node_name or node_uuid.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"1ba00478d5c129698cf099ca35b12ae97201b068","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_a536f54f","line":553,"range":{"start_line":553,"start_character":0,"end_line":553,"end_character":62},"in_reply_to":"da36d5c6_9664d649","updated":"2017-02-22 10:27:14.000000000","message":"Agree. What should be the behavior in that case? Do we raise 400 code when the uuid and name refer to different nodes?","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"13ab6b2f94b1a36b02b4e9ac3ab8fc0ea50abbee","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_4e138866","line":553,"range":{"start_line":553,"start_character":0,"end_line":553,"end_character":62},"in_reply_to":"da36d5c6_9664d649","updated":"2017-02-22 18:25:48.000000000","message":"In the request there will be either node_uuid or node_name not both. The port is created and checks for \u0027address\u0027 while creating and will throw an error if address is already attached. https://github.com/openstack/ironic/blob/ea1e2b82b1db8a70dd5af12573cac03ad9ae4744/ironic/objects/port.py#L220\nnode_uuid and node_name will not point to different objects because eventually call is made to db to fetch a node where uuid-\u003ename mapping is done. Check L163 of objects/node.py","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"8d6063cbdf9821f14f5c287e4a08db98128f8fb3","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_9664d649","line":553,"range":{"start_line":553,"start_character":0,"end_line":553,"end_character":62},"in_reply_to":"da36d5c6_b985595a","updated":"2017-02-22 03:23:25.000000000","message":"It\u0027s already checked by the wsme property so that\u0027s fine. What I\u0027m also wondering is, whether we should allow specifying both uuid and name, as they can refer to different nodes.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"13ab6b2f94b1a36b02b4e9ac3ab8fc0ea50abbee","unresolved":false,"context_lines":[{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_2e3574f6","line":553,"range":{"start_line":553,"start_character":0,"end_line":553,"end_character":62},"in_reply_to":"da36d5c6_b985595a","updated":"2017-02-22 18:25:48.000000000","message":"Solio as I mentioned in chat, this just checks if node_uuid or node_name is present while creating a port. API version is checked as Vladyslav said by the wsme property","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"1ba00478d5c129698cf099ca35b12ae97201b068","unresolved":false,"context_lines":[{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"},{"line_number":557,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_e5f9cd81","line":554,"range":{"start_line":554,"start_character":45,"end_line":554,"end_character":54},"updated":"2017-02-22 10:27:14.000000000","message":"s/Node_uuid/node_uuid/","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"8c66d24a68541c1cd5e715528fae4d9efda26735","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"},{"line_number":557,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":558,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"},{"line_number":559,"context_line":"        if vif:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_f9d431be","line":556,"range":{"start_line":556,"start_character":0,"end_line":556,"end_character":40},"updated":"2017-02-21 18:52:03.000000000","message":"Maybe we should add BadRequest in L534.","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"13ab6b2f94b1a36b02b4e9ac3ab8fc0ea50abbee","unresolved":false,"context_lines":[{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":554,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":555,"context_line":"                    \"is required.\")"},{"line_number":556,"context_line":"            raise exception.Invalid(msg)"},{"line_number":557,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":558,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"},{"line_number":559,"context_line":"        if vif:"}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_c9777238","line":556,"range":{"start_line":556,"start_character":0,"end_line":556,"end_character":40},"in_reply_to":"da36d5c6_f9d431be","updated":"2017-02-22 18:25:48.000000000","message":"Done","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":194,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":195,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_3e7f0fe1","line":195,"updated":"2017-02-24 19:09:06.000000000","message":"I don\u0027t like using a node_name setter with node_id, especially as they\u0027re different types","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8b636dbed2216a6b46de49dc5d22be5c29b2164e","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":194,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":195,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_a4b20e4a","line":195,"in_reply_to":"da36d5c6_3e7f0fe1","updated":"2017-02-24 19:42:59.000000000","message":"There is no node_name in kwargs and so if done like kwargs.get(\u0027node_name\u0027, wtypes.Unset) then node_name property would be set to Unset as per L149. If done kwargs.get(\u0027node_id\u0027) then control will enter try block at L139 and will fetch the correct node with name.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"ae77d7e37da790cd700534611111ca29cafbb481","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":194,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":195,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_b86f92fa","line":195,"in_reply_to":"da36d5c6_a4b20e4a","updated":"2017-02-24 20:39:44.000000000","message":"I know how it works... It is just not a clean solution :)\nAlso - init is called when translating object from db on get request.  Node_uuid setter sets the name already, so this seems like a redundant thing that causes additional load on db.\n\nNode_name setter is called automatically by wsme by translating objects sent as json to python objects (post).\n\nMaybe it can be useful to call it here when called with kwargs from patch method, but then it is still useful only if node_name is in kwargs","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"b65c9c238e91aa8334e4f023edb11b656a03a8bb","unresolved":false,"context_lines":[{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        if api_utils.allow_node_name_on_ports():"},{"line_number":194,"context_line":"            fields.append(\u0027node_name\u0027)"},{"line_number":195,"context_line":"            setattr(self, \u0027node_name\u0027, kwargs.get(\u0027node_id\u0027, wtypes.Unset))"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        for field in fields:"},{"line_number":198,"context_line":"            # Add fields we expose."}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_82f25504","line":195,"in_reply_to":"da36d5c6_b86f92fa","updated":"2017-02-25 01:41:51.000000000","message":"Good catch, agree that it will get called redundantly.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        \"\"\"Create a new port."},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        :param port: a port within the request body."},{"line_number":534,"context_line":"        :raises: NotAcceptable, HTTPNotFound, Conflict, BadRequest"},{"line_number":535,"context_line":"        \"\"\""},{"line_number":536,"context_line":"        context \u003d pecan.request.context"},{"line_number":537,"context_line":"        cdict \u003d context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_deb8b32c","line":534,"updated":"2017-02-24 19:09:06.000000000","message":"These are the exception class names, not returned http codes - I believe it should be Invalid, not BadRequest (ln 556)","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"b65c9c238e91aa8334e4f023edb11b656a03a8bb","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        \"\"\"Create a new port."},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        :param port: a port within the request body."},{"line_number":534,"context_line":"        :raises: NotAcceptable, HTTPNotFound, Conflict, BadRequest"},{"line_number":535,"context_line":"        \"\"\""},{"line_number":536,"context_line":"        context \u003d pecan.request.context"},{"line_number":537,"context_line":"        cdict \u003d context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_e294f18b","line":534,"in_reply_to":"da36d5c6_d1d421ed","updated":"2017-02-25 01:41:51.000000000","message":"Done","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"a506afe6bc2291a3494d7fca240e0e9ae0030b8d","unresolved":false,"context_lines":[{"line_number":531,"context_line":"        \"\"\"Create a new port."},{"line_number":532,"context_line":""},{"line_number":533,"context_line":"        :param port: a port within the request body."},{"line_number":534,"context_line":"        :raises: NotAcceptable, HTTPNotFound, Conflict, BadRequest"},{"line_number":535,"context_line":"        \"\"\""},{"line_number":536,"context_line":"        context \u003d pecan.request.context"},{"line_number":537,"context_line":"        cdict \u003d context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_d1d421ed","line":534,"in_reply_to":"da36d5c6_deb8b32c","updated":"2017-02-24 22:37:40.000000000","message":"+1 It was my bad! Right, this should be the class name.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":548,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            raise exception.NotAcceptable()"},{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_be94df8a","line":550,"updated":"2017-02-24 19:09:06.000000000","message":"I think the code is self descriptive enough, this comment seems unnecessary. I don\u0027t insist, though.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"b65c9c238e91aa8334e4f023edb11b656a03a8bb","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":548,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            raise exception.NotAcceptable()"},{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_02902594","line":550,"in_reply_to":"da36d5c6_114959d0","updated":"2017-02-25 01:41:51.000000000","message":"Done","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"a506afe6bc2291a3494d7fca240e0e9ae0030b8d","unresolved":false,"context_lines":[{"line_number":547,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":548,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            raise exception.NotAcceptable()"},{"line_number":550,"context_line":"        # NOTE(aNuposic): This check is to make sure the port is not created"},{"line_number":551,"context_line":"        # without either node_uuid or node_name in the POST call."},{"line_number":552,"context_line":"        # raise invalid to return 400 (BadRequest) in the API."},{"line_number":553,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_114959d0","line":550,"in_reply_to":"da36d5c6_be94df8a","updated":"2017-02-24 22:37:40.000000000","message":"+1 Code readability is good.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            raise exception.NotAcceptable()"},{"line_number":616,"context_line":"        if (\u0027portgroup_uuid\u0027 in fields_to_check and"},{"line_number":617,"context_line":"                not api_utils.allow_portgroups_subcontrollers()):"},{"line_number":618,"context_line":"            raise exception.NotAcceptable()"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        rpc_port \u003d objects.Port.get_by_uuid(context, port_uuid)"},{"line_number":621,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_3e69cff9","line":618,"updated":"2017-02-24 19:09:06.000000000","message":"there should be a check for node_name being allowed, could also check if provided node_name value is string.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"ae77d7e37da790cd700534611111ca29cafbb481","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            raise exception.NotAcceptable()"},{"line_number":616,"context_line":"        if (\u0027portgroup_uuid\u0027 in fields_to_check and"},{"line_number":617,"context_line":"                not api_utils.allow_portgroups_subcontrollers()):"},{"line_number":618,"context_line":"            raise exception.NotAcceptable()"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        rpc_port \u003d objects.Port.get_by_uuid(context, port_uuid)"},{"line_number":621,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_f8cf4a53","line":618,"in_reply_to":"da36d5c6_04e2fa2e","updated":"2017-02-24 20:39:44.000000000","message":"why so? I think that if we allow using both uuid and name, it should be there for all methods?","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8b636dbed2216a6b46de49dc5d22be5c29b2164e","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            raise exception.NotAcceptable()"},{"line_number":616,"context_line":"        if (\u0027portgroup_uuid\u0027 in fields_to_check and"},{"line_number":617,"context_line":"                not api_utils.allow_portgroups_subcontrollers()):"},{"line_number":618,"context_line":"            raise exception.NotAcceptable()"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        rpc_port \u003d objects.Port.get_by_uuid(context, port_uuid)"},{"line_number":621,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_04e2fa2e","line":618,"in_reply_to":"da36d5c6_3e69cff9","updated":"2017-02-24 19:42:59.000000000","message":"Node name will be allowed only in POST call. And check to see if node name is allowed is added at L133. check to see if node_name is of correct type is done by calling is_valid_logical_name() at L173 of objects/node.py","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"b65c9c238e91aa8334e4f023edb11b656a03a8bb","unresolved":false,"context_lines":[{"line_number":615,"context_line":"            raise exception.NotAcceptable()"},{"line_number":616,"context_line":"        if (\u0027portgroup_uuid\u0027 in fields_to_check and"},{"line_number":617,"context_line":"                not api_utils.allow_portgroups_subcontrollers()):"},{"line_number":618,"context_line":"            raise exception.NotAcceptable()"},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"        rpc_port \u003d objects.Port.get_by_uuid(context, port_uuid)"},{"line_number":621,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_4734effa","line":618,"in_reply_to":"da36d5c6_f8cf4a53","updated":"2017-02-25 01:41:51.000000000","message":"I agree, but then RFE needs to be changed as right now it just state about POST. Lets discuss this with upstream folks is there a need to add node_name in PATCH call.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"3a373ff245bf88b5fd5b28454175217e71b19996","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                #                    conversion."},{"line_number":86,"context_line":"                self.node_id \u003d node.id"},{"line_number":87,"context_line":"                # Adding the value to _node_name as well to avoid multiple"},{"line_number":88,"context_line":"                # db access"},{"line_number":89,"context_line":"                self._node_name \u003d node.name"},{"line_number":90,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":91,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_41a2ed9b","line":88,"updated":"2017-02-27 18:08:24.000000000","message":"shouldn\u0027t there be a check for allow_node_name?","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"363e1bac165042f36cb42ece8bfe2169cdce263b","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                #                    conversion."},{"line_number":86,"context_line":"                self.node_id \u003d node.id"},{"line_number":87,"context_line":"                # Adding the value to _node_name as well to avoid multiple"},{"line_number":88,"context_line":"                # db access"},{"line_number":89,"context_line":"                self._node_name \u003d node.name"},{"line_number":90,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":91,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_f7b9e2cc","line":88,"in_reply_to":"da36d5c6_41a2ed9b","updated":"2017-02-27 19:52:53.000000000","message":"Why there should be? In case of lower API get or patch request with node_uuid, there is a check at L193 that won\u0027t allow to add node_name in the fields. Do you think I should Unset node_name if not allowed by the current version?","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"446d3fd4eeb7b61ce878b42dd90e64a9700535cc","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":147,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":148,"context_line":"                    raise"},{"line_number":149,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":150,"context_line":"            self._node_name \u003d wtypes.Unset"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_0c959787","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":12},"updated":"2017-02-27 13:59:04.000000000","message":"Just `else` would be better","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"3a373ff245bf88b5fd5b28454175217e71b19996","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":147,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":148,"context_line":"                    raise"},{"line_number":149,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":150,"context_line":"            self._node_name \u003d wtypes.Unset"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_8154e5ca","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":12},"in_reply_to":"da36d5c6_0c959787","updated":"2017-02-27 18:08:24.000000000","message":"I don\u0027t agree. In such case, when value to set would be identical as the current one, it would be set to unset, which is obviously wrong.","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"cc0c7d2c623ab2b2a0646465857d36c44bb9964b","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":147,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":148,"context_line":"                    raise"},{"line_number":149,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":150,"context_line":"            self._node_name \u003d wtypes.Unset"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_5cf574c9","line":149,"range":{"start_line":149,"start_character":8,"end_line":149,"end_character":12},"in_reply_to":"da36d5c6_8154e5ca","updated":"2017-02-27 18:28:22.000000000","message":"+1 Joanna. This elif is used to set the value when it is already Unset.","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"3a373ff245bf88b5fd5b28454175217e71b19996","unresolved":false,"context_lines":[{"line_number":587,"context_line":"    @METRICS.timer(\u0027PortsController.patch\u0027)"},{"line_number":588,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":589,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"},{"line_number":590,"context_line":"    def patch(self, port_uuid, patch):"},{"line_number":591,"context_line":"        \"\"\"Update an existing port."},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        :param port_uuid: UUID of a port."}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_01b3950b","line":590,"updated":"2017-02-27 18:08:24.000000000","message":"as agreed today, this should also handle node_name :)","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"363e1bac165042f36cb42ece8bfe2169cdce263b","unresolved":false,"context_lines":[{"line_number":587,"context_line":"    @METRICS.timer(\u0027PortsController.patch\u0027)"},{"line_number":588,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":589,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"},{"line_number":590,"context_line":"    def patch(self, port_uuid, patch):"},{"line_number":591,"context_line":"        \"\"\"Update an existing port."},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        :param port_uuid: UUID of a port."}],"source_content_type":"text/x-python","patch_set":13,"id":"da36d5c6_9776e604","line":590,"in_reply_to":"da36d5c6_01b3950b","updated":"2017-02-27 19:52:53.000000000","message":"Yup will submit next patch to handle node_name in this method.","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"720cb86f25243a6f00ac7448e7ea90965b5bb5ee","unresolved":false,"context_lines":[{"line_number":587,"context_line":"    @METRICS.timer(\u0027PortsController.patch\u0027)"},{"line_number":588,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":589,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"},{"line_number":590,"context_line":"    def patch(self, port_uuid, patch):"},{"line_number":591,"context_line":"        \"\"\"Update an existing port."},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"        :param port_uuid: UUID of a port."}],"source_content_type":"text/x-python","patch_set":13,"id":"ba2be162_94b97a31","line":590,"in_reply_to":"da36d5c6_9776e604","updated":"2017-02-28 21:48:57.000000000","message":"Done","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":619,"context_line":"            # NOTE(lucasagomes):"},{"line_number":620,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":621,"context_line":"            #    not present in the API object"},{"line_number":622,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_6613470e","line":622,"updated":"2017-03-01 23:05:48.000000000","message":"this is a total nit, but I would change order to the one you use when checking for values (node_name is frist here).","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"337bf4cf942eaaadfbf97ca3cd3d6b83d91a16ef","unresolved":false,"context_lines":[{"line_number":619,"context_line":"            # NOTE(lucasagomes):"},{"line_number":620,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":621,"context_line":"            #    not present in the API object"},{"line_number":622,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_163b92d2","line":622,"in_reply_to":"ba2be162_6613470e","updated":"2017-03-02 01:50:21.000000000","message":"Sure","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":621,"context_line":"            #    not present in the API object"},{"line_number":622,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":626,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_26306f9e","line":623,"updated":"2017-03-01 23:05:48.000000000","message":"I\u0027d check if there were both name and uuid in the request - in such case Invalid should be raised.","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"337bf4cf942eaaadfbf97ca3cd3d6b83d91a16ef","unresolved":false,"context_lines":[{"line_number":620,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":621,"context_line":"            #    not present in the API object"},{"line_number":622,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":626,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_9626a2b8","line":623,"in_reply_to":"ba2be162_26306f9e","updated":"2017-03-02 01:50:21.000000000","message":"Actually right now if I pass both node_name and node_uuid then as node_name is checked first node_uuid becomes non-existent object and raise PatchError while applying the patch at L634. PatchError will throw BadRequest.","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"95c946b75d1efd115da654b7224fe3bfe91a9238","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":626,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":627,"context_line":"            else:"},{"line_number":628,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_054ab783","line":626,"range":{"start_line":626,"start_character":54,"end_line":626,"end_character":64},"updated":"2017-03-07 11:35:27.000000000","message":"why node_id, while you re trying to set node_name?","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"464788b463f28d77dbaaa62c18ab4cdd4f91983c","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":624,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":625,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":626,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":627,"context_line":"            else:"},{"line_number":628,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_b9834b55","line":626,"range":{"start_line":626,"start_character":54,"end_line":626,"end_character":64},"in_reply_to":"9a30ddce_054ab783","updated":"2017-03-10 23:47:29.000000000","message":"port_dict will not have node_name. Don\u0027t want to make db layer changes as stated in RFE.","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"85c8593b41d4c86b5a0cab6baf8ccb7f4a95853e","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            else:"},{"line_number":630,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":631,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a25e98e_29ffa935","line":628,"updated":"2017-03-13 18:29:54.000000000","message":"I don\u0027t think I understand your response from patch 14, Anup. From how the code looks, it seems like the path will be the same for both cases:\n* name and uuid\n* name\nbecause then it won\u0027t go to else. How it may be a cause of bad request?\n\nAlso - I agree with Galyna. With these 2 usages it\u0027s even less clear. How about moving port_dict.pop(\u0027node_id\u0027) to ln  621 and just setting empty values for node_uuid and node_name?","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e7536911f1df423eb3359f41fd3e195a0ca79ae7","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            else:"},{"line_number":630,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":631,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_9d11b3b2","line":628,"in_reply_to":"3a1ff146_b6072d1b","updated":"2017-03-16 18:35:55.000000000","message":"It will raise a Patch_Error when both are passed with the same path, before checking for incorrect name or uuid.","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"4211581c8f337a0b2a4e022da6dd2130fd206c86","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            else:"},{"line_number":630,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":631,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_19e5ad08","line":628,"in_reply_to":"7a25e98e_29ffa935","updated":"2017-03-17 18:55:27.000000000","message":"Fixed.","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"6e567f6fa44f939935efcf2b0f6c7c21d8a3a502","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            else:"},{"line_number":630,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":631,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a1ff146_b6072d1b","line":628,"in_reply_to":"7a25e98e_29ffa935","updated":"2017-03-15 22:21:31.000000000","message":"Hi Anup, there could be a case of correct uuid and incorrect name. Will that be handled here?","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"e7536911f1df423eb3359f41fd3e195a0ca79ae7","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict[\u0027node_name\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":629,"context_line":"            else:"},{"line_number":630,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":631,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a1ced50_7d8dd77a","line":628,"in_reply_to":"7a25e98e_29ffa935","updated":"2017-03-16 18:35:55.000000000","message":"Yes when name and uuid are passed then that time control will not go to else and throw BAD_REQUEST, but that\u0027s what is expected to not pass both uuid and name at the same time?\nFor node_id, yes I will do some workaround may be pop node_id earlier as you suggested","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f188910c1c74ac46ad9fc9b6178ecd30cd67496a","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":629,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":630,"context_line":"            else:"},{"line_number":631,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_6d2c1b4b","line":628,"updated":"2017-03-17 20:49:24.000000000","message":"thanks for this change Anup, but port_dict.pop(\u0027node_id\u0027) can be moved to line 624 (before the parent if), because it\u0027s executed in both if and else. then ln 629 can be:\nport_dict[\u0027node_uuid\u0027] \u003d None","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fca95878fac3164dd21ac2f8145edc2e9652a408","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":629,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":630,"context_line":"            else:"},{"line_number":631,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_48474dbb","line":628,"in_reply_to":"1a1ced50_6d2c1b4b","updated":"2017-03-17 21:27:51.000000000","message":"If it is moved outside the parent if then when replacing other attributes like portgroup_uuid with no node_name or node_uuid passed in request then it will throw \"node_id\" attribute not present error raised at L108 because always \u0027node_uuid\u0027 will be passed None.","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"aa7ce2f55a9fb9a7522f9aec632bb4d21f65d452","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"},{"line_number":141,"context_line":"                    self._node_name \u003d node.name"},{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    self._node_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_eb0c4a96","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":32},"updated":"2017-03-20 14:20:48.000000000","message":"Shouldn\u0027t this be self._node_id?","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"},{"line_number":141,"context_line":"                    self._node_name \u003d node.name"},{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    self._node_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_9624c4af","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":32},"in_reply_to":"1a1ced50_91b13be4","updated":"2017-03-21 00:06:50.000000000","message":"Nope, _node_name, _node_uuid and _portgroup_uuid are not part of the db object, so they have to be manually defined in ln68-70, fields that are used for them in db: portgroup_id and node_id are not prefixed with an underscore","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0a3ba6311c4956face47e85af4e87a334d47c59b","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"},{"line_number":141,"context_line":"                    self._node_name \u003d node.name"},{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    self._node_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_9fad4feb","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":32},"in_reply_to":"1a1ced50_9624c4af","updated":"2017-03-23 21:03:54.000000000","message":"Right, thanks Joanna. Yes i meant defined in class Port of this file :) Worded it badly though.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8a6b0d9ec71edacdefd5478538c8bdae4be92a1d","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                try:"},{"line_number":140,"context_line":"                    node \u003d objects.Node.get(pecan.request.context, value)"},{"line_number":141,"context_line":"                    self._node_name \u003d node.name"},{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    self._node_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_91b13be4","line":142,"range":{"start_line":142,"start_character":20,"end_line":142,"end_character":32},"in_reply_to":"1a1ced50_eb0c4a96","updated":"2017-03-20 18:21:32.000000000","message":"Nope. self.node_id is the on-fly attribute created as on L86. I see the one\u0027s actually defined for the Port object are used with \u0027self._\u0027 like node_uuid.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"807ec997ea6ce833a00e107771b00275792210b0","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_d2249eb0","line":548,"range":{"start_line":548,"start_character":8,"end_line":548,"end_character":62},"updated":"2017-03-20 15:16:04.000000000","message":"+1, I think that it is better to separate these checks, because node_name is allowed in specific api versions. So the logic is next:\n- check if node_name is passed (instead of uuid) AND if it is allowed by requested api version\n- if node_name IS NOT passed, then you may check node_uuid presence\n\nThis workflow seems logical to me","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"1ec2f208f8f5379a4c4005aeb53da6ff03e8ac14","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_87f3eb09","line":548,"range":{"start_line":548,"start_character":8,"end_line":548,"end_character":62},"updated":"2017-03-18 14:15:26.000000000","message":"it adds a new check, but why node_uuid is not checked before, and should we add this constraint?\nAnd if we want to check node_name here, api check is needed.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_fb824193","line":548,"range":{"start_line":548,"start_character":8,"end_line":548,"end_character":62},"in_reply_to":"1a1ced50_4e7ac2f2","updated":"2017-03-21 00:06:50.000000000","message":"I agree with Anup. Important thing to know here is that in case of POST request, port which is passed as a param is created using wsme setters (ln 152-181), so this would already be detected at this point.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"aa7ce2f55a9fb9a7522f9aec632bb4d21f65d452","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_8bff56a9","line":548,"range":{"start_line":548,"start_character":8,"end_line":548,"end_character":62},"in_reply_to":"1a1ced50_87f3eb09","updated":"2017-03-20 14:20:48.000000000","message":"+1","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8a6b0d9ec71edacdefd5478538c8bdae4be92a1d","unresolved":false,"context_lines":[{"line_number":545,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_4e7ac2f2","line":548,"range":{"start_line":548,"start_character":8,"end_line":548,"end_character":62},"in_reply_to":"1a1ced50_d2249eb0","updated":"2017-03-20 18:21:32.000000000","message":"Thank you all, but node_name check is done at L133 and i don\u0027t see a reason to do it again here. Wdyt? It is better to keep in setter instead of having it separately in different methods.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":135,"context_line":"                                mandatory\u003dTrue)"},{"line_number":136,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_a4856ad1","side":"PARENT","line":135,"range":{"start_line":135,"start_character":32,"end_line":135,"end_character":46},"updated":"2017-04-09 14:48:48.000000000","message":"I don\u0027t think it\u0027s appropriate, we can\u0027t ensure the optional node_name is unique.\nNeither the patch makes node_name as mandatory, can be a problem.","commit_id":"604a6fe3e9908fe03107efef83840dd98f207238"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"caa2c620f30290abe115fd24143c55e69f9e90c7","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":135,"context_line":"                                mandatory\u003dTrue)"},{"line_number":136,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_977496d0","side":"PARENT","line":135,"range":{"start_line":135,"start_character":32,"end_line":135,"end_character":46},"in_reply_to":"bff0334d_40242aaf","updated":"2017-04-11 15:16:44.000000000","message":"I guess, for this feature, you can\u0027t make both of them mandatory, however this changes the default behaviour.\nI don\u0027t know how to keep the checks of address+node_uuid or address+node_name in this way either.\nMaybe we just let users to update the relationship with node if it\u0027s not provided when creating port.","commit_id":"604a6fe3e9908fe03107efef83840dd98f207238"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"7729523261932b7895d2d85be87d87f51b2cdd80","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":135,"context_line":"                                mandatory\u003dTrue)"},{"line_number":136,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"7ffa3b31_a87ab0b6","side":"PARENT","line":135,"range":{"start_line":135,"start_character":32,"end_line":135,"end_character":46},"in_reply_to":"bff0334d_977496d0","updated":"2017-04-20 16:57:00.000000000","message":"So, addressed or port-uuid is fetched (depending on PATCH or POST request) and accordingly attached node-name/node-uuid are changed.","commit_id":"604a6fe3e9908fe03107efef83840dd98f207238"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8e539c7b8443eb354babce4751b329c73fa3f714","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":135,"context_line":"                                mandatory\u003dTrue)"},{"line_number":136,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_40242aaf","side":"PARENT","line":135,"range":{"start_line":135,"start_character":32,"end_line":135,"end_character":46},"in_reply_to":"bff0334d_a4856ad1","updated":"2017-04-10 18:13:08.000000000","message":"both node_name and node_uuid are not stated as mandatory because then they would have to be passed in the request. node_name can\u0027t be passed alone with address (which is mandatory). Also we are retrieving the node attached to the unique address that we pass in the request. What do you suggest otherwise?","commit_id":"604a6fe3e9908fe03107efef83840dd98f207238"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(_LW(\"The current version does not support logical \""},{"line_number":135,"context_line":"                                \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                                \"in the request body.\"))"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_042d36fd","line":134,"range":{"start_line":134,"start_character":28,"end_line":134,"end_character":31},"updated":"2017-04-09 14:48:48.000000000","message":"i18n log message is in clearing, we should remove this now.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2b1ace333010bce9f4ff449eff04a7d7c4937800","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(_LW(\"The current version does not support logical \""},{"line_number":135,"context_line":"                                \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                                \"in the request body.\"))"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_9b29838b","line":134,"range":{"start_line":134,"start_character":28,"end_line":134,"end_character":31},"in_reply_to":"bff0334d_042d36fd","updated":"2017-04-10 18:37:18.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                    self._node_uuid \u003d node.uuid"},{"line_number":146,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":147,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"},{"line_number":148,"context_line":"                    raise"},{"line_number":149,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":150,"context_line":"            self._node_name \u003d wtypes.Unset"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_844026a7","line":148,"range":{"start_line":148,"start_character":20,"end_line":148,"end_character":25},"updated":"2017-04-09 14:48:48.000000000","message":"Need to log this before raise.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        :param port_uuid: UUID of a port."},{"line_number":595,"context_line":"        :param patch: a json PATCH document to apply to this port."},{"line_number":596,"context_line":"        :raises: NotAcceptable, HTTPNotFound, PatchError"},{"line_number":597,"context_line":"        \"\"\""},{"line_number":598,"context_line":"        context \u003d pecan.request.context"},{"line_number":599,"context_line":"        cdict \u003d context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_64540254","line":596,"range":{"start_line":596,"start_character":46,"end_line":596,"end_character":56},"updated":"2017-04-09 14:48:48.000000000","message":"not related, but ok with me.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8e539c7b8443eb354babce4751b329c73fa3f714","unresolved":false,"context_lines":[{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        :param port_uuid: UUID of a port."},{"line_number":595,"context_line":"        :param patch: a json PATCH document to apply to this port."},{"line_number":596,"context_line":"        :raises: NotAcceptable, HTTPNotFound, PatchError"},{"line_number":597,"context_line":"        \"\"\""},{"line_number":598,"context_line":"        context \u003d pecan.request.context"},{"line_number":599,"context_line":"        cdict \u003d context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":19,"id":"bff0334d_2042463f","line":596,"range":{"start_line":596,"start_character":46,"end_line":596,"end_character":56},"in_reply_to":"bff0334d_64540254","updated":"2017-04-10 18:13:08.000000000","message":"I think its related because if we pass both node_uuid and node_name in the request then we will see a PatchError.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1f44ad0a3c3652af266f943f70e6f614cfae0226","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_7aa56ba1","line":136,"range":{"start_line":134,"start_character":16,"end_line":136,"end_character":51},"updated":"2017-04-21 19:11:15.000000000","message":"I suppose it\u0027s actually better to include this message into the exception rather than log it into api log. (as it is not really an api misbehaving, it is an incorrect request, so we need to tell it to the end user)","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"3312d5be6301b6c16b91496ab2381f63822980e1","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_node_name(self, value):"},{"line_number":132,"context_line":"        if value and self._node_name !\u003d value:"},{"line_number":133,"context_line":"            if not api_utils.allow_node_name_on_ports():"},{"line_number":134,"context_line":"                LOG.warning(\"The current version does not support logical \""},{"line_number":135,"context_line":"                            \"node names. Please use node_uuid \""},{"line_number":136,"context_line":"                            \"in the request body.\")"},{"line_number":137,"context_line":"                raise exception.NotAcceptable()"},{"line_number":138,"context_line":"            else:"},{"line_number":139,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_185a6b29","line":136,"range":{"start_line":134,"start_character":16,"end_line":136,"end_character":51},"in_reply_to":"7ffa3b31_7aa56ba1","updated":"2017-04-25 20:57:12.000000000","message":"Done","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1f44ad0a3c3652af266f943f70e6f614cfae0226","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    internal_info \u003d wsme.wsattr({wtypes.text: types.jsontype}, readonly\u003dTrue)"},{"line_number":162,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid)"},{"line_number":165,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_7a58cb86","line":164,"updated":"2017-04-21 19:11:15.000000000","message":"with both node_uuid and node_name being not mandatory, we can do a PATCH request that will remove the node association from port completely. We need to add more logic to PATCH I suppose to prevent this.","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"3312d5be6301b6c16b91496ab2381f63822980e1","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    internal_info \u003d wsme.wsattr({wtypes.text: types.jsontype}, readonly\u003dTrue)"},{"line_number":162,"context_line":"    \"\"\"This port\u0027s internal information maintained by ironic\"\"\""},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid)"},{"line_number":165,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_98455b46","line":164,"in_reply_to":"7ffa3b31_7a58cb86","updated":"2017-04-25 20:57:12.000000000","message":"Have added the logic at L641 in P22","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1f44ad0a3c3652af266f943f70e6f614cfae0226","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_7ace8b63","line":549,"range":{"start_line":549,"start_character":45,"end_line":549,"end_character":46},"updated":"2017-04-21 19:11:15.000000000","message":"don\u0027t capitalize it please","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"3312d5be6301b6c16b91496ab2381f63822980e1","unresolved":false,"context_lines":[{"line_number":546,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":547,"context_line":"            raise exception.NotAcceptable()"},{"line_number":548,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":549,"context_line":"            msg \u003d _(\"Port cannot be created. Node_uuid or node_name \""},{"line_number":550,"context_line":"                    \"is required.\")"},{"line_number":551,"context_line":"            raise exception.Invalid(msg)"},{"line_number":552,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_1825cbab","line":549,"range":{"start_line":549,"start_character":45,"end_line":549,"end_character":46},"in_reply_to":"7ffa3b31_7ace8b63","updated":"2017-04-25 20:57:12.000000000","message":"Done","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1f44ad0a3c3652af266f943f70e6f614cfae0226","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":623,"context_line":"            #    not present in the API object"},{"line_number":624,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_7a41eba8","line":625,"updated":"2017-04-21 19:11:15.000000000","message":"I think we should error out if both node_name and node_uuid are provided in request. As they can conflict, and it is not obvious which has more priority, uuid or name. Same comment for POST","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0fa3b36c14098aaca8a41da90fe6d6aa5c87e502","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":623,"context_line":"            #    not present in the API object"},{"line_number":624,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_5ba58803","line":625,"in_reply_to":"5ff73747_697c07eb","updated":"2017-04-26 01:07:26.000000000","message":"For POST, as we are using as_dict() and that will take all the fields we are exposing, I am trying to figure out how to access the data from pecan.request object directly and then place a check there. If you know specifically how it has been done earlier let me know","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"3c2ed19d0b2ae0b21866bc8e661a4a46f055b609","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"},{"line_number":623,"context_line":"            #    not present in the API object"},{"line_number":624,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5ff73747_697c07eb","line":625,"in_reply_to":"7ffa3b31_7a41eba8","updated":"2017-04-25 19:34:00.000000000","message":"So right now, when both node_name and node_uuid are passed we get patch error because node_id is popped just once. Do you want me to check for if both are passed in the request before L625?\nFor POST call, i guess I will add more logic to check if both are passed and throw an exception.","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1f44ad0a3c3652af266f943f70e6f614cfae0226","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":626,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":627,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":628,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":629,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":630,"context_line":"            else:"},{"line_number":631,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":632,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":21,"id":"7ffa3b31_7afc4b6f","line":629,"range":{"start_line":628,"start_character":16,"end_line":629,"end_character":45},"updated":"2017-04-21 19:11:15.000000000","message":"Hrm, so you basically remove all the node info you\u0027ve had in this case... But we know that something is in the patch, so maybe it\u0027s fine.","commit_id":"7447ec029e0be7b598ab134802586d22409ee719"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not ((self._node_uuid \u003d\u003d wtypes.Unset) or"},{"line_number":146,"context_line":"                            (self._node_uuid is None)):"},{"line_number":147,"context_line":"                        raise exception.Invalid()"},{"line_number":148,"context_line":"                    self._node_uuid \u003d node.uuid"},{"line_number":149,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":150,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_376f9293","line":147,"range":{"start_line":147,"start_character":24,"end_line":147,"end_character":49},"updated":"2017-05-19 07:15:33.000000000","message":"In which case this exception can occur?\nAlso I think we need to add some detailed message in this exception.","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"223bec72da5965d47eac60c4ff3b5798d9a116ba","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not ((self._node_uuid \u003d\u003d wtypes.Unset) or"},{"line_number":146,"context_line":"                            (self._node_uuid is None)):"},{"line_number":147,"context_line":"                        raise exception.Invalid()"},{"line_number":148,"context_line":"                    self._node_uuid \u003d node.uuid"},{"line_number":149,"context_line":"                except exception.NodeNotFound as e:"},{"line_number":150,"context_line":"                    e.code \u003d http_client.BAD_REQUEST"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_ad2b40e9","line":147,"range":{"start_line":147,"start_character":24,"end_line":147,"end_character":49},"in_reply_to":"ff0f0b1f_376f9293","updated":"2017-05-19 18:52:17.000000000","message":"This is when node_uuid and node_name are both passed in the POST request. When only node_name is passed node_uuid will be Unset and that time we assign the value at L148. Yes, I will add appropriate message (slipped off my mind)","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        self._check_allowed_port_fields(pdict)"},{"line_number":559,"context_line":"        if (not api_utils.allow_port_advanced_net_fields() and"},{"line_number":560,"context_line":"                set(pdict).intersection(self.advanced_net_fields)):"},{"line_number":561,"context_line":"            raise exception.NotAcceptable()"},{"line_number":562,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":563,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":564,"context_line":"            raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_9799be6f","line":561,"range":{"start_line":561,"start_character":28,"end_line":561,"end_character":41},"updated":"2017-05-19 07:15:33.000000000","message":"What about adding some message about this failure?","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"223bec72da5965d47eac60c4ff3b5798d9a116ba","unresolved":false,"context_lines":[{"line_number":558,"context_line":"        self._check_allowed_port_fields(pdict)"},{"line_number":559,"context_line":"        if (not api_utils.allow_port_advanced_net_fields() and"},{"line_number":560,"context_line":"                set(pdict).intersection(self.advanced_net_fields)):"},{"line_number":561,"context_line":"            raise exception.NotAcceptable()"},{"line_number":562,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":563,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":564,"context_line":"            raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_8d34fcfc","line":561,"range":{"start_line":561,"start_character":28,"end_line":561,"end_character":41},"in_reply_to":"ff0f0b1f_9799be6f","updated":"2017-05-19 18:52:17.000000000","message":"Whoops, these checks are moved to method at L558, i guess did not resolved the conflict correctly .","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":561,"context_line":"            raise exception.NotAcceptable()"},{"line_number":562,"context_line":"        if (not api_utils.allow_portgroups_subcontrollers() and"},{"line_number":563,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":564,"context_line":"            raise exception.NotAcceptable()"},{"line_number":565,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":566,"context_line":"            msg \u003d _(\"Port cannot be created. node_uuid or node_name \""},{"line_number":567,"context_line":"                    \"is required.\")"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_779cea5c","line":564,"range":{"start_line":564,"start_character":28,"end_line":564,"end_character":41},"updated":"2017-05-19 07:15:33.000000000","message":"ditto","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":564,"context_line":"            raise exception.NotAcceptable()"},{"line_number":565,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":566,"context_line":"            msg \u003d _(\"Port cannot be created. node_uuid or node_name \""},{"line_number":567,"context_line":"                    \"is required.\")"},{"line_number":568,"context_line":"            raise exception.Invalid(msg)"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_f7eb5ad9","line":566,"updated":"2017-05-19 07:15:33.000000000","message":"Either node_uuid or node_name ...","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"223bec72da5965d47eac60c4ff3b5798d9a116ba","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            \u0027portgroup_uuid\u0027 in pdict):"},{"line_number":564,"context_line":"            raise exception.NotAcceptable()"},{"line_number":565,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":566,"context_line":"            msg \u003d _(\"Port cannot be created. node_uuid or node_name \""},{"line_number":567,"context_line":"                    \"is required.\")"},{"line_number":568,"context_line":"            raise exception.Invalid(msg)"},{"line_number":569,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_8be064ce","line":566,"in_reply_to":"ff0f0b1f_f7eb5ad9","updated":"2017-05-19 18:52:17.000000000","message":"Done","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":566,"context_line":"            msg \u003d _(\"Port cannot be created. node_uuid or node_name \""},{"line_number":567,"context_line":"                    \"is required.\")"},{"line_number":568,"context_line":"            raise exception.Invalid(msg)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":571,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_577e8619","line":568,"range":{"start_line":568,"start_character":28,"end_line":568,"end_character":35},"updated":"2017-05-19 07:15:33.000000000","message":"I think we should raise \"BadRequest\" exception here as Invalid means some unacceptable parameters. WDYT?","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"223bec72da5965d47eac60c4ff3b5798d9a116ba","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        if not (\u0027node_name\u0027 in pdict or \u0027node_uuid\u0027 in pdict):"},{"line_number":566,"context_line":"            msg \u003d _(\"Port cannot be created. node_uuid or node_name \""},{"line_number":567,"context_line":"                    \"is required.\")"},{"line_number":568,"context_line":"            raise exception.Invalid(msg)"},{"line_number":569,"context_line":""},{"line_number":570,"context_line":"        extra \u003d pdict.get(\u0027extra\u0027)"},{"line_number":571,"context_line":"        vif \u003d extra.get(\u0027vif_port_id\u0027) if extra else None"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_cd02f40b","line":568,"range":{"start_line":568,"start_character":28,"end_line":568,"end_character":35},"in_reply_to":"ff0f0b1f_577e8619","updated":"2017-05-19 18:52:17.000000000","message":"Invalid throws BadRequest http code hence that.","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d9ebfece7854d34f131873daa5c9c9ffeb0ee5e5","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            # 2) Add node_uuid or node_name depending upon the request made"},{"line_number":637,"context_line":"            if (api_utils.get_patch_values(patch, \u0027/node_name\u0027)):"},{"line_number":638,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":639,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":640,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":641,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":642,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":24,"id":"ff0f0b1f_379e7254","line":639,"range":{"start_line":639,"start_character":36,"end_line":639,"end_character":49},"updated":"2017-05-19 07:15:33.000000000","message":"Ditto. Add message here.","commit_id":"7b6bc9e5229721c2e6db23d3ea133165beb0e933"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"691bf71d512ecc3c3baba703d22fc8d0456ce8a1","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from ironic.common import utils as common_utils"},{"line_number":38,"context_line":"from ironic import objects"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_b9c13483","line":40,"updated":"2017-05-20 18:48:06.000000000","message":"Unused now","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fe854178e6a0094c3933121a36f20474f579b34e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from ironic.common import utils as common_utils"},{"line_number":38,"context_line":"from ironic import objects"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_5aca6aa1","line":40,"in_reply_to":"ff0f0b1f_b9c13483","updated":"2017-05-25 21:12:23.000000000","message":"Done","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"691bf71d512ecc3c3baba703d22fc8d0456ce8a1","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not (self._node_uuid \u003d\u003d wtypes.Unset):"},{"line_number":146,"context_line":"                        msg \u003d _(\"Port cannot be created because node_name \""},{"line_number":147,"context_line":"                                \"and node_uuid are both passed in the request \""},{"line_number":148,"context_line":"                                \"body. Please use either node_name or \""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_79bb9c0d","line":145,"range":{"start_line":145,"start_character":23,"end_line":145,"end_character":60},"updated":"2017-05-20 18:48:06.000000000","message":"self._node_uuid !\u003d wtypes.Unset :)","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fe854178e6a0094c3933121a36f20474f579b34e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                    self.node_id \u003d node.id"},{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not (self._node_uuid \u003d\u003d wtypes.Unset):"},{"line_number":146,"context_line":"                        msg \u003d _(\"Port cannot be created because node_name \""},{"line_number":147,"context_line":"                                \"and node_uuid are both passed in the request \""},{"line_number":148,"context_line":"                                \"body. Please use either node_name or \""}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_7ad52e43","line":145,"range":{"start_line":145,"start_character":23,"end_line":145,"end_character":60},"in_reply_to":"ff0f0b1f_79bb9c0d","updated":"2017-05-25 21:12:23.000000000","message":"Not needed now","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"691bf71d512ecc3c3baba703d22fc8d0456ce8a1","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not (self._node_uuid \u003d\u003d wtypes.Unset):"},{"line_number":146,"context_line":"                        msg \u003d _(\"Port cannot be created because node_name \""},{"line_number":147,"context_line":"                                \"and node_uuid are both passed in the request \""},{"line_number":148,"context_line":"                                \"body. Please use either node_name or \""},{"line_number":149,"context_line":"                                \"node_uuid\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_d94bc828","line":146,"updated":"2017-05-20 18:48:06.000000000","message":"Hrm, during POST, the port object will be created empty, and then will be filled with attributes that are in the request body, so in this case I think you can not guarantee that this setter will be called after node_uuid setter, so the following situation might be possible:\n\nboth name and uuid are provided in POST request\nname setter called first, passes fine\nuuid setter called afterwards, passes too\n\nApart from that, this check will make it impossible to change the node_name value by assigning a new value to it, not sure we use such thing anywhere as of now, but we should not forbid this I think.\n\nInstead, we could just check the pecan.request.json_body inside the post method to see if both are provided.","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fe854178e6a0094c3933121a36f20474f579b34e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not (self._node_uuid \u003d\u003d wtypes.Unset):"},{"line_number":146,"context_line":"                        msg \u003d _(\"Port cannot be created because node_name \""},{"line_number":147,"context_line":"                                \"and node_uuid are both passed in the request \""},{"line_number":148,"context_line":"                                \"body. Please use either node_name or \""},{"line_number":149,"context_line":"                                \"node_uuid\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_9ad00256","line":146,"in_reply_to":"ff0f0b1f_92117e55","updated":"2017-05-25 21:12:23.000000000","message":"Done","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"570a1a69f5fdd18c1b2dbc0e7e2865e94dbb7fba","unresolved":false,"context_lines":[{"line_number":143,"context_line":"                    # Adding a value to _node_uuid as well to avoid multiple"},{"line_number":144,"context_line":"                    # db access"},{"line_number":145,"context_line":"                    if not (self._node_uuid \u003d\u003d wtypes.Unset):"},{"line_number":146,"context_line":"                        msg \u003d _(\"Port cannot be created because node_name \""},{"line_number":147,"context_line":"                                \"and node_uuid are both passed in the request \""},{"line_number":148,"context_line":"                                \"body. Please use either node_name or \""},{"line_number":149,"context_line":"                                \"node_uuid\")"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_92117e55","line":146,"in_reply_to":"ff0f0b1f_d94bc828","updated":"2017-05-22 22:00:27.000000000","message":"I thought the control will first come in the setter and so should handle here than the post method, but I agree simple check as you said in the post method will be enough (I was actually looking for direct method to access json data). Will change this in the latest patch. \nI am not clear, how will it be impossible to change the node_name? I mean with PATCH call new value to node_name can be assigned","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"691bf71d512ecc3c3baba703d22fc8d0456ce8a1","unresolved":false,"context_lines":[{"line_number":635,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":636,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":637,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":638,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":639,"context_line":"            else:"},{"line_number":640,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":641,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_995550c9","line":638,"range":{"start_line":638,"start_character":16,"end_line":638,"end_character":45},"updated":"2017-05-20 18:48:06.000000000","message":"Sorry, maybe I have asked this already, but why do we need this line?","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"570a1a69f5fdd18c1b2dbc0e7e2865e94dbb7fba","unresolved":false,"context_lines":[{"line_number":635,"context_line":"                if not api_utils.allow_node_name_on_ports():"},{"line_number":636,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":637,"context_line":"                port_dict.pop(\u0027node_id\u0027)"},{"line_number":638,"context_line":"                port_dict[\u0027node_name\u0027] \u003d None"},{"line_number":639,"context_line":"            else:"},{"line_number":640,"context_line":"                port_dict[\u0027node_uuid\u0027] \u003d port_dict.pop(\u0027node_id\u0027, None)"},{"line_number":641,"context_line":"            # NOTE(vsaienko):"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_c12966e6","line":638,"range":{"start_line":638,"start_character":16,"end_line":638,"end_character":45},"in_reply_to":"ff0f0b1f_995550c9","updated":"2017-05-22 22:00:27.000000000","message":"Sorry if I didn\u0027t answer it earlier, this is added because node_name needs to be present in pdict otherwise we will not be able to apply the patch at L646 when node_name is passed in the request","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"691bf71d512ecc3c3baba703d22fc8d0456ce8a1","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":648,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        if (api_utils.is_path_removed(patch, \u0027/node_uuid\u0027) or"},{"line_number":651,"context_line":"                api_utils.is_path_removed(patch, \u0027/node_name\u0027)):"},{"line_number":652,"context_line":"            msg \u003d _(\"Cannot remove association of node with port\")"},{"line_number":653,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_19cdc0b7","line":650,"updated":"2017-05-20 18:48:06.000000000","message":"Oh, it seems like this one https://github.com/openstack/ironic/blob/1e49c7b07beb61cf2b5d4c15e3c344e158ade796/ironic/api/controllers/v1/types.py#L220 may be handy, instead of adding more checks here.","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"570a1a69f5fdd18c1b2dbc0e7e2865e94dbb7fba","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":648,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        if (api_utils.is_path_removed(patch, \u0027/node_uuid\u0027) or"},{"line_number":651,"context_line":"                api_utils.is_path_removed(patch, \u0027/node_name\u0027)):"},{"line_number":652,"context_line":"            msg \u003d _(\"Cannot remove association of node with port\")"},{"line_number":653,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_a7b32298","line":650,"in_reply_to":"ff0f0b1f_19cdc0b7","updated":"2017-05-22 22:00:27.000000000","message":"Oh good one, yes i can get rid of these checks by that. But I am wondering using it here will need me to first add the json_body keys in a set and then check for intersection between \u0027non_removable_attrs\u0027 and the above set, wouldn\u0027t the existing one be simpler, wdyt?","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"fe854178e6a0094c3933121a36f20474f579b34e","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":648,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        if (api_utils.is_path_removed(patch, \u0027/node_uuid\u0027) or"},{"line_number":651,"context_line":"                api_utils.is_path_removed(patch, \u0027/node_name\u0027)):"},{"line_number":652,"context_line":"            msg \u003d _(\"Cannot remove association of node with port\")"},{"line_number":653,"context_line":"            raise exception.Invalid(msg)"}],"source_content_type":"text/x-python","patch_set":25,"id":"ff0f0b1f_1a499231","line":650,"in_reply_to":"ff0f0b1f_a7b32298","updated":"2017-05-25 21:12:23.000000000","message":"So, right now have kept as is, as even after overriding _extra_non_removable_attrs there has to be a logic to check if op is \u0027remove\u0027 and path is \u0027node_name\u0027 or \u0027node_uuid\u0027. is_path_removed() does take care of that. Let me know wdyt?","commit_id":"727aad6a3a3a71828443767997a8467a5f930a79"}],"ironic/api/controllers/v1/utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8df0f2771187062b7d9e6f48a69ec0885b59b5d5","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            versions.MINOR_25_UNSET_CHASSIS_UUID)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def allow_node_name():"},{"line_number":430,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":431,"context_line":"    "},{"line_number":432,"context_line":"    Version 1.26 of API added support for node names in API call."},{"line_number":433,"context_line":"    \"\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_a6738fe6","line":430,"updated":"2016-12-02 10:17:20.000000000","message":"This is only for ports, perhaps rename this method to: allow_node_name_on_ports() ? Or something along these lines.","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"acce54c7bf6351f9ed05490cb382d94b0658ffaa","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            versions.MINOR_25_UNSET_CHASSIS_UUID)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def allow_node_name():"},{"line_number":430,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":431,"context_line":"    "},{"line_number":432,"context_line":"    Version 1.26 of API added support for node names in API call."},{"line_number":433,"context_line":"    \"\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_cd6b7c84","line":430,"in_reply_to":"3a71b18c_a6738fe6","updated":"2016-12-07 19:46:55.000000000","message":"Yes. Makes sense. I will update that","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"8df0f2771187062b7d9e6f48a69ec0885b59b5d5","unresolved":false,"context_lines":[{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def allow_node_name():"},{"line_number":430,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":431,"context_line":"    "},{"line_number":432,"context_line":"    Version 1.26 of API added support for node names in API call."},{"line_number":433,"context_line":"    \"\"\"\""},{"line_number":434,"context_line":"    return (pecan.request.version.minor \u003e\u003d version.MINOR_26_NODENAME)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_8603f341","line":431,"range":{"start_line":431,"start_character":0,"end_line":431,"end_character":4},"updated":"2016-12-02 10:17:20.000000000","message":"trailing space","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"acce54c7bf6351f9ed05490cb382d94b0658ffaa","unresolved":false,"context_lines":[{"line_number":428,"context_line":""},{"line_number":429,"context_line":"def allow_node_name():"},{"line_number":430,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":431,"context_line":"    "},{"line_number":432,"context_line":"    Version 1.26 of API added support for node names in API call."},{"line_number":433,"context_line":"    \"\"\"\""},{"line_number":434,"context_line":"    return (pecan.request.version.minor \u003e\u003d version.MINOR_26_NODENAME)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_8d942445","line":431,"range":{"start_line":431,"start_character":0,"end_line":431,"end_character":4},"in_reply_to":"3a71b18c_8603f341","updated":"2016-12-07 19:46:55.000000000","message":"Didn\u0027t realized. Will update in next patch.","commit_id":"3117b61dfe2591dc4a9233bad32226b27dd3d7e8"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"95c946b75d1efd115da654b7224fe3bfe91a9238","unresolved":false,"context_lines":[{"line_number":550,"context_line":""},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"def allow_node_name_on_ports():"},{"line_number":553,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    Version 1.32 of API added support for node names in API call."},{"line_number":556,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_9837eae2","line":553,"range":{"start_line":553,"start_character":7,"end_line":553,"end_character":65},"updated":"2017-03-07 11:35:27.000000000","message":"Better to improve docstring for this method and, may be, the nme of version (to specify that this is node name that allow to be passed to port modifying)\ne.g. MINOR_32_PORT_NODENAME\n\nalso, better to get rid of this \"we should\" in docstring, as this should be more formal\n\n\"\"\"Check if node_name is allowed to be passed in API call for port\"\"\"","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"464788b463f28d77dbaaa62c18ab4cdd4f91983c","unresolved":false,"context_lines":[{"line_number":550,"context_line":""},{"line_number":551,"context_line":""},{"line_number":552,"context_line":"def allow_node_name_on_ports():"},{"line_number":553,"context_line":"    \"\"\"Check if we should allow node_name to be used in API call."},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"    Version 1.32 of API added support for node names in API call."},{"line_number":556,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_d16b4a1c","line":553,"range":{"start_line":553,"start_character":7,"end_line":553,"end_character":65},"in_reply_to":"9a30ddce_9837eae2","updated":"2017-03-10 23:47:29.000000000","message":"Agree. Thanks","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"}],"ironic/api/controllers/v1/versions.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"7d7c124719d56f7e5b4fa384b0cda0116d9e66c2","unresolved":false,"context_lines":[{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"},{"line_number":102,"context_line":"# what the version has changed."},{"line_number":103,"context_line":"MINOR_MAX_VERSION \u003d MINOR_32_NODENAME"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"# String representations of the minor and maximum versions"}],"source_content_type":"text/x-python","patch_set":9,"id":"da36d5c6_cdd059f9","line":102,"range":{"start_line":100,"start_character":0,"end_line":102,"end_character":31},"updated":"2017-02-22 19:46:14.000000000","message":"This does not seem to be done","commit_id":"c9a97be13b73b94bdf6146ae4df6a17a48f214cf"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"4290b2c5c4c817ef143fa8ee8bd96c15a57e52d8","unresolved":false,"context_lines":[{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"},{"line_number":102,"context_line":"# what the version has changed."},{"line_number":103,"context_line":"MINOR_MAX_VERSION \u003d MINOR_32_NODENAME"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"# String representations of the minor and maximum versions"}],"source_content_type":"text/x-python","patch_set":9,"id":"da36d5c6_c2d02322","line":102,"range":{"start_line":100,"start_character":0,"end_line":102,"end_character":31},"in_reply_to":"da36d5c6_cdd059f9","updated":"2017-02-22 20:49:31.000000000","message":"Done","commit_id":"c9a97be13b73b94bdf6146ae4df6a17a48f214cf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"MINOR_29_INJECT_NMI \u003d 29"},{"line_number":96,"context_line":"MINOR_30_DYNAMIC_DRIVERS \u003d 30"},{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_a93d87c5","line":98,"updated":"2017-02-24 19:09:06.000000000","message":"if you change this there is also a need to update doc/source/dev/webapi_version_history","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8b636dbed2216a6b46de49dc5d22be5c29b2164e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"MINOR_29_INJECT_NMI \u003d 29"},{"line_number":96,"context_line":"MINOR_30_DYNAMIC_DRIVERS \u003d 30"},{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"}],"source_content_type":"text/x-python","patch_set":12,"id":"da36d5c6_098e93cf","line":98,"in_reply_to":"da36d5c6_a93d87c5","updated":"2017-02-24 19:42:59.000000000","message":"Have added in patch set 11.","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"95c946b75d1efd115da654b7224fe3bfe91a9238","unresolved":false,"context_lines":[{"line_number":95,"context_line":"MINOR_29_INJECT_NMI \u003d 29"},{"line_number":96,"context_line":"MINOR_30_DYNAMIC_DRIVERS \u003d 30"},{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_3857de03","line":98,"range":{"start_line":98,"start_character":0,"end_line":98,"end_character":17},"updated":"2017-03-07 11:35:27.000000000","message":"ditto\nMINOR_32_PORT_NODENAME","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"464788b463f28d77dbaaa62c18ab4cdd4f91983c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"MINOR_29_INJECT_NMI \u003d 29"},{"line_number":96,"context_line":"MINOR_30_DYNAMIC_DRIVERS \u003d 30"},{"line_number":97,"context_line":"MINOR_31_DYNAMIC_INTERFACES \u003d 31"},{"line_number":98,"context_line":"MINOR_32_NODENAME \u003d 32"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_f14daec4","line":98,"range":{"start_line":98,"start_character":0,"end_line":98,"end_character":17},"in_reply_to":"9a30ddce_3857de03","updated":"2017-03-10 23:47:29.000000000","message":"Done","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"95c946b75d1efd115da654b7224fe3bfe91a9238","unresolved":false,"context_lines":[{"line_number":100,"context_line":"# When adding another version, update MINOR_MAX_VERSION and also update"},{"line_number":101,"context_line":"# doc/source/dev/webapi-version-history.rst with a detailed explanation of"},{"line_number":102,"context_line":"# what the version has changed."},{"line_number":103,"context_line":"MINOR_MAX_VERSION \u003d MINOR_32_NODENAME"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"# String representations of the minor and maximum versions"},{"line_number":106,"context_line":"MIN_VERSION_STRING \u003d \u0027{}.{}\u0027.format(BASE_VERSION, MINOR_1_INITIAL_VERSION)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9a30ddce_983e0ab7","line":103,"range":{"start_line":103,"start_character":20,"end_line":103,"end_character":37},"updated":"2017-03-07 11:35:27.000000000","message":"ditto","commit_id":"28327688fb7e40cbff815e850773a7be6170e583"}],"ironic/objects/node.py":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    def get(cls, context, node_id):"},{"line_number":162,"context_line":"        \"\"\"Find a node based on its id or uuid and return a Node object."},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        :param node_id: the id *or* uuid of a node."},{"line_number":165,"context_line":"        :returns: a :class:`Node` object."},{"line_number":166,"context_line":"        \"\"\""},{"line_number":167,"context_line":"        if strutils.is_int_like(node_id):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_38659db4","line":164,"range":{"start_line":164,"start_character":8,"end_line":164,"end_character":51},"updated":"2016-12-14 21:45:15.000000000","message":"this docstring needs updating\n\nI\u0027m curious if there are any other implications to allowing names here, besides its impact on the API. I don\u0027t think so, just wondering out loud.","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":19686,"name":"Ramamani Yeleswarapu","email":"ramamani.yeleswarapu@intel.com","username":"Rama_Y"},"change_message_id":"cecc3e3ca440729ca2ff407bd258ea5c3dfa2190","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get(cls, context, node_id):"},{"line_number":164,"context_line":"        \"\"\"Find a node based on id or uuid or name and return a Node object."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        :param node_id: the id *or* uuid *or* node-name of a node."},{"line_number":167,"context_line":"        :returns: a :class:`Node` object."},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        if strutils.is_int_like(node_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_b83e54b6","line":166,"range":{"start_line":166,"start_character":46,"end_line":166,"end_character":55},"updated":"2017-02-03 19:51:24.000000000","message":"s/node-name/name ?","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"959d635de6d70c1764807738e1139a8519c621ec","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get(cls, context, node_id):"},{"line_number":164,"context_line":"        \"\"\"Find a node based on id or uuid or name and return a Node object."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        :param node_id: the id *or* uuid *or* node-name of a node."},{"line_number":167,"context_line":"        :returns: a :class:`Node` object."},{"line_number":168,"context_line":"        \"\"\""},{"line_number":169,"context_line":"        if strutils.is_int_like(node_id):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_8c3d1fc6","line":166,"range":{"start_line":166,"start_character":46,"end_line":166,"end_character":55},"in_reply_to":"1a430d35_b83e54b6","updated":"2017-02-09 01:32:49.000000000","message":"Done","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"}],"ironic/tests/unit/api/v1/test_ports.py":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"5259bd0af866238170f654bd33f1626b2d805833","unresolved":false,"context_lines":[{"line_number":1006,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1007,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1008,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1009,"context_line":""},{"line_number":1010,"context_line":"    def test_create_port_invalid_addr_format(self):"},{"line_number":1011,"context_line":"        pdict \u003d post_get_test_port(address\u003d\u0027invalid-format\u0027)"},{"line_number":1012,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a6eadb0_b8cd2d87","line":1009,"updated":"2016-12-14 21:45:15.000000000","message":"The test for when both node UUID and node name aren\u0027t specified should still exist. I\u0027d also like to see test cases for:\n\n- Successful creation of a port by specifying only the node name\n- Test case for when node_uuid and node_name are specified but do not match\n- Test case for when invalid node_name (i.e. one with a special character, like the one in the other test file)\n- Test case for what happens with successive requests when the logical node name changes (the appropriate behavior should be to only allow getting by the new node name)\n\netc.","commit_id":"3057c43cd67b96dc1a20563f0f26a3e9a76e352d"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"da48fb774142768365dd8f029acf5a97e85d1be9","unresolved":false,"context_lines":[{"line_number":1072,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"    def test_create_port_with_only_node_name(self):"},{"line_number":1075,"context_line":"        dbutils.create_test_node(name\u003d\u0027test-node\u0027, uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c124\u0027)"},{"line_number":1076,"context_line":"        pdict \u003d post_get_test_port(node_name\u003d\u0027test-node\u0027, node_uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c124\u0027,"},{"line_number":1077,"context_line":"                                   portgroup_uuid\u003d\u00271be26c0b-03f2-4d2e-ae87-c02d7f33c122\u0027)"},{"line_number":1078,"context_line":"        #del pdict[\u0027node_uuid\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_6d78c32c","line":1075,"updated":"2017-02-01 21:22:15.000000000","message":"I don\u0027t think this will work. \n\nThis test is creating a node: https://github.com/openstack/ironic/blob/master/ironic/tests/unit/api/v1/test_ports.py#L954\n\nand that node defaults to the same UUID you\u0027re making here:\n\nhttps://github.com/openstack/ironic/blob/master/ironic/tests/unit/db/utils.py#L204\n\nso the mocked DB won\u0027t allow duplicate creation, probably.\n\nI\u0027d suggest either:\n\na) Create a node with a different UUID. Portgroup UUID should also be different. You\u0027re making them both the same here.\n\nor (preferred)\n\nb) Just add a name to the test node, either in setUp or in your tests, and use that","commit_id":"721fc7d2695dd058fbfe0df45757a53b4c4c4762"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"da48fb774142768365dd8f029acf5a97e85d1be9","unresolved":false,"context_lines":[{"line_number":1120,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue, headers\u003dself.headers)"},{"line_number":1121,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1122,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1123,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027]) "},{"line_number":1124,"context_line":""},{"line_number":1125,"context_line":"    def test_node_uuid_to_node_id_mapping(self):"},{"line_number":1126,"context_line":"        pdict \u003d post_get_test_port(node_uuid\u003dself.node[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a461143_4d1f8709","line":1123,"range":{"start_line":1123,"start_character":55,"end_line":1123,"end_character":56},"updated":"2017-02-01 21:22:15.000000000","message":"trailing whitespace","commit_id":"721fc7d2695dd058fbfe0df45757a53b4c4c4762"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"7471979e10ee47346c03dcd5b68a32d1a1084cc6","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def setUp(self):"},{"line_number":954,"context_line":"        super(TestPost, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_4ca052f5","line":951,"updated":"2017-02-03 21:45:09.000000000","message":"There should be a negative test to ensure that the create port by node name API call fails when the API version is too low.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"acf5ac5c07d8cb87e331258764d115b7e071a13b","unresolved":false,"context_lines":[{"line_number":948,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":949,"context_line":""},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"    def setUp(self):"},{"line_number":954,"context_line":"        super(TestPost, self).setUp()"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a430d35_4c6df7ca","line":951,"in_reply_to":"1a430d35_4ca052f5","updated":"2017-02-09 01:34:11.000000000","message":"Added in new patchset.","commit_id":"f2fa2ed5fb25289afa4342e24a1e36da967bcab4"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"8c66d24a68541c1cd5e715528fae4d9efda26735","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        del pdict[\u0027node_uuid\u0027]"},{"line_number":1068,"context_line":"        del pdict[\u0027node_name\u0027]"},{"line_number":1069,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":1070,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":1071,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1072,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_9931750e","line":1070,"range":{"start_line":1070,"start_character":37,"end_line":1070,"end_character":51},"updated":"2017-02-21 18:52:03.000000000","message":"It seems we\u0027re returning BadRequest instead of NotAcceptable:\nhttps://review.openstack.org/#/c/405586/8/ironic/api/controllers/v1/port.py@556","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2e556b3b15d8d6c363b9ed0dfd6d5012e8f77cd7","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        del pdict[\u0027node_uuid\u0027]"},{"line_number":1068,"context_line":"        del pdict[\u0027node_name\u0027]"},{"line_number":1069,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":1070,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":1071,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1072,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_7132e360","line":1070,"range":{"start_line":1070,"start_character":37,"end_line":1070,"end_character":51},"in_reply_to":"da36d5c6_29bacec0","updated":"2017-02-22 23:19:45.000000000","message":"Fixed in Patch set 12","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"f800c5cc1ad073641d93b399e409a7bf671d3316","unresolved":false,"context_lines":[{"line_number":1067,"context_line":"        del pdict[\u0027node_uuid\u0027]"},{"line_number":1068,"context_line":"        del pdict[\u0027node_name\u0027]"},{"line_number":1069,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":1070,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":1071,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1072,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1073,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da36d5c6_29bacec0","line":1070,"range":{"start_line":1070,"start_character":37,"end_line":1070,"end_character":51},"in_reply_to":"da36d5c6_9931750e","updated":"2017-02-22 18:26:41.000000000","message":"Ah! Thanks for pointing will update that in next patchset","commit_id":"a447483d77ecca809c7788454d247e6709c13a4d"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":583,"context_line":"                                   headers\u003dself.headers)"},{"line_number":584,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":585,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def test_replace_node_name_and_node_uuid(self, mock_upd):"},{"line_number":588,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_7c975690","line":585,"updated":"2017-03-01 23:05:48.000000000","message":"There should be a check of the body of this port, especially if the node_name was changed","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"38dce39b574f29635fc12695c799a2aa09be4cd9","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":583,"context_line":"                                   headers\u003dself.headers)"},{"line_number":584,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":585,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def test_replace_node_name_and_node_uuid(self, mock_upd):"},{"line_number":588,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_317340e9","line":585,"in_reply_to":"ba2be162_56ba6a24","updated":"2017-03-02 02:58:35.000000000","message":"Done","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"337bf4cf942eaaadfbf97ca3cd3d6b83d91a16ef","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":583,"context_line":"                                   headers\u003dself.headers)"},{"line_number":584,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":585,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":586,"context_line":""},{"line_number":587,"context_line":"    def test_replace_node_name_and_node_uuid(self, mock_upd):"},{"line_number":588,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_56ba6a24","line":585,"in_reply_to":"ba2be162_7c975690","updated":"2017-03-02 01:50:21.000000000","message":"Will add this in next patchset.","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":596,"context_line":"                                   headers\u003dself.headers,"},{"line_number":597,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":598,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":599,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_replace_local_link_connection(self, mock_upd):"},{"line_number":602,"context_line":"        switch_id \u003d \u0027aa:bb:cc:dd:ee:ff\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_dc8cc281","line":599,"updated":"2017-03-01 23:05:48.000000000","message":"where is this exception raised?\nCould you add checking the error message?","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"337bf4cf942eaaadfbf97ca3cd3d6b83d91a16ef","unresolved":false,"context_lines":[{"line_number":596,"context_line":"                                   headers\u003dself.headers,"},{"line_number":597,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":598,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":599,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_replace_local_link_connection(self, mock_upd):"},{"line_number":602,"context_line":"        switch_id \u003d \u0027aa:bb:cc:dd:ee:ff\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_56634adc","line":599,"in_reply_to":"ba2be162_dc8cc281","updated":"2017-03-02 01:50:21.000000000","message":"As replied to your comment inside port.py, this will be thrown when applying patch which raises PatchError.","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":598,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":599,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_replace_local_link_connection(self, mock_upd):"},{"line_number":602,"context_line":"        switch_id \u003d \u0027aa:bb:cc:dd:ee:ff\u0027"},{"line_number":603,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_9cd96a86","line":600,"updated":"2017-03-01 23:05:48.000000000","message":"I think a test for checking not_allowed in certain version would be useful","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"337bf4cf942eaaadfbf97ca3cd3d6b83d91a16ef","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":598,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":599,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_replace_local_link_connection(self, mock_upd):"},{"line_number":602,"context_line":"        switch_id \u003d \u0027aa:bb:cc:dd:ee:ff\u0027"},{"line_number":603,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_b69e46b6","line":600,"in_reply_to":"ba2be162_9cd96a86","updated":"2017-03-02 01:50:21.000000000","message":"You mean in lower api version?","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"38dce39b574f29635fc12695c799a2aa09be4cd9","unresolved":false,"context_lines":[{"line_number":597,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":598,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":599,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_replace_local_link_connection(self, mock_upd):"},{"line_number":602,"context_line":"        switch_id \u003d \u0027aa:bb:cc:dd:ee:ff\u0027"},{"line_number":603,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":14,"id":"ba2be162_914a2c82","line":600,"in_reply_to":"ba2be162_b69e46b6","updated":"2017-03-02 02:58:35.000000000","message":"Done","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"85c8593b41d4c86b5a0cab6baf8ccb7f4a95853e","unresolved":false,"context_lines":[{"line_number":582,"context_line":"        mock_upd.return_value \u003d self.port"},{"line_number":583,"context_line":"        response \u003d self.patch_json(\u0027/ports/%s\u0027 % self.port.uuid,"},{"line_number":584,"context_line":"                                   [{\u0027path\u0027: \u0027/node_name\u0027,"},{"line_number":585,"context_line":"                                     \u0027value\u0027: self.node.name,"},{"line_number":586,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":587,"context_line":"                                   headers\u003dself.headers)"},{"line_number":588,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a25e98e_492065f8","line":585,"updated":"2017-03-13 18:29:54.000000000","message":"there\u0027s no replacement - node name is already set to self.node.name. \nPlease use something else here - create new node, and use it\u0027s name here.","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"85c8593b41d4c86b5a0cab6baf8ccb7f4a95853e","unresolved":false,"context_lines":[{"line_number":601,"context_line":"                                   headers\u003dself.headers,"},{"line_number":602,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":603,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":604,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":605,"context_line":""},{"line_number":606,"context_line":"    def test_replace_node_name_old_api(self, mock_upd):"},{"line_number":607,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":16,"id":"7a25e98e_c98295c8","line":604,"updated":"2017-03-13 18:29:54.000000000","message":"please check the response body.","commit_id":"78dcb7bd5fbd90f5e2d9e4ad3c11cb199229d351"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f188910c1c74ac46ad9fc9b6178ecd30cd67496a","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        mock_upd.return_value \u003d self.port"},{"line_number":607,"context_line":"        test_new_node \u003d obj_utils.create_test_node("},{"line_number":608,"context_line":"            self.context,"},{"line_number":609,"context_line":"            name\u003d\u0027test-node-2\u0027,"},{"line_number":610,"context_line":"            uuid\u003duuidutils.generate_uuid())"},{"line_number":611,"context_line":"        mock_upd.return_value.node_id \u003d test_new_node.id"},{"line_number":612,"context_line":"        patch_error \u003d \"Couldn\u0027t apply patch\""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_0d93a75c","line":609,"updated":"2017-03-17 20:49:24.000000000","message":"this second node can be created in setup method, so it appears only once.","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2d4bb6ae710350a03297fbd6e430ca7abbc9c066","unresolved":false,"context_lines":[{"line_number":606,"context_line":"        mock_upd.return_value \u003d self.port"},{"line_number":607,"context_line":"        test_new_node \u003d obj_utils.create_test_node("},{"line_number":608,"context_line":"            self.context,"},{"line_number":609,"context_line":"            name\u003d\u0027test-node-2\u0027,"},{"line_number":610,"context_line":"            uuid\u003duuidutils.generate_uuid())"},{"line_number":611,"context_line":"        mock_upd.return_value.node_id \u003d test_new_node.id"},{"line_number":612,"context_line":"        patch_error \u003d \"Couldn\u0027t apply patch\""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_d3b04ef7","line":609,"in_reply_to":"1a1ced50_0d93a75c","updated":"2017-03-17 21:59:35.000000000","message":"Done","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f188910c1c74ac46ad9fc9b6178ecd30cd67496a","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":622,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":623,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":624,"context_line":"        self.assertIn(patch_error, response.json[\u0027error_message\u0027])"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    def test_replace_node_name_old_api(self, mock_upd):"},{"line_number":627,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_8da6b7bf","line":624,"updated":"2017-03-17 20:49:24.000000000","message":"Imho this check is insufficient. It checks only for the beginning of error message which is always the same instead of checking the \u0027Reason: \u003c\u003e\u0027 part.","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2d4bb6ae710350a03297fbd6e430ca7abbc9c066","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":622,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":623,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_code)"},{"line_number":624,"context_line":"        self.assertIn(patch_error, response.json[\u0027error_message\u0027])"},{"line_number":625,"context_line":""},{"line_number":626,"context_line":"    def test_replace_node_name_old_api(self, mock_upd):"},{"line_number":627,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a1ced50_1393c65c","line":624,"in_reply_to":"1a1ced50_8da6b7bf","updated":"2017-03-17 21:59:35.000000000","message":"Done","commit_id":"a01eea45778280d9553db2e8e53733ea7f4b5598"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":466,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context, name\u003d\u0027test-node\u0027)"},{"line_number":467,"context_line":"        self.port \u003d obj_utils.create_test_port(self.context,"},{"line_number":468,"context_line":"                                               node_id\u003dself.node.id)"},{"line_number":469,"context_line":"        self.test_new_node \u003d obj_utils.create_test_node("},{"line_number":470,"context_line":"            self.context,"},{"line_number":471,"context_line":"            name\u003d\u0027test-node-2\u0027,"},{"line_number":472,"context_line":"            uuid\u003duuidutils.generate_uuid())"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_b669c0c0","line":469,"updated":"2017-03-21 00:06:50.000000000","message":"please rename to node2, the usages don\u0027t look clear.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0a3ba6311c4956face47e85af4e87a334d47c59b","unresolved":false,"context_lines":[{"line_number":466,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context, name\u003d\u0027test-node\u0027)"},{"line_number":467,"context_line":"        self.port \u003d obj_utils.create_test_port(self.context,"},{"line_number":468,"context_line":"                                               node_id\u003dself.node.id)"},{"line_number":469,"context_line":"        self.test_new_node \u003d obj_utils.create_test_node("},{"line_number":470,"context_line":"            self.context,"},{"line_number":471,"context_line":"            name\u003d\u0027test-node-2\u0027,"},{"line_number":472,"context_line":"            uuid\u003duuidutils.generate_uuid())"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffe62b97_cbb7dd3a","line":469,"in_reply_to":"1a1ced50_b669c0c0","updated":"2017-03-23 21:03:54.000000000","message":"Done","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"                                  headers\u003dself.headers)"},{"line_number":1210,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1211,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1212,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"    def test_create_port_node_name_old_api_version(self):"},{"line_number":1215,"context_line":"        pdict \u003d post_get_test_port(node_name\u003d\u0027test-node\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_965be42d","line":1212,"updated":"2017-03-21 00:06:50.000000000","message":"please check for the error message, not for the existence of error message (in all the 400 Bad Request cases)","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0a3ba6311c4956face47e85af4e87a334d47c59b","unresolved":false,"context_lines":[{"line_number":1209,"context_line":"                                  headers\u003dself.headers)"},{"line_number":1210,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1211,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1212,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1213,"context_line":""},{"line_number":1214,"context_line":"    def test_create_port_node_name_old_api_version(self):"},{"line_number":1215,"context_line":"        pdict \u003d post_get_test_port(node_name\u003d\u0027test-node\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"ffe62b97_0baee5e6","line":1212,"in_reply_to":"1a1ced50_965be42d","updated":"2017-03-23 21:03:54.000000000","message":"Done","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d5640c6a53d6877f5563b5ed55b055a52adb933e","unresolved":false,"context_lines":[{"line_number":1248,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":1249,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1250,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1251,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1252,"context_line":""},{"line_number":1253,"context_line":"    def test_create_port_with_node_name_and_node_uuid(self):"},{"line_number":1254,"context_line":"        pdict \u003d post_get_test_port()"}],"source_content_type":"text/x-python","patch_set":26,"id":"ff0f0b1f_a3cf0f28","line":1251,"updated":"2017-05-26 09:59:18.000000000","message":"Please add a assertion against the error message also.","commit_id":"d43f4f76c517711090c6df77c534ebec1609461b"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d5640c6a53d6877f5563b5ed55b055a52adb933e","unresolved":false,"context_lines":[{"line_number":1257,"context_line":"                                  headers\u003dself.headers)"},{"line_number":1258,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":1259,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":1260,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":1261,"context_line":""},{"line_number":1262,"context_line":"    def test_create_port_with_only_node_name(self):"},{"line_number":1263,"context_line":"        pdict \u003d post_get_test_port()"}],"source_content_type":"text/x-python","patch_set":26,"id":"ff0f0b1f_43515362","line":1260,"updated":"2017-05-26 09:59:18.000000000","message":"You can add a check against the error message \"Port cannot be created because node_name..\"","commit_id":"d43f4f76c517711090c6df77c534ebec1609461b"}],"ironic/tests/unit/objects/test_node.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"7d7c124719d56f7e5b4fa384b0cda0116d9e66c2","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":56,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_get_bad_id_and_uuid(self):"},{"line_number":59,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":60,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da36d5c6_2d8ad51b","line":58,"updated":"2017-02-22 19:46:14.000000000","message":"Maybe this test should be renamed","commit_id":"c9a97be13b73b94bdf6146ae4df6a17a48f214cf"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"4290b2c5c4c817ef143fa8ee8bd96c15a57e52d8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":56,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def test_get_bad_id_and_uuid(self):"},{"line_number":59,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":60,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"da36d5c6_82a9cb92","line":58,"in_reply_to":"da36d5c6_2d8ad51b","updated":"2017-02-22 20:49:31.000000000","message":"Done","commit_id":"c9a97be13b73b94bdf6146ae4df6a17a48f214cf"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"1ec2f208f8f5379a4c4005aeb53da6ff03e8ac14","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_bad_id_or_uuid_or_name(self):"},{"line_number":60,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":61,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_e7dadf77","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":46},"updated":"2017-03-18 14:15:26.000000000","message":"I think we should add a new test case, not overwrite the old one.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0a3ba6311c4956face47e85af4e87a334d47c59b","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_bad_id_or_uuid_or_name(self):"},{"line_number":60,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":61,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ffe62b97_4ba4ed08","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":46},"in_reply_to":"1a1ced50_16e45439","updated":"2017-03-23 21:03:54.000000000","message":"Thanks Joanna, have added a test for node_name.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8a6b0d9ec71edacdefd5478538c8bdae4be92a1d","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_bad_id_or_uuid_or_name(self):"},{"line_number":60,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":61,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_aeba566c","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":46},"in_reply_to":"1a1ced50_4bab9ed6","updated":"2017-03-20 18:21:32.000000000","message":"This test also needs to be changed because now if you pass something like \u0027not-a-uuid\u0027 then it will not fail as names are allowed. Hence i did a common one that handles both. If new test is created it would be almost the same with special characters passed in the body. I feel we can keep the same, your thoughts please?","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_bad_id_or_uuid_or_name(self):"},{"line_number":60,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":61,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_16e45439","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":46},"in_reply_to":"1a1ced50_aeba566c","updated":"2017-03-21 00:06:50.000000000","message":"Change in this test is totally fine. I think there should be additional positive test case test_get_by_name right above this one.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"aa7ce2f55a9fb9a7522f9aec632bb4d21f65d452","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            mock_get_node.assert_called_once_with(uuid)"},{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_bad_id_or_uuid_or_name(self):"},{"line_number":60,"context_line":"        self.assertRaises(exception.InvalidIdentity,"},{"line_number":61,"context_line":"                          objects.Node.get, self.context, \u002723#adf45\u0027)"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"1a1ced50_4bab9ed6","line":59,"range":{"start_line":59,"start_character":4,"end_line":59,"end_character":46},"in_reply_to":"1a1ced50_e7dadf77","updated":"2017-03-20 14:20:48.000000000","message":"+1","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"52b2c38e2b6d5486df90c9f8de412c610a6afe5a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            self.assertEqual(self.context, node._context)"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def test_get_by_name(self):"},{"line_number":60,"context_line":"        node2 \u003d obj_utils.create_test_node(self.context, name\u003d\u0027test-node\u0027)"},{"line_number":61,"context_line":"        name \u003d node2.name"},{"line_number":62,"context_line":"        with mock.patch.object(self.dbapi, \u0027get_node_by_name\u0027,"},{"line_number":63,"context_line":"                               autospec\u003dTrue) as mock_get_node_by_name:"}],"source_content_type":"text/x-python","patch_set":19,"id":"ffe62b97_1cc50d8f","line":60,"updated":"2017-03-23 22:23:29.000000000","message":"this can be simply \u0027node\u0027 - please ignore this comment, unless there are other things to fix.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"}],"releasenotes/notes/allow-logical-name-in-port-creation-59a2b41c42275f03.yaml":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"03ff1c7ed0140298644246395da14d6a5f565d6f","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body while creating"},{"line_number":4,"context_line":"    port via a POST /v1/ports API call. Now, in the request body"},{"line_number":5,"context_line":"    either ``node_uuid`` can be passed or ``node_name``."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":12,"id":"da36d5c6_a9166749","line":5,"updated":"2017-02-24 19:09:06.000000000","message":"please include info that this is allowed in 1.32 or higher","commit_id":"0454e287d342f83864d785e0e10409bf00f6b1a6"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"446d3fd4eeb7b61ce878b42dd90e64a9700535cc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body while creating"},{"line_number":4,"context_line":"    port via a POST /v1/ports API call. Now, in the request body"},{"line_number":5,"context_line":"    either ``node_uuid`` can be passed or ``node_name``."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"da36d5c6_8c77c707","line":5,"range":{"start_line":4,"start_character":39,"end_line":5,"end_character":56},"updated":"2017-02-27 13:59:04.000000000","message":"Not clear for me what you want to say)","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"cc0c7d2c623ab2b2a0646465857d36c44bb9964b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body while creating"},{"line_number":4,"context_line":"    port via a POST /v1/ports API call. Now, in the request body"},{"line_number":5,"context_line":"    either ``node_uuid`` can be passed or ``node_name``."},{"line_number":6,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":13,"id":"da36d5c6_dc92444b","line":5,"range":{"start_line":4,"start_character":39,"end_line":5,"end_character":56},"in_reply_to":"da36d5c6_8c77c707","updated":"2017-02-27 18:28:22.000000000","message":"That means only pass either node_name or node_uuid in the request body along with address. Do not pass both the values in the request because in that case port would be created for the node whose address is passed.","commit_id":"81098a5765c01f279fca93b5dfeb31cf02f42975"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9bf98e4614babbe66c6ddce9ab8b79ffa6852ee4","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body while creating"},{"line_number":4,"context_line":"    and updating a port via POST /v1/ports and PATCH /v1/ports API call."},{"line_number":5,"context_line":"    Now, in the request body either ``node_uuid`` can be passed or"},{"line_number":6,"context_line":"    ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"ba2be162_1c62daad","line":6,"updated":"2017-03-01 23:05:48.000000000","message":"Please mention that the version was upgraded\n(and probably add info about PATCH to files regarding version)","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"38dce39b574f29635fc12695c799a2aa09be4cd9","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body while creating"},{"line_number":4,"context_line":"    and updating a port via POST /v1/ports and PATCH /v1/ports API call."},{"line_number":5,"context_line":"    Now, in the request body either ``node_uuid`` can be passed or"},{"line_number":6,"context_line":"    ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":14,"id":"ba2be162_b14d709b","line":6,"in_reply_to":"ba2be162_1c62daad","updated":"2017-03-02 02:58:35.000000000","message":"Done","commit_id":"28b349f9007b563ccb372978748a43d17d46a5f8"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"807ec997ea6ce833a00e107771b00275792210b0","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a1ced50_d5b808e8","line":6,"range":{"start_line":5,"start_character":34,"end_line":6,"end_character":49},"updated":"2017-03-20 15:16:04.000000000","message":"This is almost duplicate of the first line, be more brief.\n\nJust sth like:\n\n\"Allows to pass ``node_name`` instead of ``node_uuid`` while creating and updating a port since REST API version 1.32\"","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"1ec2f208f8f5379a4c4005aeb53da6ff03e8ac14","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a1ced50_27e5d736","line":6,"range":{"start_line":6,"start_character":4,"end_line":6,"end_character":49},"updated":"2017-03-18 14:15:26.000000000","message":"``node_uuid`` or ``node_name`` can be passed.","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"0a3ba6311c4956face47e85af4e87a334d47c59b","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"ffe62b97_4b6f4dc5","line":6,"range":{"start_line":5,"start_character":34,"end_line":6,"end_character":49},"in_reply_to":"1a1ced50_362dd046","updated":"2017-03-23 21:03:54.000000000","message":"Done","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"eca1f2e7537ea2fa112d4c039ca05ef43682a7a3","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a1ced50_362dd046","line":6,"range":{"start_line":5,"start_character":34,"end_line":6,"end_character":49},"in_reply_to":"1a1ced50_ce0dd23f","updated":"2017-03-21 00:06:50.000000000","message":"I think the word \u0027or\u0027 is vital here. \nInstead could mislead in a way that it would look like we\u0027re replacing uuid support with name support. \nHowever, I\u0027d rephrase it to: \n\u0027Now, either ``node_uuid`` or ``node_name`` can be passed in the request body`","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8a6b0d9ec71edacdefd5478538c8bdae4be92a1d","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":18,"id":"1a1ced50_ce0dd23f","line":6,"range":{"start_line":5,"start_character":34,"end_line":6,"end_character":49},"in_reply_to":"1a1ced50_d5b808e8","updated":"2017-03-20 18:21:32.000000000","message":"++ Wang\nGalyna, just thought using \u0027instead\u0027 would be misleading as one might think now only node_name can be passed, wdyt?","commit_id":"2c4ed1388ecea2f86537205ded9510c1ae536428"},{"author":{"_account_id":15750,"name":"Julian Edwards","email":"bigjools@gmail.com","username":"bigjools"},"change_message_id":"571a5d543fd87b3027edc2ff5586837968f98afe","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"ffe62b97_8e14f5a1","line":3,"range":{"start_line":3,"start_character":11,"end_line":3,"end_character":18},"updated":"2017-03-27 01:35:30.000000000","message":"Grammar: \"passing\"","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9b50d82c31c004a1f62b5b7022b17c52dc90a19","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7ffa3b31_c3327df2","line":3,"range":{"start_line":3,"start_character":11,"end_line":3,"end_character":18},"in_reply_to":"ffe62b97_8e14f5a1","updated":"2017-04-20 17:02:20.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"ba0e2810691fa2162d88f27f847efed651fe074b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bff0334d_bed42021","line":4,"range":{"start_line":3,"start_character":53,"end_line":4,"end_character":16},"updated":"2017-04-11 10:09:03.000000000","message":"s/from/since using REST API microversion","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9b50d82c31c004a1f62b5b7022b17c52dc90a19","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7ffa3b31_a32f7186","line":4,"range":{"start_line":3,"start_character":53,"end_line":4,"end_character":16},"in_reply_to":"bff0334d_bed42021","updated":"2017-04-20 17:02:20.000000000","message":"Done","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":22724,"name":"Galyna Zholtkevych","email":"galynazholtkevych1991@gmail.com","username":"gzholtkevych"},"change_message_id":"ba0e2810691fa2162d88f27f847efed651fe074b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bff0334d_5eb874e3","line":5,"range":{"start_line":4,"start_character":56,"end_line":5,"end_character":32},"updated":"2017-04-11 10:09:03.000000000","message":"What about PUT request? It will be done in follow-up or it is not supposed to be implemented?","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"d9b50d82c31c004a1f62b5b7022b17c52dc90a19","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"7ffa3b31_c3471d4c","line":5,"range":{"start_line":4,"start_character":56,"end_line":5,"end_character":32},"in_reply_to":"bff0334d_5eb874e3","updated":"2017-04-20 17:02:20.000000000","message":"This RFE was actually meant for POST. But yes, I can submit follow up patch for PUT, DELETE if folks want. :)","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"a29c1b6c0799d114728d4cd8caa7ee4014eeabf7","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bff0334d_64d9a2f1","line":6,"range":{"start_line":5,"start_character":59,"end_line":6,"end_character":49},"updated":"2017-04-09 14:48:48.000000000","message":"Please check patch set 18.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":24828,"name":"Kaifeng Wang","email":"kaifeng.w@gmail.com","username":"wangkf"},"change_message_id":"caa2c620f30290abe115fd24143c55e69f9e90c7","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bff0334d_37502a0b","line":6,"range":{"start_line":5,"start_character":59,"end_line":6,"end_character":49},"in_reply_to":"bff0334d_20a486a5","updated":"2017-04-11 15:16:44.000000000","message":"No, the meaning is clear, I just think the form \u0027either x or y\u0027 is better. Because you marked Done there, I guess you forgot to change.\nAnyway, I am not insist that, keep it unchanged is also fine with me.","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"2b1ace333010bce9f4ff449eff04a7d7c4937800","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows to pass ``node_name`` in the request body from REST API"},{"line_number":4,"context_line":"    version 1.32 while creating and updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    and PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":19,"id":"bff0334d_20a486a5","line":6,"range":{"start_line":5,"start_character":59,"end_line":6,"end_character":49},"in_reply_to":"bff0334d_64d9a2f1","updated":"2017-04-10 18:37:18.000000000","message":"I followed Joanna\u0027s suggestion. I feel it is OK. Do you feel it is that unclear?","commit_id":"1cd7422156994b632bc3b7b7de0f9fc55b775901"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"d5640c6a53d6877f5563b5ed55b055a52adb933e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Allows passing ``node_name`` in the request body  since REST API"},{"line_number":4,"context_line":"    version 1.32 while creating or updating a port via POST /v1/ports"},{"line_number":5,"context_line":"    or PATCH /v1/ports API call. Now, in the request body either"},{"line_number":6,"context_line":"    ``node_uuid`` can be passed or ``node_name``."},{"line_number":7,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":26,"id":"ff0f0b1f_c398c31c","line":6,"range":{"start_line":5,"start_character":33,"end_line":6,"end_character":49},"updated":"2017-05-26 09:59:18.000000000","message":"Rephrase:\n\nNow, either ``node_uuid`` or ``node_name`` can be passed in in the request body.","commit_id":"d43f4f76c517711090c6df77c534ebec1609461b"}]}
