)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":21,"context_line":"Spec available at:"},{"line_number":22,"context_line":"http://specs.openstack.org/openstack/ironic-specs/specs/liberty/"},{"line_number":23,"context_line":"ironic-ml2-integration.html"},{"line_number":24,"context_line":"Note: this is an initial draft only and is still work in progress."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Partial-bug: #1526403"},{"line_number":27,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"1a7b0d38_e2a3079d","line":24,"updated":"2015-12-23 13:18:33.000000000","message":"ditto should be removed.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":21,"context_line":"Spec available at:"},{"line_number":22,"context_line":"http://specs.openstack.org/openstack/ironic-specs/specs/liberty/"},{"line_number":23,"context_line":"ironic-ml2-integration.html"},{"line_number":24,"context_line":"Note: this is an initial draft only and is still work in progress."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Partial-bug: #1526403"},{"line_number":27,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"1a7b0d38_c719d4d8","line":24,"in_reply_to":"1a7b0d38_e2a3079d","updated":"2016-01-05 17:48:21.000000000","message":"Done","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dd9cbd820de58bb6da8a27a47a78f4403ea50af1","unresolved":false,"context_lines":[{"line_number":24,"context_line":"- port.portgroup_uuid: contains UUID of a portgroup this port"},{"line_number":25,"context_line":"      belongs to"},{"line_number":26,"context_line":"- port.pxe_enabled: indicates whether pxe is enabled or disabled"},{"line_number":27,"context_line":"      on the node"},{"line_number":28,"context_line":"- port.local_link_connection: contains the port binding profile."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Partial-bug: #1526403"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":109,"id":"7aa08908_16380e3d","line":27,"range":{"start_line":27,"start_character":13,"end_line":27,"end_character":17},"updated":"2016-06-15 17:36:24.000000000","message":"nit: s/node/port/?","commit_id":"1f65bda72ff5e6231565b08580ee52d067ec6d58"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vladyslav Drok \u003cvdrok@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-07-13 13:39:56 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add multitenancy-related fields to port API object"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This commit adds new fields to port object:"},{"line_number":10,"context_line":"- port.pxe_enabled: indicates whether pxe is enabled or disabled"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":116,"id":"1aa78d24_947b6af4","line":7,"updated":"2016-07-13 18:33:19.000000000","message":"nit, if you do another revision. s/multitenancy/advanced-network/","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"doc/source/webapi/v1.rst":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"**1.15**"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"   This API version adds the portgroup support"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"**1.14**"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-rst","patch_set":50,"id":"9a68dd71_55d886ef","line":37,"updated":"2016-01-27 01:32:05.000000000","message":"This is documentation so I would like more details. What does portgroup support include?\n  - new /v1/nodes/\u003cnode\u003e/portgroups?\n  - changes to /v1/ports requests\n  - new /v1/portgroups/...?","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"**1.15**"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"   This API version adds the portgroup support"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"**1.14**"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-rst","patch_set":50,"id":"7a5de9d1_8cd06bcb","line":37,"in_reply_to":"9a68dd71_55d886ef","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"change_message_id":"ecde157e1676976f2bd37a33d55d4500760ff52b","unresolved":false,"context_lines":[{"line_number":250,"context_line":"   :members:"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":".. autotype:: ironic.api.controllers.v1.port.Port"},{"line_number":253,"context_line":"   :members:"}],"source_content_type":"text/x-rst","patch_set":69,"id":"dae33548_74f11601","line":253,"range":{"start_line":253,"start_character":11,"end_line":253,"end_character":12},"updated":"2016-02-17 02:25:01.000000000","message":"Could you please add a new section Portgroup also?","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    * \u0027/v1/nodes/\u003cnode\u003e/portgroups\u0027"},{"line_number":40,"context_line":"    * \u0027/v1/portgroups/\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    Add node ``portgroup`` fields."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"**1.16**"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":96,"id":"dab17558_e8900098","line":42,"updated":"2016-05-06 10:34:40.000000000","message":"I suspect you wanted to say: ``portgroups`` field","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    * \u0027/v1/nodes/\u003cnode\u003e/portgroups\u0027"},{"line_number":40,"context_line":"    * \u0027/v1/portgroups/\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    Add node ``portgroup`` fields."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"**1.16**"},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":96,"id":"bab6814e_e231b60c","line":42,"in_reply_to":"dab17558_e8900098","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":267,"context_line":"   :members:"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":".. autotype:: ironic.api.controllers.v1.portgroup.Portgroup"},{"line_number":270,"context_line":"   :members:"}],"source_content_type":"text/x-rst","patch_set":96,"id":"dab17558_c88d3c7d","line":270,"updated":"2016-05-06 10:34:40.000000000","message":"We have a new approach to API documentation, see http://docs.openstack.org/contributor-guide/api-guides.html","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":267,"context_line":"   :members:"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":".. autotype:: ironic.api.controllers.v1.portgroup.Portgroup"},{"line_number":270,"context_line":"   :members:"}],"source_content_type":"text/x-rst","patch_set":96,"id":"bab6814e_220f3e3a","line":270,"in_reply_to":"dab17558_c88d3c7d","updated":"2016-05-26 14:57:35.000000000","message":"I will add documentation in a separate patch.","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2b530c521ecc5ac252b6371ab6e616feb67ef340","unresolved":false,"context_lines":[{"line_number":263,"context_line":"Portgroups"},{"line_number":264,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":".. rest-controller:: ironic.api.controllers.v1.portgroup:PortgroupsController"},{"line_number":267,"context_line":"   :webprefix: /v1/portgroups"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":".. autotype:: ironic.api.controllers.v1.portgroup.PortgroupCollection"}],"source_content_type":"text/x-rst","patch_set":110,"id":"3aaa91ec_d5132e0c","line":266,"updated":"2016-06-21 17:00:21.000000000","message":"Ugh, missed this part. Will reupload when the multitenancy job finishes.","commit_id":"5cc5d934e31ad1cf29c37e8855355e4463b94548"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"**1.19**"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    This API version adds the multitenancy-related ``local_link_connection``"},{"line_number":38,"context_line":"    and ``pxe_enabled`` fields to a port."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"**1.18**"}],"source_content_type":"text/x-rst","patch_set":116,"id":"1aa78d24_2bacdeeb","line":37,"updated":"2016-07-13 18:33:19.000000000","message":"I\u0027m not sure we should make it sound like these are only multitenancy related since they aren\u0027t. I\u0027d s/the multitenancy-related//.\n\nNone of the other descriptions start with \u0027This API version\u0027 so we probably shouldn\u0027t start that.\n\nHow about \"Add ``local_link_connection`` and ``pxe_enabled`` fields to a port.\"","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"**1.19**"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    This API version adds the multitenancy-related ``local_link_connection``"},{"line_number":38,"context_line":"    and ``pxe_enabled`` fields to a port."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"**1.18**"}],"source_content_type":"text/x-rst","patch_set":116,"id":"1aa78d24_ea6f62fa","line":37,"updated":"2016-07-13 20:46:21.000000000","message":"agreed","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"ironic/api/controllers/v1/__init__.py":[{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"2ef81939f73c63fa0bc880b8e8378aa3daa2480d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"from ironic.api.controllers.v1 import node"},{"line_number":35,"context_line":"from ironic.api.controllers.v1 import port"},{"line_number":36,"context_line":"from ironic.api.controllers.v1 import versions"},{"line_number":37,"context_line":"from ironic.api.controllers.v1 import portgroup"},{"line_number":38,"context_line":"from ironic.api import expose"},{"line_number":39,"context_line":"from ironic.common.i18n import _"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_df842f0c","line":37,"updated":"2015-08-30 11:22:53.000000000","message":"this line should be in L36 for pep8","commit_id":"36cd434dac386e80db6dcbd372121263bd7b9507"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6ecddbc3000f9adcacbca06f93c24fc73fbc2634","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                        bookmark\u003dTrue)"},{"line_number":123,"context_line":"                    ]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        v1.portgroups \u003d [link.Link.make_link(\u0027self\u0027, pecan.request.public_url,"},{"line_number":126,"context_line":"                                             \u0027portgroups\u0027, \u0027\u0027),"},{"line_number":127,"context_line":"                         link.Link.make_link(\u0027bookmark\u0027,"},{"line_number":128,"context_line":"                                             pecan.request.public_url,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_2bf68fd7","line":125,"updated":"2016-02-11 13:20:17.000000000","message":"So it will be present no matter what api version is in the request. Is it possible to hide this completely depending on the requested version?","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                        bookmark\u003dTrue)"},{"line_number":123,"context_line":"                    ]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        v1.portgroups \u003d [link.Link.make_link(\u0027self\u0027, pecan.request.public_url,"},{"line_number":126,"context_line":"                                             \u0027portgroups\u0027, \u0027\u0027),"},{"line_number":127,"context_line":"                         link.Link.make_link(\u0027bookmark\u0027,"},{"line_number":128,"context_line":"                                             pecan.request.public_url,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_e13dc8dd","line":125,"in_reply_to":"3a57f1b5_26fb087b","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":122,"context_line":"                                        bookmark\u003dTrue)"},{"line_number":123,"context_line":"                    ]"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        v1.portgroups \u003d [link.Link.make_link(\u0027self\u0027, pecan.request.public_url,"},{"line_number":126,"context_line":"                                             \u0027portgroups\u0027, \u0027\u0027),"},{"line_number":127,"context_line":"                         link.Link.make_link(\u0027bookmark\u0027,"},{"line_number":128,"context_line":"                                             pecan.request.public_url,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_26fb087b","line":125,"in_reply_to":"3a57f1b5_2bf68fd7","updated":"2016-02-12 00:09:01.000000000","message":"It is; we\u0027ve done this with subresources of /nodes in the past. I\u0027d like to do this here as well.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"}],"ironic/api/controllers/v1/node.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":609,"context_line":"    states \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":610,"context_line":"    \"\"\"Links to endpoint for retrieving and setting node states\"\"\""},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    portgroups \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":613,"context_line":"    \"\"\"Links to the collection of portgroups on this node\"\"\""},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    # NOTE(deva): \"conductor_affinity\" shouldn\u0027t be presented on the"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_d5c0f6e2","line":612,"updated":"2016-01-27 01:32:05.000000000","message":"it\u0027d be nice to put this before/after ports (above)","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":609,"context_line":"    states \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":610,"context_line":"    \"\"\"Links to endpoint for retrieving and setting node states\"\"\""},{"line_number":611,"context_line":""},{"line_number":612,"context_line":"    portgroups \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":613,"context_line":"    \"\"\"Links to the collection of portgroups on this node\"\"\""},{"line_number":614,"context_line":""},{"line_number":615,"context_line":"    # NOTE(deva): \"conductor_affinity\" shouldn\u0027t be presented on the"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_cf9ad5c5","line":612,"in_reply_to":"9a68dd71_d5c0f6e2","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                   node_uuid + \"/states\","},{"line_number":658,"context_line":"                                                   bookmark\u003dTrue)]"},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"            node.portgroups \u003d [link.Link.make_link(\u0027self\u0027, url, \u0027nodes\u0027,"},{"line_number":661,"context_line":"                                                   node_uuid + \"/portgroups\"),"},{"line_number":662,"context_line":"                               link.Link.make_link(\u0027bookmark\u0027, url, \u0027nodes\u0027,"},{"line_number":663,"context_line":"                                                   node_uuid + \"/portgroups\","}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_b530e208","line":660,"updated":"2016-01-27 01:32:05.000000000","message":"Do we want to expose this if the api version is \u003c 1.MINOR_15_PORTGROUP ?","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":657,"context_line":"                                                   node_uuid + \"/states\","},{"line_number":658,"context_line":"                                                   bookmark\u003dTrue)]"},{"line_number":659,"context_line":""},{"line_number":660,"context_line":"            node.portgroups \u003d [link.Link.make_link(\u0027self\u0027, url, \u0027nodes\u0027,"},{"line_number":661,"context_line":"                                                   node_uuid + \"/portgroups\"),"},{"line_number":662,"context_line":"                               link.Link.make_link(\u0027bookmark\u0027, url, \u0027nodes\u0027,"},{"line_number":663,"context_line":"                                                   node_uuid + \"/portgroups\","}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_b5100aaa","line":660,"in_reply_to":"9a68dd71_b530e208","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    @staticmethod"},{"line_number":730,"context_line":"    def _convert_with_links(node, url, fields\u003dNone, show_password\u003dTrue,"},{"line_number":731,"context_line":"                            show_states_links\u003dTrue, show_portgoups\u003dTrue):"},{"line_number":732,"context_line":"        # NOTE(lucasagomes): Since we are able to return a specified set of"},{"line_number":733,"context_line":"        # fields the \"uuid\" can be unset, so we need to save it in another"},{"line_number":734,"context_line":"        # variable to use when building the links"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_463f2424","line":731,"updated":"2016-02-12 00:09:01.000000000","message":"s/portgoups/portgroups/ here and below as well.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":728,"context_line":""},{"line_number":729,"context_line":"    @staticmethod"},{"line_number":730,"context_line":"    def _convert_with_links(node, url, fields\u003dNone, show_password\u003dTrue,"},{"line_number":731,"context_line":"                            show_states_links\u003dTrue, show_portgoups\u003dTrue):"},{"line_number":732,"context_line":"        # NOTE(lucasagomes): Since we are able to return a specified set of"},{"line_number":733,"context_line":"        # fields the \"uuid\" can be unset, so we need to save it in another"},{"line_number":734,"context_line":"        # variable to use when building the links"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_01334415","line":731,"in_reply_to":"3a57f1b5_463f2424","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"}],"ironic/api/controllers/v1/port.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0688c27c651e139d35b3121cf4f2e7412a2ba285","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    pxe_enabled \u003d types.boolean"},{"line_number":118,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    local_link_connection \u003d {wtypes.text: types.jsontype}"},{"line_number":121,"context_line":"    \"\"\"The port binding profile for each portgroup\"\"\""}],"source_content_type":"text/x-python","patch_set":19,"id":"da20952f_9e07eb17","line":118,"updated":"2015-09-09 22:46:12.000000000","message":"s/on the node/on the port/","commit_id":"59c104ac877a5b97e5c1991fbf475abf708b190d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"036ac72994a2fcf8cc02d153303f815d72fb9ba0","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        # state return a 409 response."},{"line_number":456,"context_line":"        patch_port_connectivity_attributes \u003d False"},{"line_number":457,"context_line":"        for p in patch:"},{"line_number":458,"context_line":"            if (p[\u0027path\u0027] \u003d\u003d \u0027/portgroup_uuid\u0027 or"},{"line_number":459,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/pxe_enabled\u0027 or"},{"line_number":460,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/local_link_connection\u0027):"},{"line_number":461,"context_line":"                patch_port_connectivity_attributes \u003d True"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_96cd4687","line":458,"updated":"2015-11-02 15:55:02.000000000","message":"nit: if (p[\u0027path\u0027] in (\u0027/portgroup_uuid\u0027, \u0027/pxe_enabled\u0027, \u0027/local_link_connection\u0027):","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        # state return a 409 response."},{"line_number":456,"context_line":"        patch_port_connectivity_attributes \u003d False"},{"line_number":457,"context_line":"        for p in patch:"},{"line_number":458,"context_line":"            if (p[\u0027path\u0027] \u003d\u003d \u0027/portgroup_uuid\u0027 or"},{"line_number":459,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/pxe_enabled\u0027 or"},{"line_number":460,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/local_link_connection\u0027):"},{"line_number":461,"context_line":"                patch_port_connectivity_attributes \u003d True"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_2010dd00","line":458,"in_reply_to":"1a26ad4f_96cd4687","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"c6a7a1f09db02e09767bc6ec33e6c0321c50e955","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/local_link_connection\u0027):"},{"line_number":461,"context_line":"                patch_port_connectivity_attributes \u003d True"},{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_7b1b9cca","line":463,"updated":"2015-11-03 06:42:35.000000000","message":"A race is possible here if node change provision_state after this db select. Check below should be moved on conductor manager side under the node lock.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"2dafdc9049e12f0aaeb6b0d91f46158ae8afb1a1","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/local_link_connection\u0027):"},{"line_number":461,"context_line":"                patch_port_connectivity_attributes \u003d True"},{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_48cc9535","line":463,"in_reply_to":"1a26ad4f_7b1b9cca","updated":"2015-11-16 15:11:43.000000000","message":"Done, diff can be viewed temporarily at\nhttps://github.com/yhvh/ironic/commit/c6f353673840a3c0a8d3268f3b00e722435972f4","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                    p[\u0027path\u0027] \u003d\u003d \u0027/local_link_connection\u0027):"},{"line_number":461,"context_line":"                patch_port_connectivity_attributes \u003d True"},{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_20277d65","line":463,"in_reply_to":"ba8a016a_48cc9535","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"5c093fdbc9f0d41b39f6fc01de343a200d8d0804","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"fa69d971_9aaaabd3","line":97,"updated":"2015-12-31 07:20:07.000000000","message":"I find a problem from test. i think it\u0027s ok for a port not belong to any portgroup. i want to set port\u0027s portgroup_uuid to None and find it doesn\u0027t work. find kwargs don\u0027t have portgroup_id properties, and portgroup_uuid i pass in is \u0027\u0027,so at last self.portgroup_id can\u0027t be set, and then rpc_port can\u0027t be update as i expect.\n\nit works if i add this code:\nelif value \u003d\u003d \u0027\u0027:\n            self._portgroup_uuid \u003d wtypes.Unset\n            self.portgroup_id \u003d wtypes.Unset","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"4a32bc06741b836a30f81f9acfead8db967f3652","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_5ce74aac","line":97,"in_reply_to":"da6ed579_234dcfc3","updated":"2016-01-18 09:43:55.000000000","message":"yes. but when i use  \"ironic port-update \u003cuuid\u003e remove portgroup_uuid\" command,it does not work yet. i think it\u0027s the code bug at line 479. i fix it bellow,you can check. thanks.\n# Update only the fields that have changed\n        for field in objects.Port.fields:\n            try:\n                patch_val \u003d getattr(port, field)\n            except AttributeError:\n                # Ignore fields that aren\u0027t exposed in the API\n                if field \u003d\u003d \u0027portgroup_id\u0027:\n                    patch_val \u003d getattr(port, \u0027portgroup_uuid\u0027)\n                    if patch_val \u003d\u003d wtypes.Unset:\n                        patch_val \u003d None\n                    if rpc_port[field] !\u003d patch_val:\n                        rpc_port[field] \u003d patch_val\n                continue\n            if patch_val \u003d\u003d wtypes.Unset:\n                patch_val \u003d None\n            if rpc_port[field] !\u003d patch_val:\n                rpc_port[field] \u003d patch_vall","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"e66ec259991f589da70589d392ca68b1b20c350a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_d3223701","line":97,"in_reply_to":"da6ed579_3fae082f","updated":"2016-01-13 03:29:20.000000000","message":"yes, port\u0027portgroup_uuid can be none when create by no set --portgroup-uuid param. But if we update it to one exit portgroup after create and then want to set it to none againt,it does not works. so i think we also need to support the scenes.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"f6c205f44d5162757d9981a7b1b75cad53eaad7f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"ba63e191_904b7fb0","line":97,"in_reply_to":"da6ed579_5ce74aac","updated":"2016-01-19 05:55:04.000000000","message":"OK, the problem have fix here if you means this \"https://review.openstack.org/#/c/206244/47/ironic/api/controllers/v1/port.py\"   greate!","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"55fd867b1cea84651c656308bc285115c68e7c91","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_234dcfc3","line":97,"in_reply_to":"da6ed579_d3223701","updated":"2016-01-15 18:40:33.000000000","message":"Hi lifen, indeed the current behavior is strange, I proposed a different solution on PS46, as I think more correct way to remove it is to call \"ironic port-update \u003cuuid\u003e remove portgroup_uuid\", not to set it to \u0027\u0027.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b1aa523ae151a9cf9ea598c338c295137655d294","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"fa69d971_fc001503","line":97,"in_reply_to":"fa69d971_9aaaabd3","updated":"2016-01-05 17:48:07.000000000","message":"\u0027\u0027 is no a valid UUID. UUID should be set to a valid UUID value or doesn\u0027t set at all. It is expected behaviour.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"3e250be85f77b67f901a9cb6cda43a3ed5a02ea6","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_3fae082f","line":97,"in_reply_to":"fa69d971_a8edccb8","updated":"2016-01-12 19:08:26.000000000","message":"please use ironic port-create without --portgroup-uuid option","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"2ade2199b52608e7ef6678e9ae2ca67717717790","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"fa69d971_a8edccb8","line":97,"in_reply_to":"fa69d971_fc001503","updated":"2016-01-08 08:42:57.000000000","message":"but i think it\u0027s ok for a port not belong to any portgroup. how to let it support?","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"96f255e6586bf82ff0d52315a463c3c63695077b","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                # response for a POST request to create a Port"},{"line_number":95,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":96,"context_line":"                raise e"},{"line_number":97,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":98,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    uuid \u003d types.uuid"}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_ab76513c","line":97,"in_reply_to":"fa69d971_fc001503","updated":"2016-01-12 13:04:09.000000000","message":"yes,it\u0027s better to use remove method to set none. it\u0027s the code bug,fix it by these code at line 483:\n# Update only the fields that have changed\n        for field in objects.Port.fields:\n            try:\n                patch_val \u003d getattr(port, field)\n            except AttributeError:\n                # Ignore fields that aren\u0027t exposed in the API\n                if field \u003d\u003d \u0027portgroup_id\u0027:\n                    patch_val \u003d getattr(port, \u0027portgroup_uuid\u0027)\n\n                    if patch_val \u003d\u003d wtypes.Unset:\n                        patch_val \u003d None\n                    if rpc_port[field] !\u003d patch_val:\n                        rpc_port[field] \u003d patch_val\n                continue\n            if patch_val \u003d\u003d wtypes.Unset:\n                patch_val \u003d None\n            if rpc_port[field] !\u003d patch_val:\n                rpc_port[field] \u003d patch_val","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"0722b3e4f936162fdc452cb0535cb987ee66099d","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"},{"line_number":467,"context_line":"                                                 ir_states.MANAGEABLE]):"},{"line_number":468,"context_line":"                msg \u003d _(\"Port %(port)s can not have any connectivity \""}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_26d83def","line":465,"updated":"2016-01-18 11:24:39.000000000","message":"why we cant\u0027 modify when the node is not in a MANAGEABLE or INSPECTING or ENROLL state? if the connectivity  of the node and the switch is changed after the node  have Grant to the tenant, we need to update the link_local_connection info of the ironic port.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"376556216846393226c87faedca1078be33b1879","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"},{"line_number":467,"context_line":"                                                 ir_states.MANAGEABLE]):"},{"line_number":468,"context_line":"                msg \u003d _(\"Port %(port)s can not have any connectivity \""}],"source_content_type":"text/x-python","patch_set":38,"id":"ba63e191_ae10c3a9","line":465,"in_reply_to":"da6ed579_26d83def","updated":"2016-01-18 17:33:18.000000000","message":"Even if you update link_local_info of the ironic port it will not push neutron to update hardware switch port configuration. Ironic do neutron api call at prepare() and tear_down() methods https://review.openstack.org/#/c/213262/34/ironic/drivers/modules/agent.py.\nIn case of hardware switch failure node should be moved to maintenace state and administrator perform out-of-band configuration.\nSo condition should look like:\n\nif (rpc_node.provision_state not in [ir_states.ENROLL,\n                                     ir_states.INSPECTING,\n                                     ir_states.MANAGEABLE])\nor (rpc_node.maintenance):\n    ....\n\n@jroll, devananda: what do you think?","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":19258,"name":"lifen","email":"lovelyc.lifen@huawei.com"},"change_message_id":"7242b0c89e52c8d62baca35cd8dd85e2a19bea22","unresolved":false,"context_lines":[{"line_number":462,"context_line":"        if patch_port_connectivity_attributes:"},{"line_number":463,"context_line":"            rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":464,"context_line":"                                              rpc_port.node_id)"},{"line_number":465,"context_line":"            if (rpc_node.provision_state not in [ir_states.ENROLL,"},{"line_number":466,"context_line":"                                                 ir_states.INSPECTING,"},{"line_number":467,"context_line":"                                                 ir_states.MANAGEABLE]):"},{"line_number":468,"context_line":"                msg \u003d _(\"Port %(port)s can not have any connectivity \""}],"source_content_type":"text/x-python","patch_set":38,"id":"da6ed579_a6c0ade1","line":465,"in_reply_to":"da6ed579_26d83def","updated":"2016-01-18 11:26:33.000000000","message":"i means if the switch broken.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"73130ae0cd857774bc89cdf43d802cfc5c48337c","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                mandatory\u003dTrue)"},{"line_number":103,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"},{"line_number":106,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":107,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"da6ed579_7c661cbc","line":105,"updated":"2016-01-15 15:35:56.000000000","message":"IIUC API version should be bumped and these new fields should be hidden as it is done for node? https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/node.py#L79-L97","commit_id":"cf5c38627684903afc7f405e3b396b65a11e4ae1"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"44b2a4d317611fe1711c26ea9d5cbca72c8d6f41","unresolved":false,"context_lines":[{"line_number":102,"context_line":"                                mandatory\u003dTrue)"},{"line_number":103,"context_line":"    \"\"\"The UUID of the node this port belongs to\"\"\""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    portgroup_uuid \u003d wsme.wsproperty(types.uuid, _get_portgroup_uuid,"},{"line_number":106,"context_line":"                                     _set_portgroup_uuid, mandatory\u003dFalse)"},{"line_number":107,"context_line":"    \"\"\"The UUID of the portgroup this port belongs to\"\"\""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"da6ed579_a2b982ee","line":105,"in_reply_to":"da6ed579_7c661cbc","updated":"2016-01-18 17:34:36.000000000","message":"Done","commit_id":"cf5c38627684903afc7f405e3b396b65a11e4ae1"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"460bd367845cc24f8b3f31fe4661ce3869443806","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        # Update only the fields that have changed"},{"line_number":449,"context_line":"        for field in objects.Port.fields:"},{"line_number":450,"context_line":"            try:"},{"line_number":451,"context_line":"                patch_val \u003d getattr(port, field)"},{"line_number":452,"context_line":"            except AttributeError:"},{"line_number":453,"context_line":"                # Ignore fields that aren\u0027t exposed in the API"},{"line_number":454,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":46,"id":"da6ed579_03052b0f","line":451,"updated":"2016-01-15 18:38:09.000000000","message":"Also, there is a strange behavior here when trying to do\n\n ironic port-update \u003cuuid\u003e remove portgroup_uuid\n\nThe portgroup_uuid remains the same, and no error is given. If it cannot be removed like node_uuid, it should be added to non-removable attrs. If it can be removed, there should be a special case for portgroup_uuid, as it is not present in object.Port.fields. E.g. something like this on L459:\n\n # no exception handling needed as you know that portgroup_uuid attr exists\n new_portgroup_uuid \u003d getattr(port, \u0027portgroup_uuid\u0027)\n if new_portgroup_uuid \u003d\u003d wsme.Unset:\n   rpc_port.portgroup_id \u003d None\n else:\n   new_portgroup \u003d objects.Portgroup.get_by_uuid(pecan.request.context,\n                                                 new_portgroup_uuid)\n   if rpc_port.portgroup_id !\u003d new_portgroup.id:\n     rpc_port.portgroup_id \u003d new_portgroup.id","commit_id":"cf5c38627684903afc7f405e3b396b65a11e4ae1"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"44b2a4d317611fe1711c26ea9d5cbca72c8d6f41","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        # Update only the fields that have changed"},{"line_number":449,"context_line":"        for field in objects.Port.fields:"},{"line_number":450,"context_line":"            try:"},{"line_number":451,"context_line":"                patch_val \u003d getattr(port, field)"},{"line_number":452,"context_line":"            except AttributeError:"},{"line_number":453,"context_line":"                # Ignore fields that aren\u0027t exposed in the API"},{"line_number":454,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":46,"id":"da6ed579_ab54ed53","line":451,"in_reply_to":"da6ed579_03052b0f","updated":"2016-01-18 17:34:36.000000000","message":"You are right, we should be able to remove/replace portgroup_uuid for port.","commit_id":"cf5c38627684903afc7f405e3b396b65a11e4ae1"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":196,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":197,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":198,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"},{"line_number":199,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":200,"context_line":"        # _node_uuid variable"},{"line_number":201,"context_line":"        sample._node_uuid \u003d \u00277ae81bb3-dec3-4289-8d6c-da80bd8001ae\u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_786c9f08","line":198,"updated":"2016-01-27 01:32:05.000000000","message":"you should add the new fields here, and maybe do similar magic to sample._portgroup_uuid as is done with sample._node_uuid.\n\nThis is used for documentation, eg see http://docs.openstack.org/developer/ironic/webapi/v1.html#ports (look for \u0027type Port\u0027).","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":196,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":197,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":198,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"},{"line_number":199,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":200,"context_line":"        # _node_uuid variable"},{"line_number":201,"context_line":"        sample._node_uuid \u003d \u00277ae81bb3-dec3-4289-8d6c-da80bd8001ae\u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_408d527a","line":198,"in_reply_to":"9a68dd71_786c9f08","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        \u0027detail\u0027: [\u0027GET\u0027],"},{"line_number":244,"context_line":"    }"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    invalid_sort_key_list \u003d [\u0027extra\u0027]"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _get_ports_collection(self, node_ident, address, portgroup_ident,"},{"line_number":249,"context_line":"                              marker, limit, sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_8f24a7af","line":246,"updated":"2016-01-27 01:32:05.000000000","message":"We should probably add \u0027local_link_connection\u0027 here too. (We can\u0027t really sort the portgroups on this column, right?)","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        \u0027detail\u0027: [\u0027GET\u0027],"},{"line_number":244,"context_line":"    }"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    invalid_sort_key_list \u003d [\u0027extra\u0027]"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    def _get_ports_collection(self, node_ident, address, portgroup_ident,"},{"line_number":249,"context_line":"                              marker, limit, sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_a0c9a6ae","line":246,"in_reply_to":"9a68dd71_8f24a7af","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                raise exception.NotAcceptable()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        return self._get_ports_collection(node_uuid or node, address,"},{"line_number":355,"context_line":"                                          portgroup, marker, limit, sort_key,"},{"line_number":356,"context_line":"                                          sort_dir, fields\u003dfields)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @expose.expose(PortCollection, types.uuid_or_name, types.uuid,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_78afbf7d","line":355,"updated":"2016-01-27 01:32:05.000000000","message":"For this method and detail(), it seems to me that if the user uses an API version \u003c MINOR_15_PORTGROUP, they shouldn\u0027t be able to specify the portgroup. It should raise exception.NotAcceptable().","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                raise exception.NotAcceptable()"},{"line_number":353,"context_line":""},{"line_number":354,"context_line":"        return self._get_ports_collection(node_uuid or node, address,"},{"line_number":355,"context_line":"                                          portgroup, marker, limit, sort_key,"},{"line_number":356,"context_line":"                                          sort_dir, fields\u003dfields)"},{"line_number":357,"context_line":""},{"line_number":358,"context_line":"    @expose.expose(PortCollection, types.uuid_or_name, types.uuid,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_6d95e63e","line":355,"in_reply_to":"9a68dd71_78afbf7d","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            # 1) Remove portgroup_id because it\u0027s an internal value and"},{"line_number":452,"context_line":"            #    not present in the API object"},{"line_number":453,"context_line":"            # 2) Add portgroup_uuid"},{"line_number":454,"context_line":"            port_dict[\u0027portgroup_uuid\u0027] \u003d port_dict.pop(\u0027portgroup_id\u0027, None)"},{"line_number":455,"context_line":"            port \u003d Port(**api_utils.apply_jsonpatch(port_dict, patch))"},{"line_number":456,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":457,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_9b806d48","line":454,"updated":"2016-01-27 01:32:05.000000000","message":"Should we allow updates to the new fields if the API version is \u003c MINOR_15_PORTGROUP ?","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":451,"context_line":"            # 1) Remove portgroup_id because it\u0027s an internal value and"},{"line_number":452,"context_line":"            #    not present in the API object"},{"line_number":453,"context_line":"            # 2) Add portgroup_uuid"},{"line_number":454,"context_line":"            port_dict[\u0027portgroup_uuid\u0027] \u003d port_dict.pop(\u0027portgroup_id\u0027, None)"},{"line_number":455,"context_line":"            port \u003d Port(**api_utils.apply_jsonpatch(port_dict, patch))"},{"line_number":456,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":457,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_edc6b615","line":454,"in_reply_to":"9a68dd71_9b806d48","updated":"2016-01-28 00:40:37.000000000","message":"At the moment it is allowed, but I think it is a bug, and should be fixed out of scope of this patch.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":196,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":197,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":198,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"},{"line_number":199,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":200,"context_line":"        # _node_uuid variable"},{"line_number":201,"context_line":"        sample._node_uuid \u003d \u00277ae81bb3-dec3-4289-8d6c-da80bd8001ae\u0027"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_6c5b4b55","line":198,"updated":"2016-01-28 23:04:14.000000000","message":"Add pxe_enabled\u003dsomething, local_link_connection\u003dsomethingelse","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":196,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":197,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":198,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"},{"line_number":199,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":200,"context_line":"        # _node_uuid variable"},{"line_number":201,"context_line":"        sample._node_uuid \u003d \u00277ae81bb3-dec3-4289-8d6c-da80bd8001ae\u0027"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_e0539b37","line":198,"in_reply_to":"7a5de9d1_6c5b4b55","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":344,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":345,"context_line":"            versions.MINOR_15_PORTGROUP, [portgroup])"},{"line_number":346,"context_line":"        if fields is None:"},{"line_number":347,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_0705d0ba","line":345,"updated":"2016-01-28 23:04:14.000000000","message":"I\u0027m not sure this is what you want. Or at least, I\u0027ll describe what I want, which is something similar to hide_fields_in_newer_versions():\n\n    if fields and pecan.request.version.minor \u003c versions.MINOR_15_PORTGROUP and set(fields).intersection({\u0027portgroup_uuid\u0027, \u0027pxe_enabled\u0027, \u0027local_link_connection\u0027}):\n    # requested a field that isn\u0027t supported\n    raise exception.NotAcceptable()","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        \"\"\""},{"line_number":343,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":344,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":345,"context_line":"            versions.MINOR_15_PORTGROUP, [portgroup])"},{"line_number":346,"context_line":"        if fields is None:"},{"line_number":347,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_4cf18800","line":345,"in_reply_to":"7a5de9d1_0705d0ba","updated":"2016-01-29 22:13:23.000000000","message":"I have update check_requested_fields_are_allowed() method.\n\nif hide_fields is None:\n            hide_fields \u003d []\n        if (pecan.request.version.minor \u003c obj_min_version and\n                set(pecan.request.params.values()).intersection(hide_fields))\n            raise exception.NotAcceptable()\n\nThe idea is to have general method that will block request with fields that shouldn\u0027t be allowed for requested api-version.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        \"\"\""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":386,"context_line":"            versions.MINOR_15_PORTGROUP, [portgroup])"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not node_uuid and node:"},{"line_number":389,"context_line":"            # We\u0027re invoking this interface using positional notation, or"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_87b540ef","line":386,"updated":"2016-01-28 23:04:14.000000000","message":"This doesn\u0027t make sense to me. I don\u0027t think you need to check for anything at this point.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        \"\"\""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":386,"context_line":"            versions.MINOR_15_PORTGROUP, [portgroup])"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not node_uuid and node:"},{"line_number":389,"context_line":"            # We\u0027re invoking this interface using positional notation, or"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_8c2ea041","line":386,"in_reply_to":"7a5de9d1_87b540ef","updated":"2016-01-29 22:13:23.000000000","message":"lets imagine that we get a list of portgroups with ironic-api-version 1.15, and now performing request to display ports that belongs to portgroup but with ironic-api-version 1.14 version. In my understanding it shouldn\u0027t work.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3696caaf394843e5809aa2643b44e54e1d0c3257","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        \"\"\""},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":386,"context_line":"            versions.MINOR_15_PORTGROUP, [portgroup])"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not node_uuid and node:"},{"line_number":389,"context_line":"            # We\u0027re invoking this interface using positional notation, or"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_b33d982c","line":386,"in_reply_to":"7a5de9d1_8c2ea041","updated":"2016-02-02 03:41:46.000000000","message":"You don\u0027t need to add this call. hide_fields_in_newer_versions() above will take care of it. It\u0027ll get called as part of self._get_ports_collection() below. It should be evident in a unit test.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # 1) Remove portgroup_id because it\u0027s an internal value and"},{"line_number":459,"context_line":"            #    not present in the API object"},{"line_number":460,"context_line":"            # 2) Add portgroup_uuid"},{"line_number":461,"context_line":"            port_dict[\u0027portgroup_uuid\u0027] \u003d port_dict.pop(\u0027portgroup_id\u0027, None)"},{"line_number":462,"context_line":"            port \u003d Port(**api_utils.apply_jsonpatch(port_dict, patch))"},{"line_number":463,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":464,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_59273064","line":461,"updated":"2016-01-28 23:04:14.000000000","message":"Continuing the discussion in previous version about allowing updates to the new fields if API version is \u003c MINOR_15_PORTGROUP, if you think it is a bug, then please open a bug report on it. If you think you will address it later, add a # TODO(you).","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # 1) Remove portgroup_id because it\u0027s an internal value and"},{"line_number":459,"context_line":"            #    not present in the API object"},{"line_number":460,"context_line":"            # 2) Add portgroup_uuid"},{"line_number":461,"context_line":"            port_dict[\u0027portgroup_uuid\u0027] \u003d port_dict.pop(\u0027portgroup_id\u0027, None)"},{"line_number":462,"context_line":"            port \u003d Port(**api_utils.apply_jsonpatch(port_dict, patch))"},{"line_number":463,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":464,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_ec715445","line":461,"in_reply_to":"7a5de9d1_59273064","updated":"2016-01-29 22:13:23.000000000","message":"portgroup_id is internal value and should be hidden from API call. Please have look at the line 456 we have the same trick for node_id","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3696caaf394843e5809aa2643b44e54e1d0c3257","unresolved":false,"context_lines":[{"line_number":458,"context_line":"            # 1) Remove portgroup_id because it\u0027s an internal value and"},{"line_number":459,"context_line":"            #    not present in the API object"},{"line_number":460,"context_line":"            # 2) Add portgroup_uuid"},{"line_number":461,"context_line":"            port_dict[\u0027portgroup_uuid\u0027] \u003d port_dict.pop(\u0027portgroup_id\u0027, None)"},{"line_number":462,"context_line":"            port \u003d Port(**api_utils.apply_jsonpatch(port_dict, patch))"},{"line_number":463,"context_line":"        except api_utils.JSONPATCH_EXCEPTIONS as e:"},{"line_number":464,"context_line":"            raise exception.PatchError(patch\u003dpatch, reason\u003de)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_339be819","line":461,"in_reply_to":"7a5de9d1_ec715445","updated":"2016-02-02 03:41:46.000000000","message":"It isn\u0027t portgroup_id that I am questioning. It is portgroup_uuid. I don\u0027t think we want to allow that to be updated if API version is \u003c MINOR_15_PORTGROUP.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":346,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":347,"context_line":"            versions.MINOR_15_PORTGROUP,"},{"line_number":348,"context_line":"            [\u0027portgroup\u0027, \u0027pxe_enabled\u0027, \u0027local_link_connection\u0027])"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        if fields is None:"},{"line_number":351,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_240b9cd7","line":348,"updated":"2016-02-02 03:42:39.000000000","message":"I don\u0027t think it is worth having a generalized method for this, since this is the only place that calls it (the other place isn\u0027t needed).\n\nI\u0027d prefer if you did something like\n  if fields and not api_utils.allow_portgroups() and set(fields).intersection([\u0027portgroup\u0027, ...]):\n    raise exception.NotAcceptable()","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":346,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":347,"context_line":"            versions.MINOR_15_PORTGROUP,"},{"line_number":348,"context_line":"            [\u0027portgroup\u0027, \u0027pxe_enabled\u0027, \u0027local_link_connection\u0027])"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        if fields is None:"},{"line_number":351,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_194a6d84","line":348,"in_reply_to":"7a5de9d1_240b9cd7","updated":"2016-02-03 21:29:13.000000000","message":"I thought that general method may be used in future.\nProbably it is better to add it once we have another case.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        new_port.create()"},{"line_number":441,"context_line":"        # Set the HTTP Location Header"},{"line_number":442,"context_line":"        pecan.response.location \u003d link.build_url(\u0027ports\u0027, new_port.uuid)"},{"line_number":443,"context_line":"        return Port.convert_with_links(new_port)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":446,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_cf2ffa9f","line":443,"updated":"2016-02-03 23:18:05.000000000","message":"Should we allow ports to be created that have one of the new fields set, if the API version is \u003c 1.15?","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        new_port.create()"},{"line_number":441,"context_line":"        # Set the HTTP Location Header"},{"line_number":442,"context_line":"        pecan.response.location \u003d link.build_url(\u0027ports\u0027, new_port.uuid)"},{"line_number":443,"context_line":"        return Port.convert_with_links(new_port)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":446,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_c04ec46e","line":443,"in_reply_to":"5a5ae5dd_cf2ffa9f","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        new_port.create()"},{"line_number":441,"context_line":"        # Set the HTTP Location Header"},{"line_number":442,"context_line":"        pecan.response.location \u003d link.build_url(\u0027ports\u0027, new_port.uuid)"},{"line_number":443,"context_line":"        return Port.convert_with_links(new_port)"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    @wsme.validate(types.uuid, [PortPatchType])"},{"line_number":446,"context_line":"    @expose.expose(Port, types.uuid, body\u003d[PortPatchType])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_294a2ac6","line":443,"in_reply_to":"5a5ae5dd_cf2ffa9f","updated":"2016-02-04 18:12:24.000000000","message":"Yes, I\u0027ve added checks","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        # no exception handling needed as you know that portgroup_uuid"},{"line_number":474,"context_line":"        # attr exists"},{"line_number":475,"context_line":"        new_portgroup_uuid \u003d getattr(port, \u0027portgroup_uuid\u0027)"},{"line_number":476,"context_line":"        if new_portgroup_uuid \u003d\u003d wsme.Unset:"},{"line_number":477,"context_line":"            rpc_port.portgroup_id \u003d None"},{"line_number":478,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_19e804e2","line":475,"updated":"2016-02-03 23:18:05.000000000","message":"I am still concerned about allowing portgroup_uuid, pxe_enabled and local_link_connection to get updated if api version \u003c 1.15.","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":472,"context_line":""},{"line_number":473,"context_line":"        # no exception handling needed as you know that portgroup_uuid"},{"line_number":474,"context_line":"        # attr exists"},{"line_number":475,"context_line":"        new_portgroup_uuid \u003d getattr(port, \u0027portgroup_uuid\u0027)"},{"line_number":476,"context_line":"        if new_portgroup_uuid \u003d\u003d wsme.Unset:"},{"line_number":477,"context_line":"            rpc_port.portgroup_id \u003d None"},{"line_number":478,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_494526b1","line":475,"in_reply_to":"5a5ae5dd_19e804e2","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fd06adcd3161d20b0516e4fa920cdf119246309b","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    invalid_sort_key_list \u003d [\u0027extra\u0027, \u0027local_link_connection\u0027]"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    portgroup_fields \u003d [\u0027portgroup\u0027, \u0027pxe_enabled\u0027, \u0027local_link_connection\u0027]"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def _get_ports_collection(self, node_ident, address, portgroup_ident,"},{"line_number":256,"context_line":"                              marker, limit, sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_33d286d3","line":253,"updated":"2016-02-04 19:47:47.000000000","message":"s/portgroup/portgroup_uuid/","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"7811acb3a0cdf24cf79122ccb47c25f7fa282d05","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"    invalid_sort_key_list \u003d [\u0027extra\u0027, \u0027local_link_connection\u0027]"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    portgroup_fields \u003d [\u0027portgroup\u0027, \u0027pxe_enabled\u0027, \u0027local_link_connection\u0027]"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def _get_ports_collection(self, node_ident, address, portgroup_ident,"},{"line_number":256,"context_line":"                              marker, limit, sort_key, sort_dir,"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_941c8078","line":253,"in_reply_to":"5a5ae5dd_33d286d3","updated":"2016-02-05 00:05:26.000000000","message":"Done","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fd06adcd3161d20b0516e4fa920cdf119246309b","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":453,"context_line":"            for field in self.portgroup_fields:"},{"line_number":454,"context_line":"                if new_port[field]:"},{"line_number":455,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":456,"context_line":""},{"line_number":457,"context_line":"        new_port.create()"},{"line_number":458,"context_line":"        # Set the HTTP Location Header"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_939fbab3","line":455,"updated":"2016-02-04 19:47:47.000000000","message":"Why do we need this check?","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"7811acb3a0cdf24cf79122ccb47c25f7fa282d05","unresolved":false,"context_lines":[{"line_number":452,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":453,"context_line":"            for field in self.portgroup_fields:"},{"line_number":454,"context_line":"                if new_port[field]:"},{"line_number":455,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":456,"context_line":""},{"line_number":457,"context_line":"        new_port.create()"},{"line_number":458,"context_line":"        # Set the HTTP Location Header"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_1492d057","line":455,"in_reply_to":"5a5ae5dd_939fbab3","updated":"2016-02-05 00:05:26.000000000","message":"oops, I missed to delete this code.","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"27ca8f77868cf3e478d0e49df11eaff9a7505bc3","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":58,"id":"5a5ae5dd_d842aa0e","line":86,"updated":"2016-02-08 20:18:39.000000000","message":"Why do we need this? Seems like we should have checked for this at a higher level.","commit_id":"03a46d7ff8660b4d1553c23843045bceaf9acc41"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6c8e7b6c85ea34391f2c4ef6a1b31cd3684974f8","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":58,"id":"5a5ae5dd_55674125","line":86,"in_reply_to":"5a5ae5dd_d842aa0e","updated":"2016-02-09 12:03:12.000000000","message":"Please have look at Line 116. It is called before patch method when we updating the port, for example when we call ironic port-update \u003cuuid\u003e replace/add portgroup_uuid. _set_portgroup_uuid will be called first and check if we have new portgroup_uuid in the DB. As result API call will return BAD_REQUEST if portgroup is not found instead of NOT_ACCEPTABLE","commit_id":"03a46d7ff8660b4d1553c23843045bceaf9acc41"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e6d631aa2e864b9dd1af18050d6ff7030afed6e6","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":59,"id":"5a5ae5dd_bdb525d1","line":86,"updated":"2016-02-09 16:32:28.000000000","message":"Continuing the discussion in revision 58. I might be missing something because I don\u0027t see where this gets called via the patch() method. I deleted this check and modified two of your tests in test_ports.py: test_add_portgroup_uuid() \u0026 test_replace_portgroup_uuid() to use older headers, and Not Acceptable was raised.\n\nIf this is needed, please add a comment about why, and add one or more unit tests to show that it is needed.","commit_id":"7870d87d95586811443a58fa1c895b019f4d65bd"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"7e1ff1215585b75d7c5816d02a1bb70a826abe5a","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"}],"source_content_type":"text/x-python","patch_set":59,"id":"3a57f1b5_daecca91","line":86,"in_reply_to":"5a5ae5dd_bdb525d1","updated":"2016-02-09 21:57:34.000000000","message":"I have added test test_create_port_portgroup_uuid_not_found_old_api_version. When I comment 86,87 lines, test start fail because responce is 406 and not 400","commit_id":"7870d87d95586811443a58fa1c895b019f4d65bd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":90,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_a4d3c937","line":87,"updated":"2016-02-10 15:54:41.000000000","message":"Thanks for adding the test. Now I understand. I wonder if a comment would be useful. I guess if someone else asks...","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"4eb685b36d4ac6e2871d1588a28a614708f6aa28","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":87,"context_line":"                raise exception.NotAcceptable()"},{"line_number":88,"context_line":"            try:"},{"line_number":89,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":90,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_4c78f7f2","line":87,"in_reply_to":"3a57f1b5_a4d3c937","updated":"2016-02-10 18:28:22.000000000","message":"Done","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6ecddbc3000f9adcacbca06f93c24fc73fbc2634","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            # NOTE(vsaienko): When we update existing port this method"},{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_6286ec14","line":86,"updated":"2016-02-11 13:20:17.000000000","message":"I believe this is added because of the post method, not patch. In patch method you first check that json patch does not contain a portgroup if not allowed, and only after that try to apply it. In case of post, you instantiate a Port before checking whether portgroups are allowed or not.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            # NOTE(vsaienko): When we update existing port this method"},{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_bb413f65","line":86,"in_reply_to":"3a57f1b5_6286ec14","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":102,"context_line":"                raise e"},{"line_number":103,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":104,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    uuid \u003d types.uuid"},{"line_number":107,"context_line":"    \"\"\"Unique UUID for this port\"\"\""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_4925f7be","line":104,"updated":"2016-02-12 00:09:01.000000000","message":"Portgroup ID isn\u0027t being set here for GET /ports/\u003cid\u003e, if it\u0027s unset. If I add it to a portgroup, it\u0027s okay.\n\nstack@jim-devstack:~/devstack$ curl -H \"X-Auth-Token: $OS_TOKEN\" -H \"X-Openstack-Ironic-API-Version: 1.16\" http://localhost:6385/v1/ports/6f47fe93-46ef-4144-aab0-796d08a830de | python -m json.tool\n{\n    \"address\": \"52:54:00:a2:e7:9d\",\n    \"created_at\": \"2016-02-11T23:02:06+00:00\",\n    \"extra\": {},\n    \"links\": [\n        {\n            \"href\": \"http://localhost:6385/v1/ports/6f47fe93-46ef-4144-aab0-796d08a830de\",\n            \"rel\": \"self\"\n        },\n        {\n            \"href\": \"http://localhost:6385/ports/6f47fe93-46ef-4144-aab0-796d08a830de\",\n            \"rel\": \"bookmark\"\n        }\n    ],\n    \"local_link_connection\": {},\n    \"node_uuid\": \"100620d5-98cb-4bb8-becd-0bf04e3f0848\",\n    \"pxe_enabled\": true,\n    \"updated_at\": null,\n    \"uuid\": \"6f47fe93-46ef-4144-aab0-796d08a830de\"\n}","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1057db2f227a21c9fd6b4195fe9f033ca1728054","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":102,"context_line":"                raise e"},{"line_number":103,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":104,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    uuid \u003d types.uuid"},{"line_number":107,"context_line":"    \"\"\"Unique UUID for this port\"\"\""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_3b7bf28d","line":104,"in_reply_to":"3a57f1b5_4925f7be","updated":"2016-02-12 16:58:39.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":101,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":102,"context_line":"                raise e"},{"line_number":103,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":104,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    uuid \u003d types.uuid"},{"line_number":107,"context_line":"    \"\"\"Unique UUID for this port\"\"\""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_b915b540","line":104,"in_reply_to":"3a57f1b5_4925f7be","updated":"2016-02-12 14:40:41.000000000","message":"I have not found a good way to resolve it, will upload the patch resolving other comments and fix this in next one.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow(),"},{"line_number":204,"context_line":"                     pxe_enabled\u003dTrue,"},{"line_number":205,"context_line":"                     local_link_connection\u003d{"},{"line_number":206,"context_line":"                         \u0027switch_info\u0027: \u0027host\u0027, \u0027port_id\u0027: \u0027Gig0/1\u0027,"},{"line_number":207,"context_line":"                         \u0027switch_id\u0027: \u0027aa:bb:cc:dd:ee:ff\u0027})"},{"line_number":208,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":209,"context_line":"        # _node_uuid variable"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_890c4f3c","line":206,"updated":"2016-02-12 00:09:01.000000000","message":"Isn\u0027t switch_info a dict? Would be nice for the sample to be representative of this.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow(),"},{"line_number":204,"context_line":"                     pxe_enabled\u003dTrue,"},{"line_number":205,"context_line":"                     local_link_connection\u003d{"},{"line_number":206,"context_line":"                         \u0027switch_info\u0027: \u0027host\u0027, \u0027port_id\u0027: \u0027Gig0/1\u0027,"},{"line_number":207,"context_line":"                         \u0027switch_id\u0027: \u0027aa:bb:cc:dd:ee:ff\u0027})"},{"line_number":208,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":209,"context_line":"        # _node_uuid variable"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_1b517336","line":206,"in_reply_to":"3a57f1b5_890c4f3c","updated":"2016-02-12 14:40:41.000000000","message":"Looking at the spec, they\u0027re all strings - http://specs.openstack.org/openstack/ironic-specs/specs/approved/ironic-ml2-integration.html","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"1fc940e270a66503afa581996cfe1b9f650cc25f","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow(),"},{"line_number":204,"context_line":"                     pxe_enabled\u003dTrue,"},{"line_number":205,"context_line":"                     local_link_connection\u003d{"},{"line_number":206,"context_line":"                         \u0027switch_info\u0027: \u0027host\u0027, \u0027port_id\u0027: \u0027Gig0/1\u0027,"},{"line_number":207,"context_line":"                         \u0027switch_id\u0027: \u0027aa:bb:cc:dd:ee:ff\u0027})"},{"line_number":208,"context_line":"        # NOTE(lucasagomes): node_uuid getter() method look at the"},{"line_number":209,"context_line":"        # _node_uuid variable"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_c7da1c4b","line":206,"in_reply_to":"3a57f1b5_890c4f3c","updated":"2016-02-12 10:24:19.000000000","message":"This patch enforces it as a string in types.py ... we\u0027re currently JSON encoding our switch_info values to get around it, https://review.openstack.org/#/c/228496/43/doc/source/deploy/install-guide.rst L719 seems to imply its a string value also.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":357,"context_line":"        if (fields and not api_utils.allow_portgroups()"},{"line_number":358,"context_line":"            and set(fields).intersection(self.portgroup_fields)):"},{"line_number":359,"context_line":"            raise exception.NotAcceptable()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        if fields is None:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_095e1f12","line":358,"updated":"2016-02-12 00:09:01.000000000","message":"Personal opinion, but could you indent this line further so that it\u0027s clear it is part of the if and not code in the if block?\n\nAlso, we should check if the portgroup param was passed here too, right?","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        \"\"\""},{"line_number":356,"context_line":"        api_utils.check_allow_specify_fields(fields)"},{"line_number":357,"context_line":"        if (fields and not api_utils.allow_portgroups()"},{"line_number":358,"context_line":"            and set(fields).intersection(self.portgroup_fields)):"},{"line_number":359,"context_line":"            raise exception.NotAcceptable()"},{"line_number":360,"context_line":""},{"line_number":361,"context_line":"        if fields is None:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_7e3c15c8","line":358,"in_reply_to":"3a57f1b5_095e1f12","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        if portgroup and not api_utils.allow_portgroups():"},{"line_number":402,"context_line":"            raise exception.NotAcceptable()"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        if not node_uuid and node:"},{"line_number":405,"context_line":"            # We\u0027re invoking this interface using positional notation, or"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_693f9387","line":402,"updated":"2016-02-12 00:09:01.000000000","message":"We should also check if portgroup is in fields here too, right?","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        if portgroup and not api_utils.allow_portgroups():"},{"line_number":402,"context_line":"            raise exception.NotAcceptable()"},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"        if not node_uuid and node:"},{"line_number":405,"context_line":"            # We\u0027re invoking this interface using positional notation, or"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_1e2de194","line":402,"in_reply_to":"3a57f1b5_693f9387","updated":"2016-02-12 14:40:41.000000000","message":"No fields here :)","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        pdict \u003d port.as_dict()"},{"line_number":450,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":451,"context_line":"            for field in self.portgroup_fields:"},{"line_number":452,"context_line":"                if pdict.get(field):"},{"line_number":453,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"        new_port \u003d objects.Port(pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_a92eeb40","line":452,"updated":"2016-02-12 00:09:01.000000000","message":"Should this be `if field in pdict`? As this is, it would allow things to be set to NULL or False (for example, setting pxe_enabled\u003dFalse).","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        pdict \u003d port.as_dict()"},{"line_number":450,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":451,"context_line":"            for field in self.portgroup_fields:"},{"line_number":452,"context_line":"                if pdict.get(field):"},{"line_number":453,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":454,"context_line":""},{"line_number":455,"context_line":"        new_port \u003d objects.Port(pecan.request.context,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_7edf3569","line":452,"in_reply_to":"3a57f1b5_a92eeb40","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        # no exception handling needed as you know that portgroup_uuid"},{"line_number":496,"context_line":"        # attr exists"},{"line_number":497,"context_line":"        new_portgroup_uuid \u003d getattr(port, \u0027portgroup_uuid\u0027)"},{"line_number":498,"context_line":"        if new_portgroup_uuid \u003d\u003d wsme.Unset:"},{"line_number":499,"context_line":"            rpc_port.portgroup_id \u003d None"},{"line_number":500,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_89e0cffb","line":497,"updated":"2016-02-12 00:09:01.000000000","message":"Why not just port.portgroup_uuid? :)","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        # no exception handling needed as you know that portgroup_uuid"},{"line_number":496,"context_line":"        # attr exists"},{"line_number":497,"context_line":"        new_portgroup_uuid \u003d getattr(port, \u0027portgroup_uuid\u0027)"},{"line_number":498,"context_line":"        if new_portgroup_uuid \u003d\u003d wsme.Unset:"},{"line_number":499,"context_line":"            rpc_port.portgroup_id \u003d None"},{"line_number":500,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_5eb91914","line":497,"in_reply_to":"3a57f1b5_89e0cffb","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d682cc9ab4b8bba74a94b08b372cad8d9a4eff56","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            # NOTE(vsaienko): When we update existing port this method"},{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_8ecb1f53","line":87,"range":{"start_line":87,"start_character":58,"end_line":87,"end_character":65},"updated":"2016-02-16 07:14:08.000000000","message":"s/recieve/receive","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if value and self._portgroup_uuid !\u003d value:"},{"line_number":86,"context_line":"            # NOTE(vsaienko): When we update existing port this method"},{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_b06d939a","line":87,"range":{"start_line":87,"start_character":58,"end_line":87,"end_character":65},"in_reply_to":"dae33548_8ecb1f53","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d682cc9ab4b8bba74a94b08b372cad8d9a4eff56","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":93,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_ce07e71a","line":90,"range":{"start_line":90,"start_character":32,"end_line":90,"end_character":45},"updated":"2016-02-16 07:14:08.000000000","message":"It\u0027s better to give more information about why not acceptable, like:\n  raise exception.NotAcceptable(_(\"Request with portgroup_uuid is not acceptable if api-version \u003c 1.16.\"))","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":87,"context_line":"            # is called before patch() as result user may recieve"},{"line_number":88,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":93,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_b0f2b3d0","line":90,"range":{"start_line":90,"start_character":32,"end_line":90,"end_character":45},"in_reply_to":"dae33548_ce07e71a","updated":"2016-02-16 15:04:17.000000000","message":"This seems to be a common thing, see node controller.","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d682cc9ab4b8bba74a94b08b372cad8d9a4eff56","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":93,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"},{"line_number":94,"context_line":"                # NOTE(lucasagomes): Create the portgroup_id attribute"},{"line_number":95,"context_line":"                #                    on-the-fly to satisfy the api -\u003e"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_ce21a7fd","line":92,"range":{"start_line":92,"start_character":16,"end_line":92,"end_character":79},"updated":"2016-02-16 07:14:08.000000000","message":"I think we should add another check here like:\n  if portgroup.node_id !\u003d self.node_id:\n      raise BadRequest\n\nPortgroup and port with different node uuids should not be associated. see bug: https://bugs.launchpad.net/ironic/+bug/1544772","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":90,"context_line":"                raise exception.NotAcceptable()"},{"line_number":91,"context_line":"            try:"},{"line_number":92,"context_line":"                portgroup \u003d objects.Portgroup.get(pecan.request.context, value)"},{"line_number":93,"context_line":"                self._portgroup_uuid \u003d portgroup.uuid"},{"line_number":94,"context_line":"                # NOTE(lucasagomes): Create the portgroup_id attribute"},{"line_number":95,"context_line":"                #                    on-the-fly to satisfy the api -\u003e"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_909b2f72","line":92,"range":{"start_line":92,"start_character":16,"end_line":92,"end_character":79},"in_reply_to":"dae33548_ce21a7fd","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"36f99db47391e18a3fab767e1b1f169d43a5483b","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        if self.from_portgroups:"},{"line_number":276,"context_line":"            # Note(vdrok): This is a workaround for the case when"},{"line_number":277,"context_line":"            # GET /portgroups/ident/ports is called. In this case portgroup"},{"line_number":278,"context_line":"            # ident is still written to node parameter."},{"line_number":279,"context_line":"            if not node_ident:"},{"line_number":280,"context_line":"                raise exception.MissingParameterValue("},{"line_number":281,"context_line":"                    _(\"Portgroup identifier not specified.\"))"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_3c4d0c73","line":278,"updated":"2016-02-15 14:50:17.000000000","message":"Fun! Could we either s/node/node_ident/ on this line, or call the parameter node_or_portgroup_ident (or similar)?","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        if self.from_portgroups:"},{"line_number":276,"context_line":"            # Note(vdrok): This is a workaround for the case when"},{"line_number":277,"context_line":"            # GET /portgroups/ident/ports is called. In this case portgroup"},{"line_number":278,"context_line":"            # ident is still written to node parameter."},{"line_number":279,"context_line":"            if not node_ident:"},{"line_number":280,"context_line":"                raise exception.MissingParameterValue("},{"line_number":281,"context_line":"                    _(\"Portgroup identifier not specified.\"))"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_f031db0c","line":278,"in_reply_to":"dae33548_3c4d0c73","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"36f99db47391e18a3fab767e1b1f169d43a5483b","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    _(\"Portgroup identifier not specified.\"))"},{"line_number":282,"context_line":"            if portgroup_ident:"},{"line_number":283,"context_line":"                # NOTE(vdrok): Same thing is possible with nodes"},{"line_number":284,"context_line":"                # (GET /nodes/ident/ports?node\u003dother_ident)"},{"line_number":285,"context_line":"                raise exception.Invalid(_("},{"line_number":286,"context_line":"                    \u0027Portgroup identifier should be specified only once!\u0027))"},{"line_number":287,"context_line":"            portgroup_ident \u003d node_ident"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_dc5fc00c","line":284,"updated":"2016-02-15 14:50:17.000000000","message":"This comment is a bit confusing, could you also add \"this happens in the case of GET /portgroups/ident/ports?portgroup\u003dother_ident\" or so?\n\n(should we file a bug about the /nodes behavior too?)","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    _(\"Portgroup identifier not specified.\"))"},{"line_number":282,"context_line":"            if portgroup_ident:"},{"line_number":283,"context_line":"                # NOTE(vdrok): Same thing is possible with nodes"},{"line_number":284,"context_line":"                # (GET /nodes/ident/ports?node\u003dother_ident)"},{"line_number":285,"context_line":"                raise exception.Invalid(_("},{"line_number":286,"context_line":"                    \u0027Portgroup identifier should be specified only once!\u0027))"},{"line_number":287,"context_line":"            portgroup_ident \u003d node_ident"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_9054cf21","line":284,"in_reply_to":"dae33548_dc5fc00c","updated":"2016-02-16 15:04:17.000000000","message":"Will file a bug.","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d69414c19e88beb9c7026825fa614fa9b5689569","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"def hide_fields_in_newer_versions(obj):"},{"line_number":41,"context_line":"    # if requested version is \u003c 1.16, hide portgroup fields"},{"line_number":42,"context_line":"    if pecan.request.version.minor \u003c versions.MINOR_16_PORTGROUP:"},{"line_number":43,"context_line":"        obj.portgroup_uuid \u003d wsme.Unset"},{"line_number":44,"context_line":"        obj.pxe_enabled \u003d wsme.Unset"},{"line_number":45,"context_line":"        obj.local_link_connection \u003d wsme.Unset"}],"source_content_type":"text/x-python","patch_set":67,"id":"dae33548_f1c6d866","line":42,"updated":"2016-02-17 01:48:46.000000000","message":"nit: I think this should be:\n\n if api_utils.allow_portgroups():","commit_id":"f02253957d405e759bd3f76d31fc258ec2a15d49"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"bab017a120825bb2bf4f461ca56cdf4c5c12a39b","unresolved":false,"context_lines":[{"line_number":104,"context_line":"                # response for a POST request to create a Port"},{"line_number":105,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":106,"context_line":"                raise e"},{"line_number":107,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":108,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":109,"context_line":"        elif value is None and api_utils.allow_portgroups():"},{"line_number":110,"context_line":"            # This is to output portgroup_uuid field if API version allows this"}],"source_content_type":"text/x-python","patch_set":69,"id":"dae33548_d44462b8","line":107,"updated":"2016-02-17 02:39:59.000000000","message":"Maybe a comment here to explain that if value does equal wtypes.Unset that \u0027if value\u0027 would evaluate as False.","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"77718ee145a56ad135cc51ec75a5df5c3bc7c35d","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        elif value is None and api_utils.allow_portgroups():"},{"line_number":110,"context_line":"            # This is to output portgroup_uuid field if API version allows this"},{"line_number":111,"context_line":"            self._portgroup_uuid \u003d None"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    uuid \u003d types.uuid"},{"line_number":114,"context_line":"    \"\"\"Unique UUID for this port\"\"\""},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":69,"id":"dae33548_d1ed94b8","line":112,"updated":"2016-02-17 02:01:46.000000000","message":"If there was an \u0027else:\u0027 here, could code inside of it ever be reached?  And if so, does that mean no action is okay?","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"95313bbf52b1e4a555d77328f15c9354fbf76186","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        elif value is None and api_utils.allow_portgroups():"},{"line_number":110,"context_line":"            # This is to output portgroup_uuid field if API version allows this"},{"line_number":111,"context_line":"            self._portgroup_uuid \u003d None"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    uuid \u003d types.uuid"},{"line_number":114,"context_line":"    \"\"\"Unique UUID for this port\"\"\""},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":69,"id":"dae33548_148fea2a","line":112,"in_reply_to":"dae33548_d1ed94b8","updated":"2016-02-17 02:29:50.000000000","message":"I believe we\u0027re okay; the only case I see where we\u0027d drop to an else is a PATCH request where the portgroup_uuid is being set to the value that is already set, in which case we do not need to set it.","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"1c50187ecf80415b87bb6c818c2ff9b47d6e1168","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                raise exception.NotAcceptable()"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        return self._get_ports_collection(node_uuid or node, address,"},{"line_number":408,"context_line":"                                          portgroup, marker, limit, sort_key,"},{"line_number":409,"context_line":"                                          sort_dir, fields\u003dfields)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"    @expose.expose(PortCollection, types.uuid_or_name, types.uuid,"}],"source_content_type":"text/x-python","patch_set":69,"id":"dae33548_572334a7","line":408,"updated":"2016-02-17 02:51:18.000000000","message":"nit: I personally would think using keyword arguments here might be good with 7 arguments being used.","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"8d3c8ae19cac96d6a4911f180d3b9316c2958be6","unresolved":false,"context_lines":[{"line_number":450,"context_line":"            raise exception.HTTPNotFound"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"        resource_url \u003d \u0027/\u0027.join([\u0027ports\u0027, \u0027detail\u0027])"},{"line_number":453,"context_line":"        return self._get_ports_collection(node_uuid or node, address,"},{"line_number":454,"context_line":"                                          portgroup, marker, limit, sort_key,"},{"line_number":455,"context_line":"                                          sort_dir, resource_url)"},{"line_number":456,"context_line":""}],"source_content_type":"text/x-python","patch_set":69,"id":"dae33548_575a142b","line":453,"updated":"2016-02-17 02:52:36.000000000","message":"nit: Same as L408\n\nFeel free to ignore :)","commit_id":"552d1409b99039fbe498db7f5275ca5210cb6998"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"55e9a25591ca444f10fc6b7135040b0465d8f89e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                    # is called before patch() as result user may receive"},{"line_number":95,"context_line":"                    # BAD_REQUEST instead of NOT_ACCEPTABLE"},{"line_number":96,"context_line":"                    # if api-version \u003c 1.16"},{"line_number":97,"context_line":"                    if not api_utils.allow_portgroups():"},{"line_number":98,"context_line":"                        raise exception.NotAcceptable()"},{"line_number":99,"context_line":"                    raise"},{"line_number":100,"context_line":"                if portgroup.node_id !\u003d self.node_id:"}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_3aebf514","line":97,"updated":"2016-02-17 03:31:45.000000000","message":"Should not be able to have this be evaluate to true because of L85","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"cb8f2082717c8bc61cf26ddb37aacd7d5d9c2b2f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                    # is called before patch() as result user may receive"},{"line_number":95,"context_line":"                    # BAD_REQUEST instead of NOT_ACCEPTABLE"},{"line_number":96,"context_line":"                    # if api-version \u003c 1.16"},{"line_number":97,"context_line":"                    if not api_utils.allow_portgroups():"},{"line_number":98,"context_line":"                        raise exception.NotAcceptable()"},{"line_number":99,"context_line":"                    raise"},{"line_number":100,"context_line":"                if portgroup.node_id !\u003d self.node_id:"}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_fa6a2d80","line":97,"in_reply_to":"dae33548_3aebf514","updated":"2016-02-17 03:35:21.000000000","message":"Hm, this makes me wonder if I\u0027ve broken this behavior with the if above.\n\nI think now setting portgroup_uuid on a port, with an older version, will just silently not set the portgroup, instead of raising an error. Need to change this, maybe just drop back to not having the if on line 85.","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6a4b375d5bb11bebff5368a65aae695ba7b8a675","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                    # is called before patch() as result user may receive"},{"line_number":95,"context_line":"                    # BAD_REQUEST instead of NOT_ACCEPTABLE"},{"line_number":96,"context_line":"                    # if api-version \u003c 1.16"},{"line_number":97,"context_line":"                    if not api_utils.allow_portgroups():"},{"line_number":98,"context_line":"                        raise exception.NotAcceptable()"},{"line_number":99,"context_line":"                    raise"},{"line_number":100,"context_line":"                if portgroup.node_id !\u003d self.node_id:"}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_dac3e955","line":97,"in_reply_to":"dae33548_fa6a2d80","updated":"2016-02-17 03:40:54.000000000","message":"I think compare this version to version 68. Before some intermediate changes came in.","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"9f089cea83735dd69ca376bf299cd5b8ac60163e","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            except exception.PortgroupNotFound as e:"},{"line_number":110,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"},{"line_number":111,"context_line":"                # response for a POST request to create a Port"},{"line_number":112,"context_line":"                e.code \u003d http_client.BAD_REQUEST  # BadRequest"},{"line_number":113,"context_line":"                raise e"},{"line_number":114,"context_line":"        elif value \u003d\u003d wtypes.Unset:"},{"line_number":115,"context_line":"            # NOTE(jroll) wtypes.Unset is falsy, block above doesn\u0027t cover it"}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_3a2e5543","line":112,"updated":"2016-02-17 03:36:45.000000000","message":"I think I also broke this :(","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"af0bc541a429af133836e388338e5924cbcb5f1f","unresolved":false,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":"        pdict \u003d port.as_dict()"},{"line_number":493,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":494,"context_line":"            for field in self.portgroup_fields:"},{"line_number":495,"context_line":"                if field in pdict:"},{"line_number":496,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_1a7b918d","line":494,"updated":"2016-02-17 03:29:16.000000000","message":"Like in L399 above I think this could be:\n\n if set(pdict).intersection(self.portgroup_fields)):","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2ce9dc5706f658567a0eb2e9dd3ac2b804c8ec27","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return self._portgroup_uuid"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def _set_portgroup_uuid(self, value):"},{"line_number":85,"context_line":"        if not api_utils.allow_portgroups() or value \u003d\u003d wtypes.Unset:"},{"line_number":86,"context_line":"            self._portgroup_uuid \u003d wtypes.Unset"},{"line_number":87,"context_line":"        elif value and self._portgroup_uuid !\u003d value:"},{"line_number":88,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":74,"id":"dae33548_dd69ecfa","line":85,"updated":"2016-02-17 22:15:45.000000000","message":"ugh, this breaks docs build.","commit_id":"70dc19503911f835c02ac211d2cd1f2cd570a695"},{"author":{"_account_id":7933,"name":"Philippe Godin","email":"godp1301@gmail.com","username":"godp1301"},"change_message_id":"511a18b4840497837fc8bd2e28622df3c31693d6","unresolved":false,"context_lines":[{"line_number":36,"context_line":"_DEFAULT_RETURN_FIELDS \u003d (\u0027uuid\u0027, \u0027address\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def hide_fields_in_newer_versions(obj):"},{"line_number":40,"context_line":"    # if requested version is \u003c 1.16, hide portgroup fields"},{"line_number":41,"context_line":"    if not api_utils.allow_portgroups():"},{"line_number":42,"context_line":"        obj.portgroup_uuid \u003d wsme.Unset"}],"source_content_type":"text/x-python","patch_set":86,"id":"fa0719c6_a2c78294","line":39,"updated":"2016-03-24 15:38:19.000000000","message":"Should this method be called \"hide_fields_in_older_versions\" instead?","commit_id":"8412d27663b6b9a080176a73229180842d5e1d8e"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"795c6a579d1e80de3542cfb5ae1aec0b947635aa","unresolved":false,"context_lines":[{"line_number":36,"context_line":"_DEFAULT_RETURN_FIELDS \u003d (\u0027uuid\u0027, \u0027address\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def hide_fields_in_newer_versions(obj):"},{"line_number":40,"context_line":"    # if requested version is \u003c 1.16, hide portgroup fields"},{"line_number":41,"context_line":"    if not api_utils.allow_portgroups():"},{"line_number":42,"context_line":"        obj.portgroup_uuid \u003d wsme.Unset"}],"source_content_type":"text/x-python","patch_set":86,"id":"da0c15f0_1e212dfc","line":39,"in_reply_to":"fa0719c6_a2c78294","updated":"2016-03-25 11:59:09.000000000","message":"It is the same as for node, I think it was supposed to be \"hide fields present in newer api versions\". Anyway, I thik it should go to a separate change.","commit_id":"8412d27663b6b9a080176a73229180842d5e1d8e"},{"author":{"_account_id":7933,"name":"Philippe Godin","email":"godp1301@gmail.com","username":"godp1301"},"change_message_id":"511a18b4840497837fc8bd2e28622df3c31693d6","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def hide_fields_in_newer_versions(obj):"},{"line_number":40,"context_line":"    # if requested version is \u003c 1.16, hide portgroup fields"},{"line_number":41,"context_line":"    if not api_utils.allow_portgroups():"},{"line_number":42,"context_line":"        obj.portgroup_uuid \u003d wsme.Unset"},{"line_number":43,"context_line":"        obj.pxe_enabled \u003d wsme.Unset"}],"source_content_type":"text/x-python","patch_set":86,"id":"fa0719c6_62572aca","line":40,"updated":"2016-03-24 15:38:19.000000000","message":"Since this change introduces 1.17, this comment should say \u003c\u003d1.16 or \u003c 1.17","commit_id":"8412d27663b6b9a080176a73229180842d5e1d8e"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"00dfb7a114981c93234514b3e2f1c61c463f9faa","unresolved":false,"context_lines":[{"line_number":504,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":505,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":506,"context_line":"            for field in self.portgroup_fields:"},{"line_number":507,"context_line":"                if api_utils.get_patch_value(patch, \u0027/%s\u0027 % field):"},{"line_number":508,"context_line":"                    raise exception.NotAcceptable()"},{"line_number":509,"context_line":""},{"line_number":510,"context_line":"        rpc_port \u003d objects.Port.get_by_uuid(pecan.request.context, port_uuid)"}],"source_content_type":"text/x-python","patch_set":90,"id":"9a061dce_6b9c096a","line":507,"updated":"2016-04-04 09:16:34.000000000","message":"This has the same problem as described in this bug - https://bugs.launchpad.net/ironic/+bug/1565663, needs to be fixed.","commit_id":"c89bd7f00a4ec0517ffbe8034690635292d39786"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                   wtypes.text, wtypes.text, types.listtype)"},{"line_number":363,"context_line":"    def get_all(self, node\u003dNone, node_uuid\u003dNone, address\u003dNone, portgroup\u003dNone,"},{"line_number":364,"context_line":"                marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":365,"context_line":"                fields\u003dNone):"},{"line_number":366,"context_line":"        \"\"\"Retrieve a list of ports."},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_48814c4a","line":365,"updated":"2016-05-06 10:34:40.000000000","message":"nit: it feels more natural to me to add a new field to the end","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":362,"context_line":"                   wtypes.text, wtypes.text, types.listtype)"},{"line_number":363,"context_line":"    def get_all(self, node\u003dNone, node_uuid\u003dNone, address\u003dNone, portgroup\u003dNone,"},{"line_number":364,"context_line":"                marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027,"},{"line_number":365,"context_line":"                fields\u003dNone):"},{"line_number":366,"context_line":"        \"\"\"Retrieve a list of ports."},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_65b03044","line":365,"in_reply_to":"dab17558_48814c4a","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                   types.macaddress, types.uuid_or_name, types.uuid, int,"},{"line_number":411,"context_line":"                   wtypes.text, wtypes.text)"},{"line_number":412,"context_line":"    def detail(self, node\u003dNone, node_uuid\u003dNone, address\u003dNone, portgroup\u003dNone,"},{"line_number":413,"context_line":"               marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":414,"context_line":"        \"\"\"Retrieve a list of ports with detail."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_a896f891","line":413,"updated":"2016-05-06 10:34:40.000000000","message":"ditto","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                   types.macaddress, types.uuid_or_name, types.uuid, int,"},{"line_number":411,"context_line":"                   wtypes.text, wtypes.text)"},{"line_number":412,"context_line":"    def detail(self, node\u003dNone, node_uuid\u003dNone, address\u003dNone, portgroup\u003dNone,"},{"line_number":413,"context_line":"               marker\u003dNone, limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":414,"context_line":"        \"\"\"Retrieve a list of ports with detail."},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_c5875c5f","line":413,"in_reply_to":"dab17558_a896f891","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        :param patch: a json PATCH document to apply to this port."},{"line_number":502,"context_line":"        \"\"\""},{"line_number":503,"context_line":"        if self.from_nodes or self.from_portgroups:"},{"line_number":504,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":505,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":506,"context_line":"            for field in self.portgroup_fields:"},{"line_number":507,"context_line":"                field_path \u003d \u0027/%s\u0027 % field"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_889334a3","line":504,"updated":"2016-05-06 10:34:40.000000000","message":"nit: while we\u0027re here, would be good to fix exceptions raising:\n\n raise exception.OperationNotPermitted()","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":501,"context_line":"        :param patch: a json PATCH document to apply to this port."},{"line_number":502,"context_line":"        \"\"\""},{"line_number":503,"context_line":"        if self.from_nodes or self.from_portgroups:"},{"line_number":504,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":505,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":506,"context_line":"            for field in self.portgroup_fields:"},{"line_number":507,"context_line":"                field_path \u003d \u0027/%s\u0027 % field"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_05f5e4eb","line":504,"in_reply_to":"dab17558_889334a3","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"51cc3973c69381b2068cc17ef0951009b408a217","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def _get_ports_collection(self, node_or_portgroup_ident, address,"},{"line_number":271,"context_line":"                              portgroup_ident, marker, limit, sort_key,"},{"line_number":272,"context_line":"                              sort_dir, resource_url\u003dNone, fields\u003dNone):"},{"line_number":273,"context_line":"        if self.from_nodes and not node_or_portgroup_ident:"},{"line_number":274,"context_line":"            raise exception.MissingParameterValue("},{"line_number":275,"context_line":"                _(\"Node identifier not specified.\"))"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":108,"id":"9abb7d3a_ce37c94b","line":273,"updated":"2016-06-03 13:11:35.000000000","message":"This does not work properly in cases like\n\n GET http://127.0.0.1:6385/v1/nodes/4df80221-8da6-4cbc-8a1d-ef7214401cb7/ports?portgroup\u003d79f9ae41-60e2-4b9f-9319-e465b197a345\n\nand \n\n GET http://127.0.0.1:6385/v1/portgroups/79f9ae41-60e2-4b9f-9319-e465b197a345/ports?node\u003d4df80221-8da6-4cbc-8a1d-ef7214401cb7\n\nIn first case, it still returns all the portgroups associated with the node, in second case, it overwrites portgroup_ident with node_ident.","commit_id":"1270ac628d403d4ae6fcb0386ba0e39ebe94800e"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def hide_fields_in_newer_versions(obj):"},{"line_number":40,"context_line":"    # if requested version is \u003c 1.17, hide local_link_connection and"},{"line_number":41,"context_line":"    # pxe_enabled fields"},{"line_number":42,"context_line":"    if not api_utils.allow_multitenancy_fields():"},{"line_number":43,"context_line":"        obj.pxe_enabled \u003d wsme.Unset"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_344e38c1","line":40,"updated":"2016-06-24 15:29:24.000000000","message":"Nit: \u003c\u003d 1.17.","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                   types.macaddress, types.uuid, int, wtypes.text,"},{"line_number":318,"context_line":"                   wtypes.text)"},{"line_number":319,"context_line":"    def detail(self, node\u003dNone, node_uuid\u003dNone, address\u003dNone, marker\u003dNone,"},{"line_number":320,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027,):"},{"line_number":321,"context_line":"        \"\"\"Retrieve a list of ports with detail."},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_543784fe","line":320,"updated":"2016-06-24 15:29:24.000000000","message":"You don\u0027t want this comma.","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    \"\"\"Indicates whether pxe is enabled or disabled on the node.\"\"\""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    local_link_connection \u003d types.locallinkconnectiontype"},{"line_number":102,"context_line":"    \"\"\"The port binding profile for each port\"\"\""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    links \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":105,"context_line":"    \"\"\"A list containing a self link and associated port links\"\"\""}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_2be4de0a","line":102,"updated":"2016-07-13 18:33:19.000000000","message":"nit s/each/the/","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"ironic/api/controllers/v1/portgroup.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f5044e250e318df9cf9d781e71165688662a9166","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                                      portgroup_uuid)"},{"line_number":345,"context_line":"        return Portgroup.convert_with_links(rpc_portgroup, fields\u003dfields)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    @expose.expose(Portgroup, body\u003dPortgroup, status_code\u003d201)"},{"line_number":348,"context_line":"    def post(self, portgroup):"},{"line_number":349,"context_line":"        \"\"\"Create a new portgroup."},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_49c62c9b","line":347,"updated":"2015-11-02 18:20:10.000000000","message":"We switched to using http_client constants, please see for example current code for port controller. Please change it throughout the code.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"2dafdc9049e12f0aaeb6b0d91f46158ae8afb1a1","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                                      portgroup_uuid)"},{"line_number":345,"context_line":"        return Portgroup.convert_with_links(rpc_portgroup, fields\u003dfields)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    @expose.expose(Portgroup, body\u003dPortgroup, status_code\u003d201)"},{"line_number":348,"context_line":"    def post(self, portgroup):"},{"line_number":349,"context_line":"        \"\"\"Create a new portgroup."},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_489a5516","line":347,"in_reply_to":"1a26ad4f_49c62c9b","updated":"2015-11-16 15:11:43.000000000","message":"Diff can be viewed temporarily at\nhttps://github.com/yhvh/ironic/commit/0b53ff5b6927261f25dc281f3f0f0d8bedd982a2","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                                                      portgroup_uuid)"},{"line_number":345,"context_line":"        return Portgroup.convert_with_links(rpc_portgroup, fields\u003dfields)"},{"line_number":346,"context_line":""},{"line_number":347,"context_line":"    @expose.expose(Portgroup, body\u003dPortgroup, status_code\u003d201)"},{"line_number":348,"context_line":"    def post(self, portgroup):"},{"line_number":349,"context_line":"        \"\"\"Create a new portgroup."},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_a0ae0d83","line":347,"in_reply_to":"ba8a016a_489a5516","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from ironic import objects"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_DEFAULT_RETURN_FIELDS \u003d (\u0027uuid\u0027, \u0027address\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class Portgroup(base.APIBase):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_42469b24","line":33,"updated":"2015-12-23 13:18:33.000000000","message":"Maybe add a name here too?","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from ironic import objects"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_DEFAULT_RETURN_FIELDS \u003d (\u0027uuid\u0027, \u0027address\u0027)"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class Portgroup(base.APIBase):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_078fdccc","line":33,"in_reply_to":"1a7b0d38_42469b24","updated":"2016-01-05 17:48:21.000000000","message":"Done","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                self.node_id \u003d node.id"},{"line_number":58,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":59,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"},{"line_number":60,"context_line":"                # response for a POST request to create a Port"},{"line_number":61,"context_line":"                e.code \u003d http_client.BAD_REQUEST"},{"line_number":62,"context_line":"                raise e"},{"line_number":63,"context_line":"        elif value \u003d\u003d wtypes.Unset:"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_4740ed56","line":60,"updated":"2015-12-23 13:18:33.000000000","message":"Portgroup","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                self.node_id \u003d node.id"},{"line_number":58,"context_line":"            except exception.NodeNotFound as e:"},{"line_number":59,"context_line":"                # Change error code because 404 (NotFound) is inappropriate"},{"line_number":60,"context_line":"                # response for a POST request to create a Port"},{"line_number":61,"context_line":"                e.code \u003d http_client.BAD_REQUEST"},{"line_number":62,"context_line":"                raise e"},{"line_number":63,"context_line":"        elif value \u003d\u003d wtypes.Unset:"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_c76a34ee","line":60,"in_reply_to":"1a7b0d38_4740ed56","updated":"2016-01-05 17:48:21.000000000","message":"Done","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    @classmethod"},{"line_number":136,"context_line":"    def sample(cls, expand\u003dTrue):"},{"line_number":137,"context_line":"        sample \u003d cls(uuid\u003d\u002727e3153e-d5bf-4b7e-b517-fb518e17f34c\u0027,"},{"line_number":138,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":139,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":140,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":141,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_c2312bee","line":138,"updated":"2015-12-23 13:18:33.000000000","message":"Should we add a name to sample?","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    @classmethod"},{"line_number":136,"context_line":"    def sample(cls, expand\u003dTrue):"},{"line_number":137,"context_line":"        sample \u003d cls(uuid\u003d\u002727e3153e-d5bf-4b7e-b517-fb518e17f34c\u0027,"},{"line_number":138,"context_line":"                     address\u003d\u0027fe:54:00:77:07:d9\u0027,"},{"line_number":139,"context_line":"                     extra\u003d{\u0027foo\u0027: \u0027bar\u0027},"},{"line_number":140,"context_line":"                     created_at\u003ddatetime.datetime.utcnow(),"},{"line_number":141,"context_line":"                     updated_at\u003ddatetime.datetime.utcnow())"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_87474c76","line":138,"in_reply_to":"1a7b0d38_c2312bee","updated":"2016-01-05 17:48:21.000000000","message":"Done","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027, fields\u003dNone):"},{"line_number":256,"context_line":"        \"\"\"Retrieve a list of portgroups."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":259,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_02c2d385","line":258,"updated":"2015-12-23 13:18:33.000000000","message":"Do we need this? As this is new stuff, I guess we can leave only node here.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027, fields\u003dNone):"},{"line_number":256,"context_line":"        \"\"\"Retrieve a list of portgroups."},{"line_number":257,"context_line":""},{"line_number":258,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":259,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_820f3a87","line":258,"in_reply_to":"1a7b0d38_02c2d385","updated":"2016-01-05 17:48:21.000000000","message":"I think that API should provide similar interfaces to ports and portgroups. So it would be better to deprecate node_uuid for ports and portgroup at the same time.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":294,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":295,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":298,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_625e37eb","line":297,"updated":"2015-12-23 13:18:33.000000000","message":"ditto","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":294,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":295,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":298,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_021caabf","line":297,"in_reply_to":"1a7b0d38_625e37eb","updated":"2016-01-05 17:48:21.000000000","message":"please check comments above","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    \"\"\"MAC Address for this portgroup\"\"\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    extra \u003d {wtypes.text: types.jsontype}"},{"line_number":73,"context_line":"    \"\"\"This portgroups meta data\"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":76,"context_line":"                                mandatory\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_24b0428b","line":73,"updated":"2016-01-27 01:32:05.000000000","message":"nit, s/portgroups/portgroup\u0027s/","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    \"\"\"MAC Address for this portgroup\"\"\""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    extra \u003d {wtypes.text: types.jsontype}"},{"line_number":73,"context_line":"    \"\"\"This portgroups meta data\"\"\""},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    node_uuid \u003d wsme.wsproperty(types.uuid, _get_node_uuid, _set_node_uuid,"},{"line_number":76,"context_line":"                                mandatory\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_4df90a4d","line":73,"in_reply_to":"9a68dd71_24b0428b","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        \"\"\"Retrieve a list of portgroups."},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":260,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"},{"line_number":263,"context_line":"                     node."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_6fc933ac","line":260,"updated":"2016-01-27 01:32:05.000000000","message":"Please delete node_uuid and all code related to it. It was in other classes (eg PortsController.get_all()) because those APIs existed before we had node names. Since this is a new API, there is no reason for it to support node_uuid.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        \"\"\"Retrieve a list of portgroups."},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":260,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":261,"context_line":""},{"line_number":262,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"},{"line_number":263,"context_line":"                     node."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_a359ad90","line":260,"in_reply_to":"9a68dd71_6fc933ac","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":295,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":296,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":299,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_2f725b7d","line":298,"updated":"2016-01-27 01:32:05.000000000","message":"ditto about node_uuid.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":295,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":296,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"        Note that the \u0027node_uuid\u0027 interface is deprecated in favour"},{"line_number":299,"context_line":"        of the \u0027node\u0027 interface"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_83091134","line":298,"in_reply_to":"9a68dd71_2f725b7d","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                                               sort_dir, resource_url)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    @expose.expose(Portgroup, types.uuid, types.listtype)"},{"line_number":331,"context_line":"    def get_one(self, portgroup_uuid, fields\u003dNone):"},{"line_number":332,"context_line":"        \"\"\"Retrieve information about the given portgroup."},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        :param portgroup_uuid: UUID of a port."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_2f201b49","line":331,"updated":"2016-01-27 01:32:05.000000000","message":"since a portgroup can be identified by its UUID or name, I think we should allow the user to specify either one, so this should be \u0027portgroup\u0027 or \u0027portgroup_ident\u0027 of types.uuid_or_name.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                                               sort_dir, resource_url)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    @expose.expose(Portgroup, types.uuid, types.listtype)"},{"line_number":331,"context_line":"    def get_one(self, portgroup_uuid, fields\u003dNone):"},{"line_number":332,"context_line":"        \"\"\"Retrieve information about the given portgroup."},{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        :param portgroup_uuid: UUID of a port."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_662503c1","line":331,"in_reply_to":"9a68dd71_2f201b49","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @wsme.validate(types.uuid, [PortgroupPatchType])"},{"line_number":365,"context_line":"    @expose.expose(Portgroup, types.uuid, body\u003d[PortgroupPatchType])"},{"line_number":366,"context_line":"    def patch(self, portgroup_uuid, patch):"},{"line_number":367,"context_line":"        \"\"\"Update an existing portgroup."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        :param portgroup_uuid: UUID of a portgroup."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_cf937f4e","line":366,"updated":"2016-01-27 01:32:05.000000000","message":"ditto about portgroup UUID or name. Should allow user to specify either.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    @wsme.validate(types.uuid, [PortgroupPatchType])"},{"line_number":365,"context_line":"    @expose.expose(Portgroup, types.uuid, body\u003d[PortgroupPatchType])"},{"line_number":366,"context_line":"    def patch(self, portgroup_uuid, patch):"},{"line_number":367,"context_line":"        \"\"\"Update an existing portgroup."},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        :param portgroup_uuid: UUID of a portgroup."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_21bb75c6","line":366,"in_reply_to":"9a68dd71_cf937f4e","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        return Portgroup.convert_with_links(new_portgroup)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @expose.expose(None, types.uuid, status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":411,"context_line":"    def delete(self, portgroup_uuid):"},{"line_number":412,"context_line":"        \"\"\"Delete a portgroup."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        :param portgroup_uuid: UUID of a portgroup."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_6f0b737e","line":411,"updated":"2016-01-27 01:32:05.000000000","message":"ditto about portgroup UUID or name.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        return Portgroup.convert_with_links(new_portgroup)"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    @expose.expose(None, types.uuid, status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":411,"context_line":"    def delete(self, portgroup_uuid):"},{"line_number":412,"context_line":"        \"\"\"Delete a portgroup."},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        :param portgroup_uuid: UUID of a portgroup."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_61c16d2e","line":411,"in_reply_to":"9a68dd71_6f0b737e","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                       of the resource to be returned."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":270,"context_line":"            versions.MINOR_15_PORTGROUP)"},{"line_number":271,"context_line":"        if fields is None:"},{"line_number":272,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_8c27a763","line":270,"updated":"2016-01-28 23:04:14.000000000","message":"I\u0027d prefer the call to api_utils.allow_portgroups(). (Here and the other methods below.) All these portgroup requests should not be allowed if the API version is \u003c 1.15. It has nothing to do with \u0027check_requested_fields_are_allowed\u0027.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                       of the resource to be returned."},{"line_number":268,"context_line":"        \"\"\""},{"line_number":269,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":270,"context_line":"            versions.MINOR_15_PORTGROUP)"},{"line_number":271,"context_line":"        if fields is None:"},{"line_number":272,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"},{"line_number":273,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_0cd4f0e9","line":270,"in_reply_to":"7a5de9d1_8c27a763","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"},{"line_number":286,"context_line":"                     node."},{"line_number":287,"context_line":"        :param node_uuid: UUID of a node, to get only portgroups for that"},{"line_number":288,"context_line":"                          node."},{"line_number":289,"context_line":"        :param address: MAC address of a portgroup, to get the portgroup which"},{"line_number":290,"context_line":"                        has this MAC address."},{"line_number":291,"context_line":"        :param marker: pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_66da8a7a","line":288,"updated":"2016-01-28 23:04:14.000000000","message":"Please delete the above 2 lines, they no longer apply.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        :param node: UUID or name of a node, to get only portgroups for that"},{"line_number":286,"context_line":"                     node."},{"line_number":287,"context_line":"        :param node_uuid: UUID of a node, to get only portgroups for that"},{"line_number":288,"context_line":"                          node."},{"line_number":289,"context_line":"        :param address: MAC address of a portgroup, to get the portgroup which"},{"line_number":290,"context_line":"                        has this MAC address."},{"line_number":291,"context_line":"        :param marker: pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_6c01e469","line":288,"in_reply_to":"7a5de9d1_66da8a7a","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        rpc_portgroup \u003d api_utils.get_rpc_portgroup(portgroup_ident)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        try:"},{"line_number":360,"context_line":"            portgroup_dict \u003d rpc_portgroup.as_dict()"},{"line_number":361,"context_line":"            # NOTE:"},{"line_number":362,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_3910344e","line":359,"updated":"2016-01-28 23:04:14.000000000","message":"I was looking at NodesController.patch(), and if the name is being modified, it validates the new name, so I guess we should do a similar thing here.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        rpc_portgroup \u003d api_utils.get_rpc_portgroup(portgroup_ident)"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        try:"},{"line_number":360,"context_line":"            portgroup_dict \u003d rpc_portgroup.as_dict()"},{"line_number":361,"context_line":"            # NOTE:"},{"line_number":362,"context_line":"            # 1) Remove node_id because it\u0027s an internal value and"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_c7fa3143","line":359,"in_reply_to":"7a5de9d1_3910344e","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":394,"context_line":"    def delete(self, portgroup_ident):"},{"line_number":395,"context_line":"        \"\"\"Delete a portgroup."},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        :param portgroup_ident: UUID or logical of a portgroup."},{"line_number":398,"context_line":"        \"\"\""},{"line_number":399,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":400,"context_line":"            versions.MINOR_15_PORTGROUP)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_ec997b20","line":397,"updated":"2016-01-28 23:04:14.000000000","message":"s/logical/logical name/","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":394,"context_line":"    def delete(self, portgroup_ident):"},{"line_number":395,"context_line":"        \"\"\"Delete a portgroup."},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        :param portgroup_ident: UUID or logical of a portgroup."},{"line_number":398,"context_line":"        \"\"\""},{"line_number":399,"context_line":"        api_utils.check_requested_fields_are_allowed("},{"line_number":400,"context_line":"            versions.MINOR_15_PORTGROUP)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_67b9fd78","line":397,"in_reply_to":"7a5de9d1_ec997b20","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        error_msg \u003d _(\"Cannot create portgroup with invalid name \""},{"line_number":336,"context_line":"                      \"\u0027%(name)s\u0027\") % {\u0027name\u0027: portgroup.name}"},{"line_number":337,"context_line":"        if (portgroup.name and"},{"line_number":338,"context_line":"            not api_utils.is_valid_logical_name(portgroup.name)):"},{"line_number":339,"context_line":"                raise wsme.exc.ClientSideError("}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_93b3bc97","line":336,"updated":"2016-02-02 03:42:39.000000000","message":"maybe move this into the if, since there\u0027s no need to generate this string if there is no portgroup.name or if it is valid.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        error_msg \u003d _(\"Cannot create portgroup with invalid name \""},{"line_number":336,"context_line":"                      \"\u0027%(name)s\u0027\") % {\u0027name\u0027: portgroup.name}"},{"line_number":337,"context_line":"        if (portgroup.name and"},{"line_number":338,"context_line":"            not api_utils.is_valid_logical_name(portgroup.name)):"},{"line_number":339,"context_line":"                raise wsme.exc.ClientSideError("}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_5906a521","line":336,"in_reply_to":"7a5de9d1_93b3bc97","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        name \u003d api_utils.get_patch_value(patch, \u0027/name\u0027)"},{"line_number":367,"context_line":"        error_msg \u003d _(\"Portgroup %(portgroup)s: Cannot change name to invalid \""},{"line_number":368,"context_line":"                      \"name \u0027%(name)s\u0027\") % {\u0027portgroup\u0027: portgroup_ident,"},{"line_number":369,"context_line":"                                            \u0027name\u0027: name}"},{"line_number":370,"context_line":"        if (name and"},{"line_number":371,"context_line":"            not api_utils.is_valid_logical_name(name)):"},{"line_number":372,"context_line":"            raise wsme.exc.ClientSideError("}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_b3aef82b","line":369,"updated":"2016-02-02 03:42:39.000000000","message":"maybe move this into the if, since there\u0027s no need to generate this string if there is no name or if it is valid.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":366,"context_line":"        name \u003d api_utils.get_patch_value(patch, \u0027/name\u0027)"},{"line_number":367,"context_line":"        error_msg \u003d _(\"Portgroup %(portgroup)s: Cannot change name to invalid \""},{"line_number":368,"context_line":"                      \"name \u0027%(name)s\u0027\") % {\u0027portgroup\u0027: portgroup_ident,"},{"line_number":369,"context_line":"                                            \u0027name\u0027: name}"},{"line_number":370,"context_line":"        if (name and"},{"line_number":371,"context_line":"            not api_utils.is_valid_logical_name(name)):"},{"line_number":372,"context_line":"            raise wsme.exc.ClientSideError("}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_bc3787e2","line":369,"in_reply_to":"7a5de9d1_b3aef82b","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                               \u0027portgroups\u0027, portgroup_uuid),"},{"line_number":118,"context_line":"                           link.Link.make_link(\u0027bookmark\u0027, url,"},{"line_number":119,"context_line":"                                               \u0027portgroups\u0027, portgroup_uuid,"},{"line_number":120,"context_line":"                                               bookmark\u003dTrue)"},{"line_number":121,"context_line":"                           ]"},{"line_number":122,"context_line":"        return portgroup"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_8c5a1d29","line":120,"updated":"2016-02-12 00:09:01.000000000","message":"Should we have an endpoint that is a list of all ports for that portgroup? e.g. /portgroups/\u003cuuid\u003e/ports","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                               \u0027portgroups\u0027, portgroup_uuid),"},{"line_number":118,"context_line":"                           link.Link.make_link(\u0027bookmark\u0027, url,"},{"line_number":119,"context_line":"                                               \u0027portgroups\u0027, portgroup_uuid,"},{"line_number":120,"context_line":"                                               bookmark\u003dTrue)"},{"line_number":121,"context_line":"                           ]"},{"line_number":122,"context_line":"        return portgroup"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_3ea8dd1f","line":120,"in_reply_to":"3a57f1b5_8c5a1d29","updated":"2016-02-12 14:40:41.000000000","message":"Done, though this introduces a bit strange behaviour, see _get_ports_collection in ports controller in next PS.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"6ecddbc3000f9adcacbca06f93c24fc73fbc2634","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param portgroup: a portgroup within the request body."},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":330,"context_line":"            raise exception.NotAcceptable()"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if self.from_nodes:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_68eb2db1","line":329,"updated":"2016-02-11 13:20:17.000000000","message":"The same thing as in case of portgroup_uuid in port can happen here too right? E.g. you create a portgroup, specify non-existing node_uuid in the body, and get BadRequest instead of NotAcceptable.\n\nAnother question is, is it possible to hide this endpoint completely so as not to workaround this stuff.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        :param portgroup: a portgroup within the request body."},{"line_number":328,"context_line":"        \"\"\""},{"line_number":329,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":330,"context_line":"            raise exception.NotAcceptable()"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        if self.from_nodes:"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_411b7c73","line":329,"in_reply_to":"3a57f1b5_68eb2db1","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        if (portgroup.name and"},{"line_number":336,"context_line":"            not api_utils.is_valid_logical_name(portgroup.name)):"},{"line_number":337,"context_line":"                error_msg \u003d _(\"Cannot create portgroup with invalid name \""},{"line_number":338,"context_line":"                              \"\u0027%(name)s\u0027\") % {\u0027name\u0027: portgroup.name}"},{"line_number":339,"context_line":"                raise wsme.exc.ClientSideError("},{"line_number":340,"context_line":"                    error_msg, status_code\u003dhttp_client.BAD_REQUEST)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_0f5e1f12","line":337,"updated":"2016-02-12 00:09:01.000000000","message":"This is indented too far, should be four spaces from where the if starts. And indent the second line of the if further.\n\n    if (foo and\n            bar):\n        baz()","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        if (portgroup.name and"},{"line_number":336,"context_line":"            not api_utils.is_valid_logical_name(portgroup.name)):"},{"line_number":337,"context_line":"                error_msg \u003d _(\"Cannot create portgroup with invalid name \""},{"line_number":338,"context_line":"                              \"\u0027%(name)s\u0027\") % {\u0027name\u0027: portgroup.name}"},{"line_number":339,"context_line":"                raise wsme.exc.ClientSideError("},{"line_number":340,"context_line":"                    error_msg, status_code\u003dhttp_client.BAD_REQUEST)"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_8115f440","line":337,"in_reply_to":"3a57f1b5_0f5e1f12","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        name \u003d api_utils.get_patch_value(patch, \u0027/name\u0027)"},{"line_number":366,"context_line":"        if (name and"},{"line_number":367,"context_line":"            not api_utils.is_valid_logical_name(name)):"},{"line_number":368,"context_line":"            error_msg \u003d _(\"Portgroup %(portgroup)s: Cannot change name to \""},{"line_number":369,"context_line":"                          \"invalid name \u0027%(name)s\u0027\") % {\u0027portgroup\u0027:"},{"line_number":370,"context_line":"                                                        portgroup_ident,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_efb70338","line":367,"updated":"2016-02-12 00:09:01.000000000","message":"Indent this further.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":364,"context_line":""},{"line_number":365,"context_line":"        name \u003d api_utils.get_patch_value(patch, \u0027/name\u0027)"},{"line_number":366,"context_line":"        if (name and"},{"line_number":367,"context_line":"            not api_utils.is_valid_logical_name(name)):"},{"line_number":368,"context_line":"            error_msg \u003d _(\"Portgroup %(portgroup)s: Cannot change name to \""},{"line_number":369,"context_line":"                          \"invalid name \u0027%(name)s\u0027\") % {\u0027portgroup\u0027:"},{"line_number":370,"context_line":"                                                        portgroup_ident,"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_01282485","line":367,"in_reply_to":"3a57f1b5_efb70338","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"d682cc9ab4b8bba74a94b08b372cad8d9a4eff56","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def _set_node_uuid(self, value):"},{"line_number":50,"context_line":"        if value and self._node_uuid !\u003d value:"},{"line_number":51,"context_line":"            # NOTE(vdrok): When we create a portgroup this method"},{"line_number":52,"context_line":"            # is called before post() as result user may recieve"},{"line_number":53,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":54,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":55,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_8ea4bfa6","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":64},"updated":"2016-02-16 07:14:08.000000000","message":"s/recieve/receive","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def _set_node_uuid(self, value):"},{"line_number":50,"context_line":"        if value and self._node_uuid !\u003d value:"},{"line_number":51,"context_line":"            # NOTE(vdrok): When we create a portgroup this method"},{"line_number":52,"context_line":"            # is called before post() as result user may recieve"},{"line_number":53,"context_line":"            # BAD_REQUEST instead of NOT_ACCEPTABLE if api-version \u003c 1.16"},{"line_number":54,"context_line":"            if not api_utils.allow_portgroups():"},{"line_number":55,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_135e0976","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":64},"in_reply_to":"dae33548_8ea4bfa6","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"36f99db47391e18a3fab767e1b1f169d43a5483b","unresolved":false,"context_lines":[{"line_number":289,"context_line":"                       of the resource to be returned."},{"line_number":290,"context_line":"        \"\"\""},{"line_number":291,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":292,"context_line":"            raise exception.NotAcceptable()"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        if fields is None:"},{"line_number":295,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_bc7c7c21","line":292,"updated":"2016-02-15 14:50:17.000000000","message":"Hm, I feel like /portgroups/* should be a 404, as that is the existing behavior before we added these.","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":289,"context_line":"                       of the resource to be returned."},{"line_number":290,"context_line":"        \"\"\""},{"line_number":291,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":292,"context_line":"            raise exception.NotAcceptable()"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        if fields is None:"},{"line_number":295,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":66,"id":"dae33548_fb47f31a","line":292,"in_reply_to":"dae33548_bc7c7c21","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"7f1835de3873bc9f09c10c1fd14bfb22bccdb137","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            if rpc_portgroup[field] !\u003d patch_val:"},{"line_number":420,"context_line":"                rpc_portgroup[field] \u003d patch_val"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        rpc_node \u003d objects.Node.get_by_id(pecan.request.context,"},{"line_number":423,"context_line":"                                          rpc_portgroup.node_id)"},{"line_number":424,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":425,"context_line":""}],"source_content_type":"text/x-python","patch_set":67,"id":"dae33548_b498bec1","line":422,"updated":"2016-02-17 02:21:54.000000000","message":"This passes the request to the new node / new conductor. On the receiving side, the ConductorManager only locks the *new* node, so there is no check that the Node this PortGroup was previously associated with is in an updatable state.\n\nI have confirmed that it is possible to \"move\" a portgroup away from an ACTIVE node by issuing this command:\n\nironic --ironic-api-version 1.16 portgroup-update \u003cPG_NAME\u003e replace node_uuid\u003d\u003cAVAILABLE_NODE_UUID\u003e","commit_id":"f02253957d405e759bd3f76d31fc258ec2a15d49"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"032ac01b87af0c963aea58374914a991663df238","unresolved":false,"context_lines":[{"line_number":423,"context_line":"                                          rpc_portgroup.node_id)"},{"line_number":424,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        new_portgroup \u003d pecan.request.rpcapi.update_portgroup("},{"line_number":427,"context_line":"            pecan.request.context, rpc_portgroup, topic)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        return Portgroup.convert_with_links(new_portgroup)"}],"source_content_type":"text/x-python","patch_set":71,"id":"dae33548_9a1fa107","line":426,"updated":"2016-02-17 03:38:44.000000000","message":"There is a bug in the conductor-side of this method, which I just opened here: https://bugs.launchpad.net/ironic/+bug/1546371","commit_id":"8cb96b9550aa2d4b6e6c9a877a0a872e9d2e325e"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"409e286ba80cf3be0e301ba5ac0dbfb0ee8e7bac","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       of the resource to be returned."},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":290,"context_line":"            raise exception.NotFound()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if fields is None:"},{"line_number":293,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":94,"id":"1a122d0e_d1938c59","line":290,"range":{"start_line":290,"start_character":11,"end_line":290,"end_character":38},"updated":"2016-04-20 12:41:56.000000000","message":"It\u0027s better to be NotAcceptable here i think.","commit_id":"581f21cec2f590ebee5b7834a5452873d8441b8b"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b50358c004d0f3bb2c01373db483beaa8b9d57a5","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       of the resource to be returned."},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":290,"context_line":"            raise exception.NotFound()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if fields is None:"},{"line_number":293,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":94,"id":"1a122d0e_d5286688","line":290,"range":{"start_line":290,"start_character":11,"end_line":290,"end_character":38},"in_reply_to":"1a122d0e_d1938c59","updated":"2016-04-21 07:53:22.000000000","message":"there is no portgroups in older api versions at all, so if user do request to a portgroup from old api version he should receive NotFoud.","commit_id":"581f21cec2f590ebee5b7834a5452873d8441b8b"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"409e286ba80cf3be0e301ba5ac0dbfb0ee8e7bac","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        \"\"\""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":315,"context_line":"            raise exception.NotFound()"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        # NOTE: /detail should only work against collections"},{"line_number":318,"context_line":"        parent \u003d pecan.request.path.split(\u0027/\u0027)[:-1][-1]"}],"source_content_type":"text/x-python","patch_set":94,"id":"1a122d0e_518e5c2e","line":315,"range":{"start_line":315,"start_character":12,"end_line":315,"end_character":38},"updated":"2016-04-20 12:41:56.000000000","message":"ditto.","commit_id":"581f21cec2f590ebee5b7834a5452873d8441b8b"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"409e286ba80cf3be0e301ba5ac0dbfb0ee8e7bac","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                       of the resource to be returned."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":336,"context_line":"            raise exception.NotFound()"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        if self.from_nodes:"},{"line_number":339,"context_line":"            raise exception.OperationNotPermitted"}],"source_content_type":"text/x-python","patch_set":94,"id":"1a122d0e_9184740b","line":336,"range":{"start_line":336,"start_character":12,"end_line":336,"end_character":38},"updated":"2016-04-20 12:41:56.000000000","message":"ditto","commit_id":"581f21cec2f590ebee5b7834a5452873d8441b8b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    \"\"\"The UUID of the node this portgroup belongs to\"\"\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    name \u003d wsme.wsattr(wtypes.text)"},{"line_number":83,"context_line":"    \"\"\"The logical name for this portgroup\"\"\""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    links \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":86,"context_line":"    \"\"\"A list containing a self link and associated portgroup links\"\"\""}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_28e9681b","line":83,"updated":"2016-05-06 10:34:40.000000000","message":"we don\u0027t have names for ports, so it seems inconsistent to have names for port groups","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":80,"context_line":"    \"\"\"The UUID of the node this portgroup belongs to\"\"\""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    name \u003d wsme.wsattr(wtypes.text)"},{"line_number":83,"context_line":"    \"\"\"The logical name for this portgroup\"\"\""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    links \u003d wsme.wsattr([link.Link], readonly\u003dTrue)"},{"line_number":86,"context_line":"    \"\"\"A list containing a self link and associated portgroup links\"\"\""}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_25b10802","line":83,"in_reply_to":"dab17558_28e9681b","updated":"2016-05-26 14:57:35.000000000","message":"According to spec portgroups may have names: https://specs.openstack.org/openstack/ironic-specs/specs/not-implemented/ironic-ml2-integration.html","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       of the resource to be returned."},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":290,"context_line":"            raise exception.NotFound()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if fields is None:"},{"line_number":293,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_08ee2422","line":290,"updated":"2016-05-06 10:34:40.000000000","message":"I think it should be NotAcceptable","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":287,"context_line":"                       of the resource to be returned."},{"line_number":288,"context_line":"        \"\"\""},{"line_number":289,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":290,"context_line":"            raise exception.NotFound()"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        if fields is None:"},{"line_number":293,"context_line":"            fields \u003d _DEFAULT_RETURN_FIELDS"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_854394ae","line":290,"in_reply_to":"dab17558_08ee2422","updated":"2016-05-26 14:57:35.000000000","message":"there were no portgroup objects in prior versions, so when we trying to access to non-existed link it should be NotFound. It was decided on one of meetings and agreed with Devananda and Jim.","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def detail(self, node\u003dNone, address\u003dNone, marker\u003dNone,"},{"line_number":303,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":304,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        :param address: MAC address of a portgroup, to get the portgroup which"},{"line_number":307,"context_line":"                        has this MAC address."},{"line_number":308,"context_line":"        :param marker: pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_68f3700b","line":305,"updated":"2016-05-06 10:34:40.000000000","message":":param node:","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def detail(self, node\u003dNone, address\u003dNone, marker\u003dNone,"},{"line_number":303,"context_line":"               limit\u003dNone, sort_key\u003d\u0027id\u0027, sort_dir\u003d\u0027asc\u0027):"},{"line_number":304,"context_line":"        \"\"\"Retrieve a list of portgroups with detail."},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        :param address: MAC address of a portgroup, to get the portgroup which"},{"line_number":307,"context_line":"                        has this MAC address."},{"line_number":308,"context_line":"        :param marker: pagination marker for large data sets."}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_a574d8fd","line":305,"in_reply_to":"dab17558_68f3700b","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":312,"context_line":"        \"\"\""},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":315,"context_line":"            raise exception.NotFound()"},{"line_number":316,"context_line":""},{"line_number":317,"context_line":"        # NOTE: /detail should only work against collections"},{"line_number":318,"context_line":"        parent \u003d pecan.request.path.split(\u0027/\u0027)[:-1][-1]"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_48f82ce6","line":315,"updated":"2016-05-06 10:34:40.000000000","message":"ditto","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        # NOTE: /detail should only work against collections"},{"line_number":318,"context_line":"        parent \u003d pecan.request.path.split(\u0027/\u0027)[:-1][-1]"},{"line_number":319,"context_line":"        if parent !\u003d \"portgroups\":"},{"line_number":320,"context_line":"            raise exception.HTTPNotFound"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        resource_url \u003d \u0027/\u0027.join([\u0027portgroups\u0027, \u0027detail\u0027])"},{"line_number":323,"context_line":"        return self._get_portgroups_collection(node, address,"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_a8dd5872","line":320,"updated":"2016-05-06 10:34:40.000000000","message":"please raise an instance, not a class:\n\n raise exception.HTTPNotFound()","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":317,"context_line":"        # NOTE: /detail should only work against collections"},{"line_number":318,"context_line":"        parent \u003d pecan.request.path.split(\u0027/\u0027)[:-1][-1]"},{"line_number":319,"context_line":"        if parent !\u003d \"portgroups\":"},{"line_number":320,"context_line":"            raise exception.HTTPNotFound"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"        resource_url \u003d \u0027/\u0027.join([\u0027portgroups\u0027, \u0027detail\u0027])"},{"line_number":323,"context_line":"        return self._get_portgroups_collection(node, address,"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_c5659c45","line":320,"in_reply_to":"dab17558_a8dd5872","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":328,"context_line":"    def get_one(self, portgroup_ident, fields\u003dNone):"},{"line_number":329,"context_line":"        \"\"\"Retrieve information about the given portgroup."},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        :param portgroup_ident: UUID or logical name of a portgroup."},{"line_number":332,"context_line":"        :param fields: Optional, a list with a specified set of fields"},{"line_number":333,"context_line":"                       of the resource to be returned."},{"line_number":334,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_88da1477","line":331,"updated":"2016-05-06 10:34:40.000000000","message":"see above about names","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":333,"context_line":"                       of the resource to be returned."},{"line_number":334,"context_line":"        \"\"\""},{"line_number":335,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":336,"context_line":"            raise exception.NotFound()"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        if self.from_nodes:"},{"line_number":339,"context_line":"            raise exception.OperationNotPermitted"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_e8e7603e","line":336,"updated":"2016-05-06 10:34:40.000000000","message":"NotAcceptable","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            raise exception.NotFound()"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        if self.from_nodes:"},{"line_number":339,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        rpc_portgroup \u003d api_utils.get_rpc_portgroup(portgroup_ident)"},{"line_number":342,"context_line":"        return Portgroup.convert_with_links(rpc_portgroup, fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_c8e41c3d","line":339,"updated":"2016-05-06 10:34:40.000000000","message":"ditto about exception raising","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":336,"context_line":"            raise exception.NotFound()"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"        if self.from_nodes:"},{"line_number":339,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        rpc_portgroup \u003d api_utils.get_rpc_portgroup(portgroup_ident)"},{"line_number":342,"context_line":"        return Portgroup.convert_with_links(rpc_portgroup, fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_65dcb0e4","line":339,"in_reply_to":"dab17558_c8e41c3d","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":348,"context_line":"        :param portgroup: a portgroup within the request body."},{"line_number":349,"context_line":"        \"\"\""},{"line_number":350,"context_line":"        if not api_utils.allow_portgroups():"},{"line_number":351,"context_line":"            raise exception.NotFound()"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        if self.from_nodes:"},{"line_number":354,"context_line":"            raise exception.OperationNotPermitted"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_28d04853","line":351,"updated":"2016-05-06 10:34:40.000000000","message":"NotAcceptable","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            raise exception.NotFound()"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        if self.from_nodes:"},{"line_number":354,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        if (portgroup.name and"},{"line_number":357,"context_line":"                not api_utils.is_valid_logical_name(portgroup.name)):"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_08d58442","line":354,"updated":"2016-05-06 10:34:40.000000000","message":"()","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":351,"context_line":"            raise exception.NotFound()"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"        if self.from_nodes:"},{"line_number":354,"context_line":"            raise exception.OperationNotPermitted"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        if (portgroup.name and"},{"line_number":357,"context_line":"                not api_utils.is_valid_logical_name(portgroup.name)):"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_e5eee089","line":354,"in_reply_to":"dab17558_08d58442","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"25063a935d2bb648ec904d5baee58f6f8568a43f","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        portgroup \u003d Portgroup(**rpc_portgroup.as_dict())"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if fields is not None:"},{"line_number":143,"context_line":"            api_utils.check_for_invalid_fields(fields, portgroup.as_dict())"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        return cls._convert_with_links(portgroup, pecan.request.host_url,"},{"line_number":146,"context_line":"                                       fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":104,"id":"bab6814e_7c1dfebc","line":143,"range":{"start_line":143,"start_character":12,"end_line":143,"end_character":75},"updated":"2016-05-18 09:17:26.000000000","message":"Do we also need to check the api version here with api_utils.allow_portgroups()?","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a55af0064d76a13e84b4fccd73b7ac8f9b7c5be","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        portgroup \u003d Portgroup(**rpc_portgroup.as_dict())"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        if fields is not None:"},{"line_number":143,"context_line":"            api_utils.check_for_invalid_fields(fields, portgroup.as_dict())"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"        return cls._convert_with_links(portgroup, pecan.request.host_url,"},{"line_number":146,"context_line":"                                       fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":104,"id":"bab6814e_9e29de9d","line":143,"range":{"start_line":143,"start_character":12,"end_line":143,"end_character":75},"in_reply_to":"bab6814e_7c1dfebc","updated":"2016-05-24 16:14:43.000000000","message":"This is checked in get_all, get_one, detail ... methods from PortgroupsController class.","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"}],"ironic/api/controllers/v1/types.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f5044e250e318df9cf9d781e71165688662a9166","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    def validate(value):"},{"line_number":289,"context_line":"        JsonType.validate(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        keys \u003d set(value.keys())"},{"line_number":292,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":293,"context_line":"        if invalid:"},{"line_number":294,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_89e444e0","line":291,"updated":"2015-11-02 18:20:10.000000000","message":"So you only allow dictionaries here, but JsonType __str__ method allows all json-serializable types, please reflect this change.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    def validate(value):"},{"line_number":289,"context_line":"        JsonType.validate(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        keys \u003d set(value.keys())"},{"line_number":292,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":293,"context_line":"        if invalid:"},{"line_number":294,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_00ce015a","line":291,"in_reply_to":"1a26ad4f_89e444e0","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"2dafdc9049e12f0aaeb6b0d91f46158ae8afb1a1","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    def validate(value):"},{"line_number":289,"context_line":"        JsonType.validate(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        keys \u003d set(value.keys())"},{"line_number":292,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":293,"context_line":"        if invalid:"},{"line_number":294,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_0b1447f3","line":291,"in_reply_to":"1a26ad4f_89e444e0","updated":"2015-11-16 15:11:43.000000000","message":"Please view diff at:\nhttps://github.com/yhvh/ironic/commit/0c00c4ed745bc328915dde9ef86e0707e4fe3fcb","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":288,"context_line":"    def validate(value):"},{"line_number":289,"context_line":"        JsonType.validate(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        keys \u003d set(value.keys())"},{"line_number":292,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":293,"context_line":"        if invalid:"},{"line_number":294,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_20e8ddb3","line":291,"in_reply_to":"ba8a016a_0b1447f3","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"036ac72994a2fcf8cc02d153303f815d72fb9ba0","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                raise exception.Invalid(msg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"            # Check the switch_id is a valid mac address"},{"line_number":303,"context_line":"            MacAddressType.validate(value[\u0027switch_id\u0027])"},{"line_number":304,"context_line":"        return value"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_d06f46fa","line":303,"updated":"2015-11-02 15:55:02.000000000","message":"From the Ironic spec: \"For example, the switch_id field is used to identify a switch and could be an LLDP based MAC address or an OpenFlow based datapath_id\"\n\nOpenFlow protocol spec:\n\n6.1.8 \nDatapath ID \nSection A.3.1 of  (1) discusses the datapath ID of a switch. It is a 64 bit filed  \nwith the lower 48 bit intended for the switch MAC address and the remaining  16 bit left to the switch.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                raise exception.Invalid(msg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"            # Check the switch_id is a valid mac address"},{"line_number":303,"context_line":"            MacAddressType.validate(value[\u0027switch_id\u0027])"},{"line_number":304,"context_line":"        return value"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_e0d2d5ff","line":303,"in_reply_to":"1a26ad4f_d06f46fa","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"2dafdc9049e12f0aaeb6b0d91f46158ae8afb1a1","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                raise exception.Invalid(msg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"            # Check the switch_id is a valid mac address"},{"line_number":303,"context_line":"            MacAddressType.validate(value[\u0027switch_id\u0027])"},{"line_number":304,"context_line":"        return value"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_6b6cf39c","line":303,"in_reply_to":"1a26ad4f_d06f46fa","updated":"2015-11-16 15:11:43.000000000","message":"Please view diff at \nhttps://github.com/yhvh/ironic/commit/0c00c4ed745bc328915dde9ef86e0707e4fe3fcb","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":300,"context_line":"                raise exception.Invalid(msg)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"            # Check the switch_id is a valid mac address"},{"line_number":303,"context_line":"            MacAddressType.validate(value[\u0027switch_id\u0027])"},{"line_number":304,"context_line":"        return value"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_40eba9b0","line":303,"in_reply_to":"ba8a016a_6b6cf39c","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"560feb8c083b212531dc2269e37974c551cdb77b","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    # to get the name of the type by accessing it\u0027s __name__ attribute."},{"line_number":267,"context_line":"    # Remove this __name__ attribute once it\u0027s fixed in WSME."},{"line_number":268,"context_line":"    # https://bugs.launchpad.net/wsme/+bug/1265590"},{"line_number":269,"context_line":"    __name__ \u003d name"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    valid_fields \u003d {\u0027switch_id\u0027,"},{"line_number":272,"context_line":"                    \u0027port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_c2004bad","line":269,"updated":"2015-12-23 13:18:33.000000000","message":"This should be removed.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    # to get the name of the type by accessing it\u0027s __name__ attribute."},{"line_number":267,"context_line":"    # Remove this __name__ attribute once it\u0027s fixed in WSME."},{"line_number":268,"context_line":"    # https://bugs.launchpad.net/wsme/+bug/1265590"},{"line_number":269,"context_line":"    __name__ \u003d name"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    valid_fields \u003d {\u0027switch_id\u0027,"},{"line_number":272,"context_line":"                    \u0027port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_82d41abd","line":269,"in_reply_to":"1a7b0d38_c2004bad","updated":"2016-01-05 17:48:21.000000000","message":"Done","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":257,"context_line":"        return ret"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class LocalLinkConnectionType(wtypes.UserType):"},{"line_number":261,"context_line":"    \"\"\"A type describing local link connection\"\"\""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    basetype \u003d wtypes.DictType"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_f5ac1a8e","line":260,"updated":"2016-01-27 01:32:05.000000000","message":"I\u0027d prefer if you moved this class above line 178, or not have line 320. Or leave it as is. Although things seem to be a bit of a mess.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class LocalLinkConnectionType(wtypes.UserType):"},{"line_number":261,"context_line":"    \"\"\"A type describing local link connection\"\"\""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    basetype \u003d wtypes.DictType"},{"line_number":264,"context_line":"    name \u003d \u0027locallinkconnection\u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_3145e716","line":261,"updated":"2016-01-27 01:32:05.000000000","message":"nit, period missing at the end.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":258,"context_line":""},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"class LocalLinkConnectionType(wtypes.UserType):"},{"line_number":261,"context_line":"    \"\"\"A type describing local link connection\"\"\""},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"    basetype \u003d wtypes.DictType"},{"line_number":264,"context_line":"    name \u003d \u0027locallinkconnection\u0027"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_c143816b","line":261,"in_reply_to":"9a68dd71_3145e716","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    # to get the name of the type by accessing it\u0027s __name__ attribute."},{"line_number":267,"context_line":"    # Remove this __name__ attribute once it\u0027s fixed in WSME."},{"line_number":268,"context_line":"    # https://bugs.launchpad.net/wsme/+bug/1265590"},{"line_number":269,"context_line":"    __name__ \u003d name"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    valid_fields \u003d {\u0027switch_id\u0027,"},{"line_number":272,"context_line":"                    \u0027port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_d1f80bc7","line":269,"updated":"2016-01-27 01:32:05.000000000","message":"This has been fixed. Please delete the above 5 lines.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    # to get the name of the type by accessing it\u0027s __name__ attribute."},{"line_number":267,"context_line":"    # Remove this __name__ attribute once it\u0027s fixed in WSME."},{"line_number":268,"context_line":"    # https://bugs.launchpad.net/wsme/+bug/1265590"},{"line_number":269,"context_line":"    __name__ \u003d name"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    valid_fields \u003d {\u0027switch_id\u0027,"},{"line_number":272,"context_line":"                    \u0027port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_4158f156","line":269,"in_reply_to":"9a68dd71_d1f80bc7","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                    \u0027port_id\u0027,"},{"line_number":273,"context_line":"                    \u0027switch_info\u0027}"},{"line_number":274,"context_line":"    mandatory_fields \u003d {\u0027switch_id\u0027,"},{"line_number":275,"context_line":"                        \u0027port_id\u0027}"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    @staticmethod"},{"line_number":278,"context_line":"    def validate(value):"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_914853ce","line":275,"updated":"2016-01-27 01:32:05.000000000","message":"To prevent copy/paste, instead of valid_fields above, I\u0027d put after this line: valid_fields \u003d mandatory_fields.union({\u0027switch_info\u0027})","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                    \u0027port_id\u0027,"},{"line_number":273,"context_line":"                    \u0027switch_info\u0027}"},{"line_number":274,"context_line":"    mandatory_fields \u003d {\u0027switch_id\u0027,"},{"line_number":275,"context_line":"                        \u0027port_id\u0027}"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    @staticmethod"},{"line_number":278,"context_line":"    def validate(value):"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_dc5b6a2d","line":275,"in_reply_to":"9a68dd71_914853ce","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    @staticmethod"},{"line_number":278,"context_line":"    def validate(value):"},{"line_number":279,"context_line":"        \"\"\"Validate and convert the input to a LocalLinkConnectionType."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        :param value: A dictionary, switch_id is a MAC address or an"},{"line_number":282,"context_line":"        OpenFlow based datapath_id, switch_info is an optional field."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_7164bf48","line":279,"updated":"2016-01-27 01:32:05.000000000","message":"I don\u0027t see where any conversions are done.\n\nAlthough I do see above (class MacAddressType) that we normalize MAC addresses. Not sure if you want to do that here.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    @staticmethod"},{"line_number":278,"context_line":"    def validate(value):"},{"line_number":279,"context_line":"        \"\"\"Validate and convert the input to a LocalLinkConnectionType."},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"        :param value: A dictionary, switch_id is a MAC address or an"},{"line_number":282,"context_line":"        OpenFlow based datapath_id, switch_info is an optional field."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_7717eced","line":279,"in_reply_to":"9a68dd71_7164bf48","updated":"2016-01-28 00:40:37.000000000","message":"yes, we should normalize it.","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \"\"\""},{"line_number":294,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        keys \u003d set(value.keys())"},{"line_number":297,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":298,"context_line":"        if invalid:"},{"line_number":299,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_1198e369","line":296,"updated":"2016-01-27 01:32:05.000000000","message":"nit, you could shorten it to set(value)","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":293,"context_line":"        \"\"\""},{"line_number":294,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        keys \u003d set(value.keys())"},{"line_number":297,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":298,"context_line":"        if invalid:"},{"line_number":299,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_f7b8bce7","line":296,"in_reply_to":"9a68dd71_1198e369","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":298,"context_line":"        if invalid:"},{"line_number":299,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"},{"line_number":300,"context_line":"        if keys:"},{"line_number":301,"context_line":"            # Check all mandatory fields are present"},{"line_number":302,"context_line":"            missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":303,"context_line":"            if missing:"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_9175b333","line":300,"updated":"2016-01-27 01:32:05.000000000","message":"nit: maybe do this before line 298.\n\nEg, if not keys:\n         return value","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":298,"context_line":"        if invalid:"},{"line_number":299,"context_line":"            raise exception.Invalid(_(\u0027%s are invalid keys\u0027) % (invalid))"},{"line_number":300,"context_line":"        if keys:"},{"line_number":301,"context_line":"            # Check all mandatory fields are present"},{"line_number":302,"context_line":"            missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":303,"context_line":"            if missing:"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_574e70c2","line":300,"in_reply_to":"9a68dd71_9175b333","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"f6674031dc4650c78487daacb9ab8a94072a1e53","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    basetype \u003d wtypes.DictType"},{"line_number":264,"context_line":"    name \u003d \u0027locallinkconnection\u0027"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    mandatory_fields \u003d {\u0027switch_id\u0027,"},{"line_number":267,"context_line":"                        \u0027port_id\u0027}"},{"line_number":268,"context_line":"    valid_fields \u003d mandatory_fields.union({\u0027switch_info\u0027})"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_0d2a7590","line":267,"range":{"start_line":266,"start_character":4,"end_line":267,"end_character":34},"updated":"2016-02-01 09:53:48.000000000","message":"should add this to port sample, https://review.openstack.org/#/c/206244/54/ironic/api/controllers/v1/port.py L200, otherwise an exception will be raised in below validate method.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":263,"context_line":"    basetype \u003d wtypes.DictType"},{"line_number":264,"context_line":"    name \u003d \u0027locallinkconnection\u0027"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    mandatory_fields \u003d {\u0027switch_id\u0027,"},{"line_number":267,"context_line":"                        \u0027port_id\u0027}"},{"line_number":268,"context_line":"    valid_fields \u003d mandatory_fields.union({\u0027switch_info\u0027})"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_9c964b93","line":267,"range":{"start_line":266,"start_character":4,"end_line":267,"end_character":34},"in_reply_to":"7a5de9d1_0d2a7590","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        {"},{"line_number":279,"context_line":"            \u0027switch_id\u0027: mac_or_datapath_id(),"},{"line_number":280,"context_line":"            \u0027port_id\u0027: \u0027Ethernet3/1\u0027,"},{"line_number":281,"context_line":"            \u0027switch_info\u0027: \u0027switch1\u0027"},{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_af06eb83","line":281,"updated":"2016-02-12 00:09:01.000000000","message":"I believe switch_info was meant to be a dict, did this change? If it is, can we validate that it\u0027s a dict?","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        {"},{"line_number":279,"context_line":"            \u0027switch_id\u0027: mac_or_datapath_id(),"},{"line_number":280,"context_line":"            \u0027port_id\u0027: \u0027Ethernet3/1\u0027,"},{"line_number":281,"context_line":"            \u0027switch_info\u0027: \u0027switch1\u0027"},{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_414cdcc7","line":281,"in_reply_to":"3a57f1b5_af06eb83","updated":"2016-02-12 14:40:41.000000000","message":"ditto, looking at the merged spec it is a string.","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"58656103a32f9a1c4f8d93919f92ac8c9ac30e14","unresolved":false,"context_lines":[{"line_number":284,"context_line":"        :returns: A dictionary"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        keys \u003d set(value)"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":79,"id":"5aef4532_232ca101","line":287,"updated":"2016-03-08 13:42:59.000000000","message":"I\u0027m still concerned that we\u0027re validating switch_info as a string, in many scenarios a dictionary would be more appropriate, and storing it as a string means we need to json encode it. This then requires the ml2 drivers to json decode this field and validate it.","commit_id":"80de5eba40b726aa68b298a9eab28eaf478840b5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        keys \u003d set(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if not keys:"},{"line_number":292,"context_line":"            return value"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":295,"context_line":"        if invalid:"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_a8c43892","line":292,"updated":"2016-05-06 10:34:40.000000000","message":"this can\u0027t happen, we have mandatory keys, no?","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        keys \u003d set(value)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        if not keys:"},{"line_number":292,"context_line":"            return value"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"},{"line_number":295,"context_line":"        if invalid:"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_f09b3cc7","line":292,"in_reply_to":"dab17558_a8c43892","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        # Check all mandatory fields are present"},{"line_number":299,"context_line":"        missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":300,"context_line":"        if missing:"},{"line_number":301,"context_line":"            msg \u003d _(\u0027Missing mandatory keys: %s\u0027) % (missing)"},{"line_number":302,"context_line":"            raise exception.Invalid(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        # Check switch_id is either a valid mac address or"}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_88c17483","line":301,"updated":"2016-05-06 10:34:40.000000000","message":"nit: redundant brackets around missing","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        # Check all mandatory fields are present"},{"line_number":299,"context_line":"        missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":300,"context_line":"        if missing:"},{"line_number":301,"context_line":"            msg \u003d _(\u0027Missing mandatory keys: %s\u0027) % (missing)"},{"line_number":302,"context_line":"            raise exception.Invalid(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        # Check switch_id is either a valid mac address or"}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_d0a0b8f6","line":301,"in_reply_to":"dab17558_88c17483","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":7080,"name":"Mathieu Mitchell","email":"mat128@gmail.com","username":"mat128"},"change_message_id":"8036af3f215660ffaeaf37bf671709ff1d38f846","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            raise exception.Invalid(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        # Check switch_id is either a valid mac address or"},{"line_number":305,"context_line":"        # OpenFlow datapath_id and normalize it."},{"line_number":306,"context_line":"        if utils.is_valid_mac(value[\u0027switch_id\u0027]):"},{"line_number":307,"context_line":"            value[\u0027switch_id\u0027] \u003d utils.validate_and_normalize_mac("},{"line_number":308,"context_line":"                value[\u0027switch_id\u0027])"}],"source_content_type":"text/x-python","patch_set":104,"id":"dab17558_c610cd50","line":305,"updated":"2016-05-17 12:15:45.000000000","message":"Why not allow any identifier?","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a55af0064d76a13e84b4fccd73b7ac8f9b7c5be","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            raise exception.Invalid(msg)"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"        # Check switch_id is either a valid mac address or"},{"line_number":305,"context_line":"        # OpenFlow datapath_id and normalize it."},{"line_number":306,"context_line":"        if utils.is_valid_mac(value[\u0027switch_id\u0027]):"},{"line_number":307,"context_line":"            value[\u0027switch_id\u0027] \u003d utils.validate_and_normalize_mac("},{"line_number":308,"context_line":"                value[\u0027switch_id\u0027])"}],"source_content_type":"text/x-python","patch_set":104,"id":"bab6814e_3b3a84e7","line":305,"in_reply_to":"dab17558_c610cd50","updated":"2016-05-24 16:14:43.000000000","message":"It was decided in the spec http://specs.openstack.org/openstack/ironic-specs/specs/approved/ironic-ml2-integration.html","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"12b76498cc18b2a5c240183271c8f910d589fa00","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # Check all mandatory fields are present"},{"line_number":296,"context_line":"        missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":297,"context_line":"        if missing:"},{"line_number":298,"context_line":"            msg \u003d _(\u0027Missing mandatory keys: %s\u0027) % missing"},{"line_number":299,"context_line":"            raise exception.Invalid(msg)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # Check switch_id is either a valid mac address or"}],"source_content_type":"text/x-python","patch_set":106,"id":"bab6814e_680c75ec","line":298,"updated":"2016-05-26 17:00:13.000000000","message":"So now this happens - http://logs.openstack.org/52/285852/51/check/gate-tempest-dsvm-ironic-pxe_ipa-tinyipa-nv/5e8b656/logs/devstacklog.txt.gz#_2016-05-26_16_29_39_938\n\nMaybe we should check for wsme.Unset in frombasetype? Not sure about the correct solution yet.","commit_id":"3e6b98b097c6149b041999803903f28ea603e8fd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9854acbcd7e7c3b23f6efbe5ff48cc9e93aaf296","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # Check all mandatory fields are present"},{"line_number":296,"context_line":"        missing \u003d LocalLinkConnectionType.mandatory_fields - keys"},{"line_number":297,"context_line":"        if missing:"},{"line_number":298,"context_line":"            msg \u003d _(\u0027Missing mandatory keys: %s\u0027) % missing"},{"line_number":299,"context_line":"            raise exception.Invalid(msg)"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        # Check switch_id is either a valid mac address or"}],"source_content_type":"text/x-python","patch_set":106,"id":"bab6814e_788720b5","line":298,"in_reply_to":"bab6814e_680c75ec","updated":"2016-05-26 18:03:29.000000000","message":"I think here is what happens - API port in post created OK initially, as if the value is Unset, wsme skips validation. Then it is converted to object here https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/port.py#L352 and then back to API object here https://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/port.py#L357. After L352, new_port seem to have local_link_connection\u003d{} as it is the default value in object layer https://github.com/openstack/ironic/blob/master/ironic/objects/fields.py#L64, and this failure happens. I might be wrong, will do some testing tomorrow, but that\u0027s what I suspect from looking at code.","commit_id":"3e6b98b097c6149b041999803903f28ea603e8fd"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dd9cbd820de58bb6da8a27a47a78f4403ea50af1","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            \u0027switch_info\u0027: \u0027switch1\u0027"},{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"}],"source_content_type":"text/x-python","patch_set":109,"id":"7aa08908_1972feb0","line":284,"updated":"2016-06-15 17:36:24.000000000","message":"nit: For documentation purposes, does the dictionary contain?  Perhaps \"A dictionary of validated values\"?","commit_id":"1f65bda72ff5e6231565b08580ee52d067ec6d58"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"93c34320fd3ae299e108d8a934207e2f38c8d7bb","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            \u0027switch_info\u0027: \u0027switch1\u0027"},{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"}],"source_content_type":"text/x-python","patch_set":109,"id":"5a9d85d2_287da51c","line":284,"in_reply_to":"7aa08908_1972feb0","updated":"2016-06-21 14:48:57.000000000","message":"Done","commit_id":"1f65bda72ff5e6231565b08580ee52d067ec6d58"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dd9cbd820de58bb6da8a27a47a78f4403ea50af1","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":109,"id":"7aa08908_39441a1a","line":285,"updated":"2016-06-15 17:36:24.000000000","message":"nit: Should indicate what it could possibly raise if values are invalid.","commit_id":"1f65bda72ff5e6231565b08580ee52d067ec6d58"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"93c34320fd3ae299e108d8a934207e2f38c8d7bb","unresolved":false,"context_lines":[{"line_number":282,"context_line":"        }"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        :returns: A dictionary"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        \"\"\""},{"line_number":287,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"},{"line_number":288,"context_line":""}],"source_content_type":"text/x-python","patch_set":109,"id":"5a9d85d2_0878a92a","line":285,"in_reply_to":"7aa08908_39441a1a","updated":"2016-06-21 14:48:57.000000000","message":"Done","commit_id":"1f65bda72ff5e6231565b08580ee52d067ec6d58"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        :returns: A dictionary"},{"line_number":286,"context_line":"        :raises: Invalid if some of the keys in the dictionary being validated"},{"line_number":287,"context_line":"            are unknown or some required ones are missing, InvalidSwitchID if"},{"line_number":288,"context_line":"            the specified siwtch_id is invalid"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        \"\"\""},{"line_number":291,"context_line":"        wtypes.DictType(wtypes.text, wtypes.text).validate(value)"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_f40f9034","line":288,"updated":"2016-06-24 15:29:24.000000000","message":"Typo: \"switch_id\"","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # This is to workaround an issue when an API object is initialized from"},{"line_number":296,"context_line":"        # RPC object, in which dictionary fields that are set to None become"},{"line_number":297,"context_line":"        # empty dictionaries"},{"line_number":298,"context_line":"        if not keys:"},{"line_number":299,"context_line":"            return value"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_977e0e68","line":298,"updated":"2016-06-24 15:29:24.000000000","message":"I don\u0027t understand what\u0027s going on here - is the problem that value can be None? Because in that case set(value) will throw a TypeError.","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"1ab96c139e5b3c7358dc0d4b048fe1e7d2759bf3","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        # This is to workaround an issue when an API object is initialized from"},{"line_number":296,"context_line":"        # RPC object, in which dictionary fields that are set to None become"},{"line_number":297,"context_line":"        # empty dictionaries"},{"line_number":298,"context_line":"        if not keys:"},{"line_number":299,"context_line":"            return value"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        invalid \u003d keys - LocalLinkConnectionType.valid_fields"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_f728329c","line":298,"in_reply_to":"3aaa91ec_977e0e68","updated":"2016-06-24 15:37:01.000000000","message":"I tried to make it clear in the comment - if the local_link_connection dictionary is not passed, it is converted from None to {} in the object layer, and then API object is initialized from RPC object that has value \u003d\u003d {} \u003d\u003e keys \u003d\u003d set()","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        # OpenFlow datapath_id and normalize it."},{"line_number":312,"context_line":"        if utils.is_valid_mac(value[\u0027switch_id\u0027]):"},{"line_number":313,"context_line":"            value[\u0027switch_id\u0027] \u003d utils.validate_and_normalize_mac("},{"line_number":314,"context_line":"                value[\u0027switch_id\u0027])"},{"line_number":315,"context_line":"        elif utils.is_valid_datapath_id(value[\u0027switch_id\u0027]):"},{"line_number":316,"context_line":"            value[\u0027switch_id\u0027] \u003d utils.validate_and_normalize_datapath_id("},{"line_number":317,"context_line":"                value[\u0027switch_id\u0027])"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_e67ccd72","line":314,"updated":"2016-07-13 18:33:19.000000000","message":"I mentioned it before but I don\u0027t think I was clear. utils.validate_and_normalize_mac() calls utils.is_valid_mac() so it seems a bit inefficient to call utils.is_valid_mac() twice here. How about instead of the if ... above (and the stuff below):\n\n    try:\n        value.. \u003d utils.validate_and_normalize_mac(...)\n    except exception.InvalidMAC:\n        try:\n            value... \u003d utils.validate_and_normalize_datapatch_id(...)\n       except exception.InvalidDatapathId:\n           raise exception.InvalidSwitchID(...)","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"ironic/api/controllers/v1/utils.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"036ac72994a2fcf8cc02d153303f815d72fb9ba0","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                             portgroup_ident)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    # We can refer to portgroups by their name"},{"line_number":120,"context_line":"    if utils.is_hostname_safe(portgroup_ident):"},{"line_number":121,"context_line":"        return objects.Portgroup.get_by_name(pecan.request.context,"},{"line_number":122,"context_line":"                                             portgroup_ident)"},{"line_number":123,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_fbefc384","line":120,"updated":"2015-11-02 15:55:02.000000000","message":"Better to use is_valid_logical_name() for consistency with \"new\" node names.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                             portgroup_ident)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    # We can refer to portgroups by their name"},{"line_number":120,"context_line":"    if utils.is_hostname_safe(portgroup_ident):"},{"line_number":121,"context_line":"        return objects.Portgroup.get_by_name(pecan.request.context,"},{"line_number":122,"context_line":"                                             portgroup_ident)"},{"line_number":123,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_e33bbfcf","line":120,"in_reply_to":"1a26ad4f_fbefc384","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"2dafdc9049e12f0aaeb6b0d91f46158ae8afb1a1","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                                             portgroup_ident)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    # We can refer to portgroups by their name"},{"line_number":120,"context_line":"    if utils.is_hostname_safe(portgroup_ident):"},{"line_number":121,"context_line":"        return objects.Portgroup.get_by_name(pecan.request.context,"},{"line_number":122,"context_line":"                                             portgroup_ident)"},{"line_number":123,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_682079f8","line":120,"in_reply_to":"1a26ad4f_fbefc384","updated":"2015-11-16 15:11:43.000000000","message":"Done, change can be viewed on github temporarily.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    else:"},{"line_number":124,"context_line":"        raise exception.InvalidUuidOrName(name\u003dportgroup_ident)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    raise exception.PortgroupNotFound(portgroup\u003dportgroup_ident)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def is_valid_node_name(name):"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_f13d0fbc","line":126,"updated":"2016-01-27 01:32:05.000000000","message":"I don\u0027t see the reason for this. When would the code ever get to here?","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":123,"context_line":"    else:"},{"line_number":124,"context_line":"        raise exception.InvalidUuidOrName(name\u003dportgroup_ident)"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    raise exception.PortgroupNotFound(portgroup\u003dportgroup_ident)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def is_valid_node_name(name):"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_7755ac1b","line":126,"in_reply_to":"9a68dd71_f13d0fbc","updated":"2016-01-28 00:40:37.000000000","message":"You are right it is a dead code. L121 will raise PortgroupNotFound","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"def allow_portgroups():"},{"line_number":270,"context_line":"    \"\"\"Check if portgroups are displayable."},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    Version 1.15 of the API allows to display of Portgroups."},{"line_number":273,"context_line":"    \"\"\""},{"line_number":274,"context_line":"    return (pecan.request.version.minor \u003e\u003d"},{"line_number":275,"context_line":"            versions.MINOR_15_PORTGROUP)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_ecedfb25","line":272,"updated":"2016-01-28 23:04:14.000000000","message":"I actually liked Deva\u0027s description better (https://review.openstack.org/#/c/273119/1/ironic/api/controllers/v1/utils.py).\n\nWe don\u0027t \u0027display\u0027 anything here; at the API level, we deal with requests/responses :)\n\n\u0027expose\u0027, \u0027support\u0027, ?","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":269,"context_line":"def allow_portgroups():"},{"line_number":270,"context_line":"    \"\"\"Check if portgroups are displayable."},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    Version 1.15 of the API allows to display of Portgroups."},{"line_number":273,"context_line":"    \"\"\""},{"line_number":274,"context_line":"    return (pecan.request.version.minor \u003e\u003d"},{"line_number":275,"context_line":"            versions.MINOR_15_PORTGROUP)"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_427aaf78","line":272,"in_reply_to":"7a5de9d1_ecedfb25","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            versions.MINOR_15_PORTGROUP)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def check_requested_fields_are_allowed(obj_min_version,"},{"line_number":279,"context_line":"                                       hide_fields\u003dNone):"},{"line_number":280,"context_line":"        \"\"\"Check that request contains only allowed fields."},{"line_number":281,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_39acb4ec","line":278,"updated":"2016-01-28 23:04:14.000000000","message":"I don\u0027t think this is needed. If it is, it will need some work because the description is awkward as is the actual method.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            versions.MINOR_15_PORTGROUP)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"def check_requested_fields_are_allowed(obj_min_version,"},{"line_number":279,"context_line":"                                       hide_fields\u003dNone):"},{"line_number":280,"context_line":"        \"\"\"Check that request contains only allowed fields."},{"line_number":281,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_d3a8b022","line":278,"in_reply_to":"7a5de9d1_39acb4ec","updated":"2016-01-29 22:13:23.000000000","message":"I have rewrite this method. The idea is to have single method that will allow to check if request contain any fields that are not allowed for requested api_version.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if pecan.request.version.minor \u003c obj_min_version:"},{"line_number":295,"context_line":"            for item in hide_fields:"},{"line_number":296,"context_line":"                if item is not None:"},{"line_number":297,"context_line":"                    raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_f98cdc80","line":297,"updated":"2016-01-28 23:04:14.000000000","message":"This for loop doesn\u0027t make sense. If there are any items in hide_fields you\u0027re going to raise an exception, so there\u0027s no need to have a for loop.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":294,"context_line":"        if pecan.request.version.minor \u003c obj_min_version:"},{"line_number":295,"context_line":"            for item in hide_fields:"},{"line_number":296,"context_line":"                if item is not None:"},{"line_number":297,"context_line":"                    raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_023d97c3","line":297,"in_reply_to":"7a5de9d1_f98cdc80","updated":"2016-01-29 22:13:23.000000000","message":"I have  rewrite this part","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                if key \u003d\u003d \u0027fields\u0027:"},{"line_number":305,"context_line":"                    req_fields.extend(val.split(\u0027,\u0027))"},{"line_number":306,"context_line":"                else:"},{"line_number":307,"context_line":"                    req_fields.append(val)"},{"line_number":308,"context_line":"            if set(req_fields).intersection(hide_fields):"},{"line_number":309,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_5633f2f5","line":307,"updated":"2016-02-02 03:42:39.000000000","message":"In the method that calls this, the fields are already available. It doesn\u0027t make sense to do all this work to extract the fields again.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                else:"},{"line_number":307,"context_line":"                    req_fields.append(val)"},{"line_number":308,"context_line":"            if set(req_fields).intersection(hide_fields):"},{"line_number":309,"context_line":"                raise exception.NotAcceptable()"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_568f7274","line":309,"updated":"2016-02-02 03:42:39.000000000","message":"I don\u0027t want to review this if I don\u0027t need to. I see already some grammatical issues and other things that I\u0027d feel like commenting on that I\u0027d rather not spend the time doing.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":7933,"name":"Philippe Godin","email":"godp1301@gmail.com","username":"godp1301"},"change_message_id":"511a18b4840497837fc8bd2e28622df3c31693d6","unresolved":false,"context_lines":[{"line_number":302,"context_line":"def allow_portgroups():"},{"line_number":303,"context_line":"    \"\"\"Check if we should return portgroup info."},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    Version 1.16 of the API added support for PortGroups."},{"line_number":306,"context_line":"    \"\"\""},{"line_number":307,"context_line":"    return (pecan.request.version.minor \u003e\u003d"},{"line_number":308,"context_line":"            versions.MINOR_17_PORTGROUP)"}],"source_content_type":"text/x-python","patch_set":86,"id":"fa0719c6_1d2fb33f","line":305,"range":{"start_line":305,"start_character":12,"end_line":305,"end_character":16},"updated":"2016-03-24 15:38:19.000000000","message":"1.16 or 1.17. I\u0027m lost :)","commit_id":"8412d27663b6b9a080176a73229180842d5e1d8e"}],"ironic/api/controllers/v1/versions.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":44,"context_line":"# v1.14: Make the following endpoints discoverable via API:"},{"line_number":45,"context_line":"#        1. \u0027/v1/nodes/\u003cuuid\u003e/states\u0027"},{"line_number":46,"context_line":"#        2. \u0027/v1/drivers/\u003cdriver-name\u003e/properties\u0027"},{"line_number":47,"context_line":"# v1.15: Add porgroup support"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"MINOR_0_JUNO \u003d 0"},{"line_number":50,"context_line":"MINOR_1_INITIAL_VERSION \u003d 1"}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_b55f8274","line":47,"updated":"2016-01-27 01:32:05.000000000","message":"s/porgroup/portgroup/","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"# v1.14: Make the following endpoints discoverable via API:"},{"line_number":45,"context_line":"#        1. \u0027/v1/nodes/\u003cuuid\u003e/states\u0027"},{"line_number":46,"context_line":"#        2. \u0027/v1/drivers/\u003cdriver-name\u003e/properties\u0027"},{"line_number":47,"context_line":"# v1.15: Add porgroup support"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"MINOR_0_JUNO \u003d 0"},{"line_number":50,"context_line":"MINOR_1_INITIAL_VERSION \u003d 1"}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_3a4f1b94","line":47,"in_reply_to":"9a68dd71_b55f8274","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"}],"ironic/common/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3f5f47084f976932779b142a1e4808f243c2bd30","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def is_valid_datapath_id(datapath_id):"},{"line_number":188,"context_line":"    \"\"\"Verify the format of a OpenFlow datapath_id"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."}],"source_content_type":"text/x-python","patch_set":50,"id":"9a68dd71_35f8727c","line":188,"updated":"2016-01-27 01:32:05.000000000","message":"nit, missing period at the end of this line.\n\ns/a OpenFlow/an OpenFlow/","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"d59b10c387767872e5f4386e6da2f51f846dd2f9","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def is_valid_datapath_id(datapath_id):"},{"line_number":188,"context_line":"    \"\"\"Verify the format of a OpenFlow datapath_id"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."}],"source_content_type":"text/x-python","patch_set":50,"id":"7a5de9d1_1a181f84","line":188,"in_reply_to":"9a68dd71_35f8727c","updated":"2016-01-28 00:40:37.000000000","message":"Done","commit_id":"5870d7c5b0895614e789173711e7776111e159ee"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def is_valid_datapath_id(datapath_id):"},{"line_number":188,"context_line":"    \"\"\"Verify the format of an OpenFlow datapath_id"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_59e890b4","line":188,"updated":"2016-01-28 23:04:14.000000000","message":"nit, missing period at end of this.","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":185,"context_line":""},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"def is_valid_datapath_id(datapath_id):"},{"line_number":188,"context_line":"    \"\"\"Verify the format of an OpenFlow datapath_id"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_3099efc4","line":188,"in_reply_to":"7a5de9d1_59e890b4","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":299,"context_line":""},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"def validate_and_normalize_datapath_id(datapath_id):"},{"line_number":302,"context_line":"    \"\"\"Validate a OpenFlow datapath_id and return normalized form."},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    Checks whether the supplied OpenFlow datapath_id is formally correct and"},{"line_number":305,"context_line":"    normalize it to all lower case."}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_59ff3067","line":302,"updated":"2016-01-28 23:04:14.000000000","message":"s/a OpenFlow/an OpenFlow/","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3c0e47d15dce2d421c901897755251b3c798d88b","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated and normalized."},{"line_number":308,"context_line":"    :returns: Normalized and validated OpenFlow datapath_id."},{"line_number":309,"context_line":"    :raises: InvalidDatapathId If the MAC address is not valid."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    \"\"\""},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_59365053","line":309,"updated":"2016-01-28 23:04:14.000000000","message":"not a MAC address?","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"865e8e86a055b426bd5f6ef7094285361d7df555","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated and normalized."},{"line_number":308,"context_line":"    :returns: Normalized and validated OpenFlow datapath_id."},{"line_number":309,"context_line":"    :raises: InvalidDatapathId If the MAC address is not valid."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    \"\"\""},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"7a5de9d1_30e00f29","line":309,"in_reply_to":"7a5de9d1_59365053","updated":"2016-01-29 22:13:23.000000000","message":"Done","commit_id":"7725a66dbc331e66193bf734ff008fb3f6bf7013"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated and normalized."},{"line_number":308,"context_line":"    :returns: Normalized and validated OpenFlow datapath_id."},{"line_number":309,"context_line":"    :raises: InvalidDatapathId If an OpenFlow address is not valid."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    \"\"\""},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_96c72a95","line":309,"updated":"2016-02-02 03:42:39.000000000","message":"s/address/datapath_id/","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":306,"context_line":""},{"line_number":307,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated and normalized."},{"line_number":308,"context_line":"    :returns: Normalized and validated OpenFlow datapath_id."},{"line_number":309,"context_line":"    :raises: InvalidDatapathId If an OpenFlow address is not valid."},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"    \"\"\""},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_5c5533c4","line":309,"in_reply_to":"7a5de9d1_96c72a95","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    :returns: True if valid. False if not."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    m \u003d \"[0-9a-f]{16}$\""},{"line_number":198,"context_line":"    return (isinstance(datapath_id, six.string_types) and"},{"line_number":199,"context_line":"            re.match(m, datapath_id.lower()))"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_af658b1e","line":197,"updated":"2016-02-12 00:09:01.000000000","message":"If this is a 16 digit hex number, should it instead be \"^[0-9a-f]{16}$\" (I added the \"^\")?","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":194,"context_line":"    :returns: True if valid. False if not."},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    \"\"\""},{"line_number":197,"context_line":"    m \u003d \"[0-9a-f]{16}$\""},{"line_number":198,"context_line":"    return (isinstance(datapath_id, six.string_types) and"},{"line_number":199,"context_line":"            re.match(m, datapath_id.lower()))"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":64,"id":"3a57f1b5_6153183a","line":197,"in_reply_to":"3a57f1b5_af658b1e","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":188,"context_line":"    \"\"\"Verify the format of an OpenFlow datapath_id."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated."},{"line_number":194,"context_line":"    :returns: True if valid. False if not."}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_687c1073","line":191,"updated":"2016-05-06 10:34:40.000000000","message":"Any reference you can add here for people not aware of datapath format?","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":188,"context_line":"    \"\"\"Verify the format of an OpenFlow datapath_id."},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"    Check if a datapath_id is valid and contains 16 hexadecimal"},{"line_number":191,"context_line":"    digits."},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    :param datapath_id: OpenFlow datapath_id to be validated."},{"line_number":194,"context_line":"    :returns: True if valid. False if not."}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_300f843a","line":191,"in_reply_to":"dab17558_687c1073","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"def validate_and_normalize_datapath_id(datapath_id):"},{"line_number":304,"context_line":"    \"\"\"Validate an OpenFlow datapath_id and return normalized form.a"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"    Checks whether the supplied OpenFlow datapath_id is formally correct and"},{"line_number":307,"context_line":"    normalize it to all lower case."}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_7708c2da","line":304,"updated":"2016-06-24 15:29:24.000000000","message":"Typo: s/.a//","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"}],"ironic/conductor/manager.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":1771,"context_line":"                # maintenance mode, otherwise InvalidState is raised."},{"line_number":1772,"context_line":"                allowed_update_states \u003d [states.ENROLL,"},{"line_number":1773,"context_line":"                                         states.INSPECTING,"},{"line_number":1774,"context_line":"                                         states.MANAGEABLE]"},{"line_number":1775,"context_line":"                if (node.provision_state not in allowed_update_states"},{"line_number":1776,"context_line":"                    and not node.maintenance):"},{"line_number":1777,"context_line":"                    action \u003d _(\"Portgroup %(portgroup)s can not be associated \""}],"source_content_type":"text/x-python","patch_set":96,"id":"dab17558_48cf8cb0","line":1774,"updated":"2016-05-06 10:34:40.000000000","message":"nit: maybe move it to a module-level constant\n\nnit2: a set would be more natural for me personally, as you\u0027re using \"in\" operation on it","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":1771,"context_line":"                # maintenance mode, otherwise InvalidState is raised."},{"line_number":1772,"context_line":"                allowed_update_states \u003d [states.ENROLL,"},{"line_number":1773,"context_line":"                                         states.INSPECTING,"},{"line_number":1774,"context_line":"                                         states.MANAGEABLE]"},{"line_number":1775,"context_line":"                if (node.provision_state not in allowed_update_states"},{"line_number":1776,"context_line":"                    and not node.maintenance):"},{"line_number":1777,"context_line":"                    action \u003d _(\"Portgroup %(portgroup)s can not be associated \""}],"source_content_type":"text/x-python","patch_set":96,"id":"bab6814e_4bad3de8","line":1774,"in_reply_to":"dab17558_48cf8cb0","updated":"2016-05-26 14:57:35.000000000","message":"We using it only in single place.","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":7080,"name":"Mathieu Mitchell","email":"mat128@gmail.com","username":"mat128"},"change_message_id":"8036af3f215660ffaeaf37bf671709ff1d38f846","unresolved":false,"context_lines":[{"line_number":1748,"context_line":"            node \u003d task.node"},{"line_number":1749,"context_line":""},{"line_number":1750,"context_line":"            if \u0027node_id\u0027 in portgroup_obj.obj_what_changed():"},{"line_number":1751,"context_line":"                # If portgroup update is modifying the portgroup-node"},{"line_number":1752,"context_line":"                # association then node should be in"},{"line_number":1753,"context_line":"                # MANAGEABLE/INSPECTING/ENROLL provisioning state or in"},{"line_number":1754,"context_line":"                # maintenance mode, otherwise InvalidState is raised."}],"source_content_type":"text/x-python","patch_set":104,"id":"dab17558_c6372de1","line":1751,"updated":"2016-05-17 12:15:45.000000000","message":"Unnecessary change","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"9a55af0064d76a13e84b4fccd73b7ac8f9b7c5be","unresolved":false,"context_lines":[{"line_number":1748,"context_line":"            node \u003d task.node"},{"line_number":1749,"context_line":""},{"line_number":1750,"context_line":"            if \u0027node_id\u0027 in portgroup_obj.obj_what_changed():"},{"line_number":1751,"context_line":"                # If portgroup update is modifying the portgroup-node"},{"line_number":1752,"context_line":"                # association then node should be in"},{"line_number":1753,"context_line":"                # MANAGEABLE/INSPECTING/ENROLL provisioning state or in"},{"line_number":1754,"context_line":"                # maintenance mode, otherwise InvalidState is raised."}],"source_content_type":"text/x-python","patch_set":104,"id":"bab6814e_3b43a46d","line":1751,"in_reply_to":"dab17558_c6372de1","updated":"2016-05-24 16:14:43.000000000","message":"Done","commit_id":"81acadf3cc03d10aceaa8d5079806fd2f85ea096"}],"ironic/conf/opts.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"a200492e7cb96a172bf4d52c9bed36bae04fc473","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import ironic.common.image_service"},{"line_number":23,"context_line":"import ironic.common.images"},{"line_number":24,"context_line":"import ironic.common.keystone"},{"line_number":25,"context_line":"import ironic.common.neutron"},{"line_number":26,"context_line":"import ironic.common.paths"},{"line_number":27,"context_line":"import ironic.common.service"},{"line_number":28,"context_line":"import ironic.common.swift"}],"source_content_type":"text/x-python","patch_set":110,"id":"3aaa91ec_957d26ea","line":25,"updated":"2016-06-21 17:07:30.000000000","message":"Should be moved to the previous commit.","commit_id":"5cc5d934e31ad1cf29c37e8855355e4463b94548"}],"ironic/tests/unit/api/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def portgroup_post_data(**kw):"},{"line_number":129,"context_line":"    portgroup \u003d utils.get_test_portgroup(**kw)"},{"line_number":130,"context_line":"    internal \u003d portgroup_controller.PortgroupPatchType.internal_attrs()"},{"line_number":131,"context_line":"    return remove_internal(portgroup, internal)"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_84613007","line":130,"updated":"2016-02-02 03:42:39.000000000","message":"shouldn\u0027t we portgroup.pop(\u0027node_id\u0027) before this, because it isn\u0027t part of the API object? (similar to port_post_data() above)","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def portgroup_post_data(**kw):"},{"line_number":129,"context_line":"    portgroup \u003d utils.get_test_portgroup(**kw)"},{"line_number":130,"context_line":"    internal \u003d portgroup_controller.PortgroupPatchType.internal_attrs()"},{"line_number":131,"context_line":"    return remove_internal(portgroup, internal)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_9ca3ab9e","line":130,"in_reply_to":"7a5de9d1_84613007","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":135,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":136,"context_line":"    portgroup \u003d portgroup_post_data(**kw)"},{"line_number":137,"context_line":"    node \u003d utils.get_test_node()"},{"line_number":138,"context_line":"    portgroup[\u0027node\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"},{"line_number":139,"context_line":"    return portgroup"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_34f707d5","line":138,"updated":"2016-02-03 23:18:05.000000000","message":"shouldn\u0027t this be portgroup[\u0027node_uuid\u0027]?","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":135,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":136,"context_line":"    portgroup \u003d portgroup_post_data(**kw)"},{"line_number":137,"context_line":"    node \u003d utils.get_test_node()"},{"line_number":138,"context_line":"    portgroup[\u0027node\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"},{"line_number":139,"context_line":"    return portgroup"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_294f8abe","line":138,"in_reply_to":"5a5ae5dd_34f707d5","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"}],"ironic/tests/unit/api/v1/test_portgroups.py":[{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                                     \u0027value\u0027: \u00271\u0027,"},{"line_number":461,"context_line":"                                     \u0027op\u0027: \u0027add\u0027}],"},{"line_number":462,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":463,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":464,"context_line":"        self.assertEqual(400, response.status_code)"},{"line_number":465,"context_line":"        self.assertFalse(mock_upd.called)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def test_replace_node_id(self, mock_upd):"},{"line_number":468,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_ce3f1a24","line":465,"range":{"start_line":463,"start_character":0,"end_line":465,"end_character":41},"updated":"2015-12-23 11:38:54.000000000","message":"Also I think need to create own assert \u003d)","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":460,"context_line":"                                     \u0027value\u0027: \u00271\u0027,"},{"line_number":461,"context_line":"                                     \u0027op\u0027: \u0027add\u0027}],"},{"line_number":462,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":463,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":464,"context_line":"        self.assertEqual(400, response.status_code)"},{"line_number":465,"context_line":"        self.assertFalse(mock_upd.called)"},{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    def test_replace_node_id(self, mock_upd):"},{"line_number":468,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_16c38b39","line":465,"range":{"start_line":463,"start_character":0,"end_line":465,"end_character":41},"in_reply_to":"1a7b0d38_ce3f1a24","updated":"2016-01-05 17:48:21.000000000","message":"I think that combining similar asserst will complicate the readability.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":470,"context_line":"                                     \u0027value\u0027: \u00271\u0027,"},{"line_number":471,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":472,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":473,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":474,"context_line":"        self.assertEqual(400, response.status_code)"},{"line_number":475,"context_line":"        self.assertFalse(mock_upd.called)"},{"line_number":476,"context_line":""},{"line_number":477,"context_line":"    def test_remove_node_id(self, mock_upd):"},{"line_number":478,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_8e4912d3","line":475,"range":{"start_line":473,"start_character":0,"end_line":475,"end_character":41},"updated":"2015-12-23 11:38:54.000000000","message":"Also I think need to create own assert \u003d)","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":490,"context_line":"                                     \u0027value\u0027: node_uuid,"},{"line_number":491,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":492,"context_line":"                                   expect_errors\u003dTrue)"},{"line_number":493,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":494,"context_line":"        self.assertEqual(400, response.status_code)"},{"line_number":495,"context_line":"        self.assertIn(node_uuid, response.json[\u0027error_message\u0027])"},{"line_number":496,"context_line":"        self.assertFalse(mock_upd.called)"},{"line_number":497,"context_line":""},{"line_number":498,"context_line":"    def test_replace_multi(self, mock_upd):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_8ef27299","line":495,"range":{"start_line":493,"start_character":0,"end_line":495,"end_character":64},"updated":"2015-12-23 11:38:54.000000000","message":"Also I think need to create own assert \u003d)","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":512,"context_line":"        mock_upd.return_value.extra \u003d extra"},{"line_number":513,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"},{"line_number":514,"context_line":"                                   patch)"},{"line_number":515,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":516,"context_line":"        self.assertEqual(200, response.status_code)"},{"line_number":517,"context_line":"        self.assertEqual(extra, response.json[\u0027extra\u0027])"},{"line_number":518,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":519,"context_line":"        self.assertEqual(extra, kargs.extra)"},{"line_number":520,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_cea39a9d","line":517,"range":{"start_line":515,"start_character":0,"end_line":517,"end_character":55},"updated":"2015-12-23 11:38:54.000000000","message":"Ditto. See my comment in ironic/tests/unit/api/v1/test_ports.py","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":530,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"},{"line_number":531,"context_line":"                                   [{\u0027path\u0027: \u0027/extra/foo1\u0027,"},{"line_number":532,"context_line":"                                     \u0027op\u0027: \u0027remove\u0027}])"},{"line_number":533,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":534,"context_line":"        self.assertEqual(200, response.status_code)"},{"line_number":535,"context_line":"        self.assertEqual(extra, response.json[\u0027extra\u0027])"},{"line_number":536,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":537,"context_line":"        self.assertEqual(extra, kargs.extra)"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_cecaba4f","line":535,"range":{"start_line":533,"start_character":0,"end_line":535,"end_character":55},"updated":"2015-12-23 11:38:54.000000000","message":"Ditto","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":541,"context_line":"        mock_upd.return_value.extra \u003d extra"},{"line_number":542,"context_line":"        response \u003d self.patch_json(\u0027/portgroups/%s\u0027 % self.portgroup.uuid,"},{"line_number":543,"context_line":"                                   [{\u0027path\u0027: \u0027/extra\u0027, \u0027op\u0027: \u0027remove\u0027}])"},{"line_number":544,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":545,"context_line":"        self.assertEqual(200, response.status_code)"},{"line_number":546,"context_line":"        self.assertEqual({}, response.json[\u0027extra\u0027])"},{"line_number":547,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":548,"context_line":"        self.assertEqual(extra, kargs.extra)"},{"line_number":549,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_4edd6a13","line":546,"range":{"start_line":544,"start_character":0,"end_line":546,"end_character":52},"updated":"2015-12-23 11:38:54.000000000","message":"Ditto","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_64ec34bb","line":1,"updated":"2016-02-02 03:42:39.000000000","message":"unless you need this, please delete it.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_1c125bb5","line":1,"in_reply_to":"7a5de9d1_64ec34bb","updated":"2016-02-03 21:29:13.000000000","message":"It has been copied from prots, but I doubt that it is needed.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":45,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":46,"context_line":"    portgroup \u003d apiutils.portgroup_post_data(**kw)"},{"line_number":47,"context_line":"    node \u003d dbutils.get_test_node()"},{"line_number":48,"context_line":"    del portgroup[\u0027node_id\u0027]"},{"line_number":49,"context_line":"    portgroup[\u0027node_uuid\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"},{"line_number":50,"context_line":"    return portgroup"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_c43968f3","line":48,"updated":"2016-02-02 03:42:39.000000000","message":"Shouldn\u0027t need this if you do it in apiutils.portgroup_post_data()","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":45,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":46,"context_line":"    portgroup \u003d apiutils.portgroup_post_data(**kw)"},{"line_number":47,"context_line":"    node \u003d dbutils.get_test_node()"},{"line_number":48,"context_line":"    del portgroup[\u0027node_id\u0027]"},{"line_number":49,"context_line":"    portgroup[\u0027node_uuid\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"},{"line_number":50,"context_line":"    return portgroup"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_7c4b4fb1","line":48,"in_reply_to":"7a5de9d1_c43968f3","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        self.assertNotIn(\u0027extra\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":79,"context_line":"        self.assertNotIn(\u0027node_uuid\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":80,"context_line":"        # never expose the node_id"},{"line_number":81,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def test_get_one(self):"},{"line_number":84,"context_line":"        portgroup \u003d obj_utils.create_test_portgroup(self.context,"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_df5935fe","line":81,"updated":"2016-02-02 03:42:39.000000000","message":"It\u0027d be good to check the values of \u0027address\u0027 and \u0027name\u0027 are equal in portgroup and data.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        self.assertIn(\u0027extra\u0027, data)"},{"line_number":90,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data)"},{"line_number":91,"context_line":"        # never expose the node_id"},{"line_number":92,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_get_one_custom_fields(self):"},{"line_number":95,"context_line":"        portgroup \u003d obj_utils.create_test_portgroup(self.context,"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_3f6ba986","line":92,"updated":"2016-02-02 03:42:39.000000000","message":"ditto","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.assertIn(\u0027extra\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":149,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":150,"context_line":"        # never expose the node_id"},{"line_number":151,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_detail_against_single(self):"},{"line_number":154,"context_line":"        portgroup \u003d obj_utils.create_test_portgroup(self.context,"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_9fcc1d8a","line":151,"updated":"2016-02-02 03:42:39.000000000","message":"It\u0027d be good to check the values of \u0027address\u0027 and \u0027name\u0027 are equal in portgroup and data.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        self.assertIn(\u0027extra\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":149,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":150,"context_line":"        # never expose the node_id"},{"line_number":151,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027portgroups\u0027][0])"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"    def test_detail_against_single(self):"},{"line_number":154,"context_line":"        portgroup \u003d obj_utils.create_test_portgroup(self.context,"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_47b9dc2d","line":151,"in_reply_to":"7a5de9d1_9fcc1d8a","updated":"2016-02-03 21:29:13.000000000","message":"done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            portgroup \u003d obj_utils.create_test_portgroup("},{"line_number":164,"context_line":"                self.context, node_id\u003dself.node.id,"},{"line_number":165,"context_line":"                uuid\u003duuidutils.generate_uuid(),"},{"line_number":166,"context_line":"                name\u003dstr(uuidutils.generate_uuid()),"},{"line_number":167,"context_line":"                address\u003d\u002752:54:00:cf:2d:3%s\u0027 % id_)"},{"line_number":168,"context_line":"            portgroups.append(portgroup.uuid)"},{"line_number":169,"context_line":"        data \u003d self.get_json(\u0027/portgroups\u0027, headers\u003dself.headers)"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_9f7add22","line":166,"updated":"2016-02-02 03:42:39.000000000","message":"why not do something simple like name \u003d \u0027portgroup%s\u0027 % id_","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":163,"context_line":"            portgroup \u003d obj_utils.create_test_portgroup("},{"line_number":164,"context_line":"                self.context, node_id\u003dself.node.id,"},{"line_number":165,"context_line":"                uuid\u003duuidutils.generate_uuid(),"},{"line_number":166,"context_line":"                name\u003dstr(uuidutils.generate_uuid()),"},{"line_number":167,"context_line":"                address\u003d\u002752:54:00:cf:2d:3%s\u0027 % id_)"},{"line_number":168,"context_line":"            portgroups.append(portgroup.uuid)"},{"line_number":169,"context_line":"        data \u003d self.get_json(\u0027/portgroups\u0027, headers\u003dself.headers)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_e72a482c","line":166,"in_reply_to":"7a5de9d1_9f7add22","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def test_get_all_by_node_uuid_ok(self, mock_get_rpc_node):"},{"line_number":297,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":298,"context_line":"        obj_utils.create_test_portgroup(self.context, node_id\u003dself.node.id)"},{"line_number":299,"context_line":"        self.get_json(\u0027/portgroups/detail?node\u003d%s\u0027 % (self.node.uuid),"},{"line_number":300,"context_line":"                      headers\u003dself.headers)"},{"line_number":301,"context_line":"        mock_get_rpc_node.assert_called_once_with(self.node.uuid)"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_3f4de9c3","line":299,"updated":"2016-02-02 03:42:39.000000000","message":"why wouldn\u0027t you do \n    data \u003d ...\n    self.assertEqual(1, len(data[\u0027portgroups\u0027])\n\nin case 0 portgroups were returned.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":296,"context_line":"    def test_get_all_by_node_uuid_ok(self, mock_get_rpc_node):"},{"line_number":297,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":298,"context_line":"        obj_utils.create_test_portgroup(self.context, node_id\u003dself.node.id)"},{"line_number":299,"context_line":"        self.get_json(\u0027/portgroups/detail?node\u003d%s\u0027 % (self.node.uuid),"},{"line_number":300,"context_line":"                      headers\u003dself.headers)"},{"line_number":301,"context_line":"        mock_get_rpc_node.assert_called_once_with(self.node.uuid)"},{"line_number":302,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_cd572bc9","line":299,"in_reply_to":"7a5de9d1_3f4de9c3","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                             headers\u003dself.headers)"},{"line_number":311,"context_line":"        self.assertEqual(portgroup.uuid, data[\u0027portgroups\u0027][0][\u0027uuid\u0027])"},{"line_number":312,"context_line":"        self.assertEqual(self.node.uuid, data[\u0027portgroups\u0027][0][\u0027node_uuid\u0027])"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027update_portgroup\u0027)"},{"line_number":316,"context_line":"class TestPatch(test_api_base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_4ac7c163","line":313,"updated":"2016-02-02 03:42:39.000000000","message":"I think I saw one test that tested that the portgroup API didn\u0027t work if API version is invalid.\n\nI wonder if it is worth adding one unit test, maybe in each of these classes, to test that for each API call. eg \ntest_old_api_version():\n    response \u003d self.get_json(\u0027/portgroups/detail? node \u003d ..\n    header\u003dbad-header, expect_errors\u003dTrue)\n    self.assertEqual(http.NotAcceptable, ..)\n    response \u003d self.get_json(\u0027/portgroups, ...\n    etc.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                             headers\u003dself.headers)"},{"line_number":311,"context_line":"        self.assertEqual(portgroup.uuid, data[\u0027portgroups\u0027][0][\u0027uuid\u0027])"},{"line_number":312,"context_line":"        self.assertEqual(self.node.uuid, data[\u0027portgroups\u0027][0][\u0027node_uuid\u0027])"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027update_portgroup\u0027)"},{"line_number":316,"context_line":"class TestPatch(test_api_base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_9f7e38ad","line":313,"in_reply_to":"7a5de9d1_4ac7c163","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        self.assertEqual(extra, response.json[\u0027extra\u0027])"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":344,"context_line":"        self.assertEqual(extra, kargs.extra)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def test_update_byaddress_not_allowed(self, mock_upd):"},{"line_number":347,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_0aec6928","line":344,"updated":"2016-02-02 03:42:39.000000000","message":"also, test update by port name","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":341,"context_line":"        self.assertEqual(extra, response.json[\u0027extra\u0027])"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":344,"context_line":"        self.assertEqual(extra, kargs.extra)"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def test_update_byaddress_not_allowed(self, mock_upd):"},{"line_number":347,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_52099794","line":344,"in_reply_to":"7a5de9d1_0aec6928","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        self.assertEqual(address.lower(), response.json[\u0027address\u0027])"},{"line_number":633,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":634,"context_line":"        self.assertEqual(address.lower(), kargs.address)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":638,"context_line":"    headers \u003d {api_base.Version.string: str(api_v1.MAX_VER)}"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_9f873db4","line":635,"updated":"2016-02-02 03:42:39.000000000","message":"I don\u0027t think I saw a test for updating a portgroup with invalid name.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":632,"context_line":"        self.assertEqual(address.lower(), response.json[\u0027address\u0027])"},{"line_number":633,"context_line":"        kargs \u003d mock_upd.call_args[0][1]"},{"line_number":634,"context_line":"        self.assertEqual(address.lower(), kargs.address)"},{"line_number":635,"context_line":""},{"line_number":636,"context_line":""},{"line_number":637,"context_line":"class TestPost(test_api_base.BaseApiTest):"},{"line_number":638,"context_line":"    headers \u003d {api_base.Version.string: str(api_v1.MAX_VER)}"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_d2510764","line":635,"in_reply_to":"7a5de9d1_9f873db4","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":775,"context_line":"        error_msg \u003d response.json[\u0027error_message\u0027]"},{"line_number":776,"context_line":"        self.assertTrue(error_msg)"},{"line_number":777,"context_line":"        self.assertIn(address, error_msg.upper())"},{"line_number":778,"context_line":""},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027destroy_portgroup\u0027)"},{"line_number":781,"context_line":"class TestDelete(test_api_base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_ca3f3185","line":778,"updated":"2016-02-02 03:42:39.000000000","message":"any tests with portgroup name - valid \u0026 invalid?","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":775,"context_line":"        error_msg \u003d response.json[\u0027error_message\u0027]"},{"line_number":776,"context_line":"        self.assertTrue(error_msg)"},{"line_number":777,"context_line":"        self.assertIn(address, error_msg.upper())"},{"line_number":778,"context_line":""},{"line_number":779,"context_line":""},{"line_number":780,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027destroy_portgroup\u0027)"},{"line_number":781,"context_line":"class TestDelete(test_api_base.BaseApiTest):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_55d8a153","line":778,"in_reply_to":"7a5de9d1_ca3f3185","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        self.delete(\u0027/portgroups/%s\u0027 % self.portgroup.uuid, expect_errors\u003dTrue,"},{"line_number":804,"context_line":"                    headers\u003dself.headers)"},{"line_number":805,"context_line":"        self.assertTrue(mock_dpt.called)"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"    def test_delete_portgroup_node_locked(self, mock_dpt):"},{"line_number":808,"context_line":"        self.node.reserve(self.context, \u0027fake\u0027, self.node.uuid)"},{"line_number":809,"context_line":"        mock_dpt.side_effect \u003d exception.NodeLocked(node\u003d\u0027fake-node\u0027,"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_2a64c5b6","line":806,"updated":"2016-02-02 03:42:39.000000000","message":"and a test to delete by portgroup name?","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":803,"context_line":"        self.delete(\u0027/portgroups/%s\u0027 % self.portgroup.uuid, expect_errors\u003dTrue,"},{"line_number":804,"context_line":"                    headers\u003dself.headers)"},{"line_number":805,"context_line":"        self.assertTrue(mock_dpt.called)"},{"line_number":806,"context_line":""},{"line_number":807,"context_line":"    def test_delete_portgroup_node_locked(self, mock_dpt):"},{"line_number":808,"context_line":"        self.node.reserve(self.context, \u0027fake\u0027, self.node.uuid)"},{"line_number":809,"context_line":"        mock_dpt.side_effect \u003d exception.NodeLocked(node\u003d\u0027fake-node\u0027,"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_957e19ad","line":806,"in_reply_to":"7a5de9d1_2a64c5b6","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# NOTE: When creating a portgroup via API (POST)"},{"line_number":42,"context_line":"#       we have to use node_uuid"},{"line_number":43,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":44,"context_line":"    portgroup \u003d apiutils.portgroup_post_data(**kw)"},{"line_number":45,"context_line":"    node \u003d dbutils.get_test_node()"},{"line_number":46,"context_line":"    portgroup[\u0027node_uuid\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_f4ee4feb","line":43,"updated":"2016-02-03 23:18:05.000000000","message":"Isn\u0027t this the same as tests.unit.api.utils.post_get_test_portgroup()?","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# NOTE: When creating a portgroup via API (POST)"},{"line_number":42,"context_line":"#       we have to use node_uuid"},{"line_number":43,"context_line":"def post_get_test_portgroup(**kw):"},{"line_number":44,"context_line":"    portgroup \u003d apiutils.portgroup_post_data(**kw)"},{"line_number":45,"context_line":"    node \u003d dbutils.get_test_node()"},{"line_number":46,"context_line":"    portgroup[\u0027node_uuid\u0027] \u003d kw.get(\u0027node_uuid\u0027, node[\u0027uuid\u0027])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_c9b9167b","line":43,"in_reply_to":"5a5ae5dd_f4ee4feb","updated":"2016-02-04 18:12:24.000000000","message":"exactly, removing it from here.","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self.context, node_id\u003dself.node.id, uuid\u003duuidutils.generate_uuid(),"},{"line_number":231,"context_line":"            name\u003d\u0027portgroup_1\u0027, address\u003daddress)"},{"line_number":232,"context_line":"        response \u003d self.get_json(\u0027/portgroups?address\u003d%s\u0027 % address,"},{"line_number":233,"context_line":"                                 headers\u003d{api_base.Version.string: \u00271.14\u0027},"},{"line_number":234,"context_line":"                                 expect_errors\u003dTrue)"},{"line_number":235,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":236,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_b488da23","line":233,"updated":"2016-02-10 15:54:41.000000000","message":"I guess we should change all occurrences of 1.14 to 1.15.","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e1daabbdb89299e1db473ae1441cbf3396e7bcf3","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            self.context, node_id\u003dself.node.id, uuid\u003duuidutils.generate_uuid(),"},{"line_number":231,"context_line":"            name\u003d\u0027portgroup_1\u0027, address\u003daddress)"},{"line_number":232,"context_line":"        response \u003d self.get_json(\u0027/portgroups?address\u003d%s\u0027 % address,"},{"line_number":233,"context_line":"                                 headers\u003d{api_base.Version.string: \u00271.14\u0027},"},{"line_number":234,"context_line":"                                 expect_errors\u003dTrue)"},{"line_number":235,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":236,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_f0ee57eb","line":233,"in_reply_to":"3a57f1b5_b488da23","updated":"2016-02-10 16:50:05.000000000","message":"1.14 is also invalid version for this requests.","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"}],"ironic/tests/unit/api/v1/test_ports.py":[{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"084861efec4c337e124845412e02dc7f2d1afd81","unresolved":false,"context_lines":[{"line_number":781,"context_line":""},{"line_number":782,"context_line":"    def test_create_port_portgroup_uuid_not_found(self):"},{"line_number":783,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":784,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":785,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":786,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":787,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"}],"source_content_type":"text/x-python","patch_set":38,"id":"fa80f949_9dc01de2","line":784,"updated":"2015-11-05 16:50:56.000000000","message":"Would be better to use method to generate random `uuid`.\nYou can use uuid.uuid4() for it.","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"a1c81c4037eeaaeabb7cf39520636467b6882837","unresolved":false,"context_lines":[{"line_number":784,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":785,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":786,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":787,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":788,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":789,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    def test_create_port_address_already_exist(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_5bdd2a13","line":788,"range":{"start_line":787,"start_character":0,"end_line":788,"end_character":70},"updated":"2015-12-23 11:38:54.000000000","message":"You use that two asserts several times. My point is create own assert that contain this two asserts.\nOr maybe also we have to add \nself.assertTrue(response.json[\u0027error_message\u0027]) string to this assert.","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6ac45e92c29d9f08d5764c28a2a1eb0b05c99e11","unresolved":false,"context_lines":[{"line_number":784,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":785,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":786,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":787,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":788,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":789,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    def test_create_port_address_already_exist(self):"}],"source_content_type":"text/x-python","patch_set":41,"id":"1a7b0d38_59fce4b7","line":788,"range":{"start_line":787,"start_character":0,"end_line":788,"end_character":70},"in_reply_to":"1a7b0d38_5bdd2a13","updated":"2016-01-05 17:48:21.000000000","message":"please have look my previous reply","commit_id":"4731c6825e1ac180996017cfc50ddff9ff613f32"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertIn(\u0027extra\u0027, data[\u0027ports\u0027][0])"},{"line_number":142,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":143,"context_line":"        # never expose the node_id"},{"line_number":144,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_detail_against_single(self):"},{"line_number":147,"context_line":"        port \u003d obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_59e485aa","line":144,"updated":"2016-02-02 03:42:39.000000000","message":"does the port have a portgroup_uuid? Should you check for port_id here too?\n\nI would think it useful to get that in detail, portgroup_uuid, pxe_enabled, and local_link_connection are returned, whereas in non-detail (like the test_get_one() above), those are not returned.\n\nAlso, a test that shows that if api version \u003c 15, those fields won\u0027t show up.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":141,"context_line":"        self.assertIn(\u0027extra\u0027, data[\u0027ports\u0027][0])"},{"line_number":142,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":143,"context_line":"        # never expose the node_id"},{"line_number":144,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def test_detail_against_single(self):"},{"line_number":147,"context_line":"        port \u003d obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_0b2be631","line":144,"in_reply_to":"7a5de9d1_59e485aa","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(3, len(data[\u0027ports\u0027]))"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @mock.patch.object(api_utils, \u0027get_rpc_node\u0027)"},{"line_number":292,"context_line":"    def test_get_all_by_node_uuid_and_name(self, mock_get_rpc_node):"},{"line_number":293,"context_line":"        # GET /v1/ports specifying node and uuid - should only use node_uuid"},{"line_number":294,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":295,"context_line":"        obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_648af465","line":292,"updated":"2016-02-02 03:42:39.000000000","message":"we should have a similar test to get ports via portgroup uuid and/or port name.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":289,"context_line":"        self.assertEqual(3, len(data[\u0027ports\u0027]))"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    @mock.patch.object(api_utils, \u0027get_rpc_node\u0027)"},{"line_number":292,"context_line":"    def test_get_all_by_node_uuid_and_name(self, mock_get_rpc_node):"},{"line_number":293,"context_line":"        # GET /v1/ports specifying node and uuid - should only use node_uuid"},{"line_number":294,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":295,"context_line":"        obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_8148175d","line":292,"in_reply_to":"7a5de9d1_648af465","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, data.status_int)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch.object(api_utils, \u0027get_rpc_node\u0027)"},{"line_number":316,"context_line":"    def test_detail_by_node_name_ok(self, mock_get_rpc_node):"},{"line_number":317,"context_line":"        # GET /v1/ports/detail specifying node_name - success"},{"line_number":318,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":319,"context_line":"        port \u003d obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_24ef1c1f","line":316,"updated":"2016-02-02 03:42:39.000000000","message":"we should have similar tests to get ports via portgroup uuid and/or port name.","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, data.status_int)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch.object(api_utils, \u0027get_rpc_node\u0027)"},{"line_number":316,"context_line":"    def test_detail_by_node_name_ok(self, mock_get_rpc_node):"},{"line_number":317,"context_line":"        # GET /v1/ports/detail specifying node_name - success"},{"line_number":318,"context_line":"        mock_get_rpc_node.return_value \u003d self.node"},{"line_number":319,"context_line":"        port \u003d obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_069e7d56","line":316,"in_reply_to":"7a5de9d1_24ef1c1f","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # never expose the node_id"},{"line_number":144,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":145,"context_line":"        self.assertNotIn(\u0027portgroup_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":146,"context_line":"        # check that fields are hiden for older API versions"},{"line_number":147,"context_line":"        self.assertNotIn(\u0027portgroup_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":148,"context_line":"        self.assertNotIn(\u0027pxe_enabled\u0027, data[\u0027ports\u0027][0])"},{"line_number":149,"context_line":"        self.assertNotIn(\u0027local_link_connection\u0027, data[\u0027ports\u0027][0])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_b44f7791","line":146,"updated":"2016-02-03 23:18:05.000000000","message":"nit s/hiden/hidden/","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        # never expose the node_id"},{"line_number":144,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":145,"context_line":"        self.assertNotIn(\u0027portgroup_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":146,"context_line":"        # check that fields are hiden for older API versions"},{"line_number":147,"context_line":"        self.assertNotIn(\u0027portgroup_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":148,"context_line":"        self.assertNotIn(\u0027pxe_enabled\u0027, data[\u0027ports\u0027][0])"},{"line_number":149,"context_line":"        self.assertNotIn(\u0027local_link_connection\u0027, data[\u0027ports\u0027][0])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_3115b43f","line":146,"in_reply_to":"5a5ae5dd_b44f7791","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":165,"context_line":"        self.assertIn(\u0027portgroup_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":166,"context_line":"        self.assertIn(\u0027pxe_enabled\u0027, data[\u0027ports\u0027][0])"},{"line_number":167,"context_line":"        self.assertIn(\u0027local_link_connection\u0027, data[\u0027ports\u0027][0])"},{"line_number":168,"context_line":"        # never expose the node_id portgroup_id"},{"line_number":169,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":170,"context_line":"        self.assertNotIn(\u0027portgroup_id\u0027, data[\u0027ports\u0027][0])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_8f26e2b8","line":167,"updated":"2016-02-03 23:18:05.000000000","message":"For the ones that are In (well, maybe not \u0027extra\u0027), you could test for equality. eg. self.assertEqual(llc, data[\u0027ports\u0027][0][\u0027local_link_connection\u0027]","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        self.assertIn(\u0027node_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":165,"context_line":"        self.assertIn(\u0027portgroup_uuid\u0027, data[\u0027ports\u0027][0])"},{"line_number":166,"context_line":"        self.assertIn(\u0027pxe_enabled\u0027, data[\u0027ports\u0027][0])"},{"line_number":167,"context_line":"        self.assertIn(\u0027local_link_connection\u0027, data[\u0027ports\u0027][0])"},{"line_number":168,"context_line":"        # never expose the node_id portgroup_id"},{"line_number":169,"context_line":"        self.assertNotIn(\u0027node_id\u0027, data[\u0027ports\u0027][0])"},{"line_number":170,"context_line":"        self.assertNotIn(\u0027portgroup_id\u0027, data[\u0027ports\u0027][0])"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_b15f64e4","line":167,"in_reply_to":"5a5ae5dd_8f26e2b8","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                                   portgroup_id\u003dpg.id)"},{"line_number":389,"context_line":"        data \u003d self.get_json(\u0027/ports/detail?portgroup\u003d%s\u0027 % pg.name,"},{"line_number":390,"context_line":"                             headers\u003d{api_base.Version.string: \u00271.15\u0027})"},{"line_number":391,"context_line":"        self.assertEqual(1, len(data[\u0027ports\u0027]))"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    @mock.patch.object(api_port.PortsController, \u0027_get_ports_collection\u0027)"},{"line_number":394,"context_line":"    def test_detail_with_incorrect_api_usage(self, mock_gpc):"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_0f975291","line":391,"updated":"2016-02-03 23:18:05.000000000","message":"I\u0027m not sure there\u0027s much value to this test. You could add this assert to the test above.","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":388,"context_line":"                                   portgroup_id\u003dpg.id)"},{"line_number":389,"context_line":"        data \u003d self.get_json(\u0027/ports/detail?portgroup\u003d%s\u0027 % pg.name,"},{"line_number":390,"context_line":"                             headers\u003d{api_base.Version.string: \u00271.15\u0027})"},{"line_number":391,"context_line":"        self.assertEqual(1, len(data[\u0027ports\u0027]))"},{"line_number":392,"context_line":""},{"line_number":393,"context_line":"    @mock.patch.object(api_port.PortsController, \u0027_get_ports_collection\u0027)"},{"line_number":394,"context_line":"    def test_detail_with_incorrect_api_usage(self, mock_gpc):"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_f1fddc3a","line":391,"in_reply_to":"5a5ae5dd_0f975291","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":545,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}])"},{"line_number":546,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":547,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"    def test_add_node_uuid(self, mock_upd):"},{"line_number":550,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_6fa4c656","line":547,"updated":"2016-02-03 23:18:05.000000000","message":"I\u0027m not convinced the code handles the case where one of the new fields are being changed with an api version \u003c 1.15. It would be good to have at least one test for that.","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":544,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":545,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}])"},{"line_number":546,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":547,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"    def test_add_node_uuid(self, mock_upd):"},{"line_number":550,"context_line":"        mock_upd.return_value \u003d self.port"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_208d587b","line":547,"in_reply_to":"5a5ae5dd_6fa4c656","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                                   \u0027port_id\u0027: \u0027Ethernet1/15\u0027})"},{"line_number":932,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict)"},{"line_number":933,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":934,"context_line":"        self.assertEqual(http_client.CREATED, response.status_int)"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027destroy_port\u0027)"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_cf585a59","line":934,"updated":"2016-02-03 23:18:05.000000000","message":"Should we be able to create a port with the new fields, if the api version is \u003c 1.15? I think the above tests are using 1.1 or something like that?","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":931,"context_line":"                                   \u0027port_id\u0027: \u0027Ethernet1/15\u0027})"},{"line_number":932,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict)"},{"line_number":933,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":934,"context_line":"        self.assertEqual(http_client.CREATED, response.status_int)"},{"line_number":935,"context_line":""},{"line_number":936,"context_line":""},{"line_number":937,"context_line":"@mock.patch.object(rpcapi.ConductorAPI, \u0027destroy_port\u0027)"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_60da707a","line":934,"in_reply_to":"5a5ae5dd_cf585a59","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fd06adcd3161d20b0516e4fa920cdf119246309b","unresolved":false,"context_lines":[{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_node_uuid_to_node_id_mapping(self):"},{"line_number":880,"context_line":"        pdict \u003d post_get_test_port(node_uuid\u003dself.node[\u0027uuid\u0027])"},{"line_number":881,"context_line":"        self.post_json(\u0027/ports\u0027, pdict, headers\u003dself.headers)"},{"line_number":882,"context_line":"        # GET doesn\u0027t return the node_id it\u0027s an internal value"},{"line_number":883,"context_line":"        port \u003d self.dbapi.get_port_by_uuid(pdict[\u0027uuid\u0027])"},{"line_number":884,"context_line":"        self.assertEqual(self.node[\u0027id\u0027], port.node_id)"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_b3f3d69d","line":881,"updated":"2016-02-04 19:47:47.000000000","message":"I\u0027m not quite sure why you added headers\u003dself.headers to some of the tests but not to other tests. This doesn\u0027t have anything to do with your portgroup changes; is it needed?","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"7811acb3a0cdf24cf79122ccb47c25f7fa282d05","unresolved":false,"context_lines":[{"line_number":878,"context_line":""},{"line_number":879,"context_line":"    def test_node_uuid_to_node_id_mapping(self):"},{"line_number":880,"context_line":"        pdict \u003d post_get_test_port(node_uuid\u003dself.node[\u0027uuid\u0027])"},{"line_number":881,"context_line":"        self.post_json(\u0027/ports\u0027, pdict, headers\u003dself.headers)"},{"line_number":882,"context_line":"        # GET doesn\u0027t return the node_id it\u0027s an internal value"},{"line_number":883,"context_line":"        port \u003d self.dbapi.get_port_by_uuid(pdict[\u0027uuid\u0027])"},{"line_number":884,"context_line":"        self.assertEqual(self.node[\u0027id\u0027], port.node_id)"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_778c6135","line":881,"in_reply_to":"5a5ae5dd_b3f3d69d","updated":"2016-02-05 00:05:26.000000000","message":"Yes it is needed. Portgroup has been added to post_get_test_port method https://review.openstack.org/#/c/206232/58/ironic/tests/unit/db/test_ports.py Line 33. Once we added restriction by api version, some tests have to be updated with new headers.","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"fd06adcd3161d20b0516e4fa920cdf119246309b","unresolved":false,"context_lines":[{"line_number":896,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":897,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":898,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":899,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":900,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    def test_create_port_address_already_exist(self):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_335b6689","line":899,"updated":"2016-02-04 19:47:47.000000000","message":"It should be NOT_ACCEPTABLE","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"7811acb3a0cdf24cf79122ccb47c25f7fa282d05","unresolved":false,"context_lines":[{"line_number":896,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":897,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue)"},{"line_number":898,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":899,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":900,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    def test_create_port_address_already_exist(self):"}],"source_content_type":"text/x-python","patch_set":56,"id":"5a5ae5dd_f7cdb15d","line":899,"in_reply_to":"5a5ae5dd_335b6689","updated":"2016-02-05 00:05:26.000000000","message":"Right! I have missed this part. _set_portgroup_uuid L84 https://review.openstack.org/#/c/206244/57/ironic/api/controllers/v1/port.py  is called before \u0027post/patch\u0027 method. So if request contains portgroup that can\u0027t be found in database it rises BAD_REQUEST. I have added portgroup portgroup restriction there.","commit_id":"f86c405a64918ae38a613a540506957e02099107"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"27ca8f77868cf3e478d0e49df11eaff9a7505bc3","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                                     \u0027/portgroup_uuid\u0027,"},{"line_number":524,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":525,"context_line":"                                     \u0027op\u0027: \u0027add\u0027}],"},{"line_number":526,"context_line":"                                   headers\u003d{api_base.Version.string: \u00271.15\u0027})"},{"line_number":527,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":528,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":529,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"5a5ae5dd_7b16104d","line":526,"updated":"2016-02-08 20:18:39.000000000","message":"I am not sure I like the inconsistent use of the headers: this is using 1.15 but line 541 is using MAX_VERSION_STRING. Right now they are the same value, but they won\u0027t in the future.","commit_id":"03a46d7ff8660b4d1553c23843045bceaf9acc41"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"6c8e7b6c85ea34391f2c4ef6a1b31cd3684974f8","unresolved":false,"context_lines":[{"line_number":523,"context_line":"                                     \u0027/portgroup_uuid\u0027,"},{"line_number":524,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":525,"context_line":"                                     \u0027op\u0027: \u0027add\u0027}],"},{"line_number":526,"context_line":"                                   headers\u003d{api_base.Version.string: \u00271.15\u0027})"},{"line_number":527,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":528,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":529,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"5a5ae5dd_d0d7bfbd","line":526,"in_reply_to":"5a5ae5dd_7b16104d","updated":"2016-02-09 12:03:12.000000000","message":"replaced wth MAX_VERSION_STRING","commit_id":"03a46d7ff8660b4d1553c23843045bceaf9acc41"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                                   [{\u0027path\u0027: \u0027/portgroup_uuid\u0027,"},{"line_number":540,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":541,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":542,"context_line":"                                   headers\u003dself.headers)"},{"line_number":543,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":544,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_e4c46141","line":542,"updated":"2016-02-10 15:54:41.000000000","message":"Since the portgroup uuid is handled a bit oddly, maybe we should add a test to show what happens if you try to replace this using an older API version (1.15).","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"4eb685b36d4ac6e2871d1588a28a614708f6aa28","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                                   [{\u0027path\u0027: \u0027/portgroup_uuid\u0027,"},{"line_number":540,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":541,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":542,"context_line":"                                   headers\u003dself.headers)"},{"line_number":543,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":544,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_6cf8534a","line":542,"in_reply_to":"3a57f1b5_e4c46141","updated":"2016-02-10 18:28:22.000000000","message":"Done","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e1daabbdb89299e1db473ae1441cbf3396e7bcf3","unresolved":false,"context_lines":[{"line_number":539,"context_line":"                                   [{\u0027path\u0027: \u0027/portgroup_uuid\u0027,"},{"line_number":540,"context_line":"                                     \u0027value\u0027: pg.uuid,"},{"line_number":541,"context_line":"                                     \u0027op\u0027: \u0027replace\u0027}],"},{"line_number":542,"context_line":"                                   headers\u003dself.headers)"},{"line_number":543,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":544,"context_line":"        self.assertEqual(http_client.OK, response.status_code)"},{"line_number":545,"context_line":""}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_10cf7380","line":542,"in_reply_to":"3a57f1b5_e4c46141","updated":"2016-02-10 16:50:05.000000000","message":"will add this test","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":899,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":900,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    def test_create_port_portgroup_uuid_not_found(self):"},{"line_number":903,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":904,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":905,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_04565d29","line":902,"updated":"2016-02-10 15:54:41.000000000","message":"Maybe add 2 more tests to create a port with an existing portgroup UUID -- one with API version 1.16+ and one with an older version.","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"4eb685b36d4ac6e2871d1588a28a614708f6aa28","unresolved":false,"context_lines":[{"line_number":899,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":900,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":"    def test_create_port_portgroup_uuid_not_found(self):"},{"line_number":903,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":904,"context_line":"            portgroup_uuid\u003d\u00271a1a1a1a-2b2b-3c3c-4d4d-5e5e5e5e5e5e\u0027)"},{"line_number":905,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":63,"id":"3a57f1b5_32a5d0b4","line":902,"in_reply_to":"3a57f1b5_04565d29","updated":"2016-02-10 18:28:22.000000000","message":"Done","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":381,"context_line":"        self.mock_gtf.return_value \u003d \u0027test-topic\u0027"},{"line_number":382,"context_line":"        self.addCleanup(p.stop)"},{"line_number":383,"context_line":"        self.headers \u003d {api_base.Version.string: str("},{"line_number":384,"context_line":"                        versions.MAX_VERSION_STRING)}"},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"    def test_update_byid(self, mock_upd):"},{"line_number":387,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_d7e53609","line":384,"updated":"2016-06-24 15:29:24.000000000","message":"I really don\u0027t like this line-break. You\u0027re already in a continuation because of the braces: maybe break after \":\"?","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":740,"context_line":"    def setUp(self):"},{"line_number":741,"context_line":"        super(TestPost, self).setUp()"},{"line_number":742,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context)"},{"line_number":743,"context_line":"        self.headers \u003d {api_base.Version.string: str("},{"line_number":744,"context_line":"            versions.MAX_VERSION_STRING)}"},{"line_number":745,"context_line":""},{"line_number":746,"context_line":"    @mock.patch.object(timeutils, \u0027utcnow\u0027)"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_578e662e","line":743,"updated":"2016-06-24 15:29:24.000000000","message":"Again, I hate this line-break.","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def setUp(self):"},{"line_number":65,"context_line":"        super(TestListPorts, self).setUp()"},{"line_number":66,"context_line":"        self.node \u003d obj_utils.create_test_node(self.context)"},{"line_number":67,"context_line":"        self.headers \u003d {api_base.Version.string: str(api_v1.MAX_VER)}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def test_empty(self):"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_4a75d6ca","line":66,"updated":"2016-07-13 20:46:21.000000000","message":"We should only change the headers in the tests that require new / specific headers, not in all the tests. See examples such as test_get_collection_custom_fields that already do this.","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        data \u003d self.get_json(\u0027/ports/%s\u0027 % port.uuid,"},{"line_number":109,"context_line":"                             headers\u003d{api_base.Version.string: \"1.18\"})"},{"line_number":110,"context_line":"        self.assertEqual({\"foo\": \"bar\"}, data[\u0027internal_info\u0027])"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def test_get_collection_custom_fields(self):"},{"line_number":113,"context_line":"        fields \u003d \u0027uuid,extra\u0027"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_2ea18796","line":110,"updated":"2016-07-13 18:33:19.000000000","message":"do we want something similar to this, for the new fields?","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            headers\u003d{api_base.Version.string: str(api_v1.MIN_VER)},"},{"line_number":146,"context_line":"            expect_errors\u003dTrue)"},{"line_number":147,"context_line":"        self.assertEqual(http_client.NOT_ACCEPTABLE, response.status_int)"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def test_detail(self):"},{"line_number":150,"context_line":"        port \u003d obj_utils.create_test_port(self.context, node_id\u003dself.node.id)"},{"line_number":151,"context_line":"        data \u003d self.get_json("}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_ee0f7f37","line":148,"updated":"2016-07-13 18:33:19.000000000","message":"We might want to add some tests here, for custom field being one of these new fields; with old API and new API versions?","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.assertEqual(sorted(ports), uuids)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_sort_key_invalid(self):"},{"line_number":284,"context_line":"        invalid_keys_list \u003d [\u0027foo\u0027, \u0027extra\u0027, \u0027internal_info\u0027]"},{"line_number":285,"context_line":"        for invalid_key in invalid_keys_list:"},{"line_number":286,"context_line":"            response \u003d self.get_json("},{"line_number":287,"context_line":"                \u0027/ports?sort_key\u003d%s\u0027 % invalid_key, expect_errors\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_2a720ae4","line":284,"updated":"2016-07-13 20:46:21.000000000","message":"good catch. We should add this check here.","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        self.assertEqual(sorted(ports), uuids)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def test_sort_key_invalid(self):"},{"line_number":284,"context_line":"        invalid_keys_list \u003d [\u0027foo\u0027, \u0027extra\u0027, \u0027internal_info\u0027]"},{"line_number":285,"context_line":"        for invalid_key in invalid_keys_list:"},{"line_number":286,"context_line":"            response \u003d self.get_json("},{"line_number":287,"context_line":"                \u0027/ports?sort_key\u003d%s\u0027 % invalid_key, expect_errors\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_4eedf3b6","line":284,"updated":"2016-07-13 18:33:19.000000000","message":"maybe add \u0027local_link_connection\u0027","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        p \u003d mock.patch.object(rpcapi.ConductorAPI, \u0027get_topic_for\u0027)"},{"line_number":377,"context_line":"        self.mock_gtf \u003d p.start()"},{"line_number":378,"context_line":"        self.mock_gtf.return_value \u003d \u0027test-topic\u0027"},{"line_number":379,"context_line":"        self.addCleanup(p.stop)"},{"line_number":380,"context_line":"        self.headers \u003d {api_base.Version.string: str("},{"line_number":381,"context_line":"                        versions.MAX_VERSION_STRING)}"},{"line_number":382,"context_line":""}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_8a7fbeaa","line":379,"updated":"2016-07-13 20:46:21.000000000","message":"I would prefer that the headers are changed only in the tests that require specific headers, not for the whole test class","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                                  headers\u003dself.headers)"},{"line_number":886,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":887,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":888,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_create_port_local_link_connection_keys(self):"},{"line_number":891,"context_line":"        pdict \u003d post_get_test_port("}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_6a7c12b6","line":888,"updated":"2016-07-13 20:46:21.000000000","message":"I disagree -- I would prefer that unit tests don\u0027t generally rely on specific error message strings or log strings.","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":885,"context_line":"                                  headers\u003dself.headers)"},{"line_number":886,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":887,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":888,"context_line":"        self.assertTrue(response.json[\u0027error_message\u0027])"},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"    def test_create_port_local_link_connection_keys(self):"},{"line_number":891,"context_line":"        pdict \u003d post_get_test_port("}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_7147f0bc","line":888,"updated":"2016-07-13 18:33:19.000000000","message":"would it be worth looking to see if some expected string is in the error message?\n\nSimilar comment for the other tests below that have errors. (Would make it easier to review this :))","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":914,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, expect_errors\u003dTrue,"},{"line_number":915,"context_line":"                                  headers\u003dself.headers)"},{"line_number":916,"context_line":"        self.assertEqual(\u0027application/json\u0027, response.content_type)"},{"line_number":917,"context_line":"        self.assertEqual(http_client.BAD_REQUEST, response.status_int)"},{"line_number":918,"context_line":""},{"line_number":919,"context_line":"    def test_create_port_local_link_connection_missing_optional(self):"},{"line_number":920,"context_line":"        pdict \u003d post_get_test_port("}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_91f09c68","line":917,"updated":"2016-07-13 18:33:19.000000000","message":"is there an error message?","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":937,"context_line":"    def test_create_port_with_pxe_enabled_old_api_version(self):"},{"line_number":938,"context_line":"        headers \u003d {api_base.Version.string: \u00271.14\u0027}"},{"line_number":939,"context_line":"        pdict \u003d post_get_test_port("},{"line_number":940,"context_line":"            pxe_enabled\u003dFalse)"},{"line_number":941,"context_line":"        del pdict[\u0027local_link_connection\u0027]"},{"line_number":942,"context_line":"        response \u003d self.post_json(\u0027/ports\u0027, pdict, headers\u003dheaders,"},{"line_number":943,"context_line":"                                  expect_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_1172ece3","line":940,"updated":"2016-07-13 18:33:19.000000000","message":"this doesn\u0027t need to be in a separate line?","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"ironic/tests/unit/api/v1/test_types.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"036ac72994a2fcf8cc02d153303f815d72fb9ba0","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"class TestLocalLinkConnectionType(base.TestCase):"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_local_link_connection_type(self):"},{"line_number":286,"context_line":"        v \u003d types.LocalLinkConnectionType()"},{"line_number":287,"context_line":"        self.assertItemsEqual({\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":288,"context_line":"                               \u0027port_id\u0027: \u0027value2\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1a26ad4f_b0572a59","line":285,"updated":"2015-11-02 15:55:02.000000000","message":"Please add test with invalid type.","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17465,"name":"William Stevenson","email":"will.stevenson@sap.com","username":"yhvh"},"change_message_id":"ec1f3db08255ad580fe07109aae7ac0fd6004b38","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"class TestLocalLinkConnectionType(base.TestCase):"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_local_link_connection_type(self):"},{"line_number":286,"context_line":"        v \u003d types.LocalLinkConnectionType()"},{"line_number":287,"context_line":"        self.assertItemsEqual({\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":288,"context_line":"                               \u0027port_id\u0027: \u0027value2\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"ba8a016a_3d4dc672","line":285,"in_reply_to":"1a26ad4f_b0572a59","updated":"2015-11-16 17:28:02.000000000","message":"Diff viewable at:\nhttps://github.com/yhvh/ironic/commit/0c00c4ed745bc328915dde9ef86e0707e4fe3fcb","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"f4e4c329365176eefdd1da7a02681b6efed09c24","unresolved":false,"context_lines":[{"line_number":282,"context_line":""},{"line_number":283,"context_line":"class TestLocalLinkConnectionType(base.TestCase):"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_local_link_connection_type(self):"},{"line_number":286,"context_line":"        v \u003d types.LocalLinkConnectionType()"},{"line_number":287,"context_line":"        self.assertItemsEqual({\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":288,"context_line":"                               \u0027port_id\u0027: \u0027value2\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5a710552_033e0bb8","line":285,"in_reply_to":"1a26ad4f_b0572a59","updated":"2015-12-17 13:37:07.000000000","message":"Done","commit_id":"504255c09232be1c3fc56bcfd8f38ea400a25432"},{"author":{"_account_id":17270,"name":"Sergii Turivnyi","email":"sturivnyi@mirantis.com","username":"sturivnyi"},"change_message_id":"084861efec4c337e124845412e02dc7f2d1afd81","unresolved":false,"context_lines":[{"line_number":281,"context_line":""},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"class TestLocalLinkConnectionType(base.TestCase):"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_local_link_connection_type(self):"},{"line_number":286,"context_line":"        v \u003d types.LocalLinkConnectionType()"},{"line_number":287,"context_line":"        self.assertItemsEqual({\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"}],"source_content_type":"text/x-python","patch_set":38,"id":"fa80f949_bdf3a19d","line":284,"updated":"2015-11-05 16:50:56.000000000","message":"Please add docstring","commit_id":"6bad29bdc939aa1a30143434dc70d15cf1cb6515"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":54,"id":"7a5de9d1_996bddb6","line":315,"updated":"2016-02-02 03:42:39.000000000","message":"Missing test for\n- invalid key in the value\n- missing mandatory key\n- that a value w/o the optional key \u0027switch_info\u0027 works","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":54,"id":"5a5ae5dd_29a58903","line":315,"in_reply_to":"7a5de9d1_996bddb6","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        v \u003d types.locallinkconnectiontype"},{"line_number":326,"context_line":"        value \u003d {\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":327,"context_line":"                 \u0027switch_info\u0027: \u0027value3\u0027}"},{"line_number":328,"context_line":"        self.assertRaises(exception.Invalid, v.validate, value)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def test_local_link_connection_type_withou_optional_key(self):"},{"line_number":331,"context_line":"        v \u003d types.locallinkconnectiontype"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_6f14c6f4","line":328,"updated":"2016-02-03 23:18:05.000000000","message":"for this exception and the one above, you could distinguish them by using a regex to match the string. Eg\n    self.assertRaisesRegex(exception.Invalid, \u0027Missing mandatory\u0027, v.validate, value)","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"b2fab437bbda43e152f62299738d4186f52d56e5","unresolved":false,"context_lines":[{"line_number":325,"context_line":"        v \u003d types.locallinkconnectiontype"},{"line_number":326,"context_line":"        value \u003d {\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":327,"context_line":"                 \u0027switch_info\u0027: \u0027value3\u0027}"},{"line_number":328,"context_line":"        self.assertRaises(exception.Invalid, v.validate, value)"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def test_local_link_connection_type_withou_optional_key(self):"},{"line_number":331,"context_line":"        v \u003d types.locallinkconnectiontype"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_2b7459fb","line":328,"in_reply_to":"5a5ae5dd_6f14c6f4","updated":"2016-02-04 18:12:24.000000000","message":"Done","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":18893,"name":"Miles Gould","email":"mgould@redhat.com","username":"pozorvlak"},"change_message_id":"118130841834988699ec7d7e3bf22c81dc628cb0","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        self.assertRaisesRegex(exception.Invalid, \u0027Missing mandatory\u0027,"},{"line_number":330,"context_line":"                               v.validate, value)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_local_link_connection_type_withou_optional_key(self):"},{"line_number":333,"context_line":"        v \u003d types.locallinkconnectiontype"},{"line_number":334,"context_line":"        value \u003d {\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":335,"context_line":"                 \u0027port_id\u0027: \u0027value2\u0027}"}],"source_content_type":"text/x-python","patch_set":112,"id":"3aaa91ec_f7a672ac","line":332,"updated":"2016-06-24 15:29:24.000000000","message":"Typo: \"without\"","commit_id":"fe7c79151701b21f0854c4ddca98c8efc0192b63"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"        self.assertRaisesRegex(exception.Invalid, \u0027Missing mandatory\u0027,"},{"line_number":330,"context_line":"                               v.validate, value)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def test_local_link_connection_type_withou_optional_key(self):"},{"line_number":333,"context_line":"        v \u003d types.locallinkconnectiontype"},{"line_number":334,"context_line":"        value \u003d {\u0027switch_id\u0027: \u00270a:1b:2c:3d:4e:5f\u0027,"},{"line_number":335,"context_line":"                 \u0027port_id\u0027: \u0027value2\u0027}"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_f4a2aefb","line":332,"updated":"2016-07-13 18:33:19.000000000","message":"don\u0027t know if you care, s/withou/without/","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"ironic/tests/unit/api/v1/test_utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d7c410da1ce41969270defa02881c698061ca048","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            exception.NotAcceptable, utils.check_requested_fields_are_allowed,"},{"line_number":109,"context_line":"            16, hide_fields)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class TestNodeIdent(base.TestCase):"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":54,"id":"7a5de9d1_56577225","line":111,"updated":"2016-02-02 03:42:39.000000000","message":"I don\u0027t see any tests for get_rpc_portgroup().","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"879e5ddb4590fc977f32eedbef0d51e9af3c2dd5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            exception.NotAcceptable, utils.check_requested_fields_are_allowed,"},{"line_number":109,"context_line":"            16, hide_fields)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class TestNodeIdent(base.TestCase):"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a5ae5dd_9204e615","line":111,"in_reply_to":"7a5de9d1_56577225","updated":"2016-02-03 21:29:13.000000000","message":"Done","commit_id":"470b3204a64be386953e5e876cf329ba93b4745a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"10a62276472871ec0d349e96077556c63ef287c5","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    def test_get_rpc_portgroup_invalid_name(self, mock_pr):"},{"line_number":303,"context_line":"        mock_pr.version.minor \u003d 10"},{"line_number":304,"context_line":"        self.assertRaises(exception.InvalidUuidOrName,"},{"line_number":305,"context_line":"                          utils.get_rpc_node,"},{"line_number":306,"context_line":"                          self.invalid_name)"}],"source_content_type":"text/x-python","patch_set":55,"id":"5a5ae5dd_6f87e60f","line":305,"updated":"2016-02-03 23:18:05.000000000","message":"utils.get_rpc_portgroup","commit_id":"e9f34e43be33016217610a9f557c6a54c94547c7"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self.assertFalse(utils.allow_port_internal_info())"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    @mock.patch.object(pecan, \u0027request\u0027, spec_set\u003d[\u0027version\u0027])"},{"line_number":229,"context_line":"    def test_allow_multitenancy_fields(self, mock_request):"},{"line_number":230,"context_line":"        mock_request.version.minor \u003d 19"},{"line_number":231,"context_line":"        self.assertTrue(utils.allow_port_advanced_net_fields())"},{"line_number":232,"context_line":"        mock_request.version.minor \u003d 18"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_0a6bcef2","line":229,"updated":"2016-07-13 20:46:21.000000000","message":"agreed","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"cf621782a9dab257e368b4f990b6abf90458086c","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        self.assertFalse(utils.allow_port_internal_info())"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    @mock.patch.object(pecan, \u0027request\u0027, spec_set\u003d[\u0027version\u0027])"},{"line_number":229,"context_line":"    def test_allow_multitenancy_fields(self, mock_request):"},{"line_number":230,"context_line":"        mock_request.version.minor \u003d 19"},{"line_number":231,"context_line":"        self.assertTrue(utils.allow_port_advanced_net_fields())"},{"line_number":232,"context_line":"        mock_request.version.minor \u003d 18"}],"source_content_type":"text/x-python","patch_set":116,"id":"1aa78d24_54b90215","line":229,"updated":"2016-07-13 18:33:19.000000000","message":"maybe s/multitenancy/port_advanced_net/","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"releasenotes/notes/add-api-portgroups-55465091f019d962.yaml":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"6079903ae882c866305b1596c947432c52bbb229","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added portgroup API support."}],"source_content_type":"text/x-yaml","patch_set":64,"id":"3a57f1b5_8f3e8fd8","line":3,"updated":"2016-02-12 00:09:01.000000000","message":"I\u0027d like to expand on this to include exactly which endpoints were added, and exactly what has changed in modified endpoints. Also include the API version :)","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"eba30756748d6478583f1439a79dd776fc64f74b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Added portgroup API support."}],"source_content_type":"text/x-yaml","patch_set":64,"id":"3a57f1b5_e146287a","line":3,"in_reply_to":"3a57f1b5_8f3e8fd8","updated":"2016-02-12 14:40:41.000000000","message":"Done","commit_id":"e5e4bb628815cbcbdc4426a323f3b065eda1f092"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"36f99db47391e18a3fab767e1b1f169d43a5483b","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    - /nodes/\u003cnode_ident\u003e/portgroups"},{"line_number":7,"context_line":"    - /portgroups"},{"line_number":8,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e"},{"line_number":9,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e/ports"}],"source_content_type":"text/x-yaml","patch_set":66,"id":"dae33548_1cd80853","line":9,"updated":"2016-02-15 14:50:17.000000000","message":"Also add the new fields added to ports?","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"69fe0d59026c94f3c69be0b2c5a9c5f2e2ab9971","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    - /nodes/\u003cnode_ident\u003e/portgroups"},{"line_number":7,"context_line":"    - /portgroups"},{"line_number":8,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e"},{"line_number":9,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e/ports"}],"source_content_type":"text/x-yaml","patch_set":66,"id":"dae33548_3b52fbdd","line":9,"in_reply_to":"dae33548_1cd80853","updated":"2016-02-16 15:04:17.000000000","message":"Done","commit_id":"6b51b8787375e63f7175f81f429676ca9df32770"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    - /nodes/\u003cnode_ident\u003e/portgroups"},{"line_number":7,"context_line":"    - /portgroups"},{"line_number":8,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e"},{"line_number":9,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e/ports"},{"line_number":10,"context_line":"    Starting with this API version, ports have three new fields:"},{"line_number":11,"context_line":"    - portgroup_uuid contains UUID of a portgroup this port belongs to;"},{"line_number":12,"context_line":"    - pxe_enabled indicates whether pxe is enabled or disabled on the node;"}],"source_content_type":"text/x-yaml","patch_set":96,"id":"dab17558_e8be40fe","line":9,"updated":"2016-05-06 10:34:40.000000000","message":"this does not render properly. maybe you need to change - to * and insert newlines around the list","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    - /nodes/\u003cnode_ident\u003e/portgroups"},{"line_number":7,"context_line":"    - /portgroups"},{"line_number":8,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e"},{"line_number":9,"context_line":"    - /portgroups/\u003cportgroup_ident\u003e/ports"},{"line_number":10,"context_line":"    Starting with this API version, ports have three new fields:"},{"line_number":11,"context_line":"    - portgroup_uuid contains UUID of a portgroup this port belongs to;"},{"line_number":12,"context_line":"    - pxe_enabled indicates whether pxe is enabled or disabled on the node;"}],"source_content_type":"text/x-yaml","patch_set":96,"id":"bab6814e_8b6605b9","line":9,"in_reply_to":"dab17558_e8be40fe","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    Starting with this API version, ports have three new fields:"},{"line_number":11,"context_line":"    - portgroup_uuid contains UUID of a portgroup this port belongs to;"},{"line_number":12,"context_line":"    - pxe_enabled indicates whether pxe is enabled or disabled on the node;"},{"line_number":13,"context_line":"    - local_link_connection contains the port binding profile."}],"source_content_type":"text/x-yaml","patch_set":96,"id":"dab17558_c8bb7c0d","line":13,"updated":"2016-05-06 10:34:40.000000000","message":"ditto","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[{"line_number":10,"context_line":"    Starting with this API version, ports have three new fields:"},{"line_number":11,"context_line":"    - portgroup_uuid contains UUID of a portgroup this port belongs to;"},{"line_number":12,"context_line":"    - pxe_enabled indicates whether pxe is enabled or disabled on the node;"},{"line_number":13,"context_line":"    - local_link_connection contains the port binding profile."}],"source_content_type":"text/x-yaml","patch_set":96,"id":"bab6814e_eb0511c2","line":13,"in_reply_to":"dab17558_c8bb7c0d","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"}],"releasenotes/notes/add-port-advanced-net-fields-55465091f019d962.yaml":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"9e8269547584938f571280bbfaab6da14de0ff5a","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    API version is bumped to 1.19, ``local_link_connection`` and"},{"line_number":5,"context_line":"    ``pxe_enabled`` fields were added to a Port:"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    * ``pxe_enabled`` indicates whether PXE is enabled for the port."},{"line_number":8,"context_line":"    * ``local_link_connection`` contains the port binding profile."}],"source_content_type":"text/x-yaml","patch_set":116,"id":"1aa78d24_aa655a1e","line":5,"updated":"2016-07-13 20:46:21.000000000","message":"I would like to suggest the following wording in the release note:\n\n  Exposes the ``local_link_connection`` and ``pxe_enabled`` properties of the Port resource\n  to the REST API, raising the API maximum version to 1.19.\n\n  * The ``pxe_enabled`` field indicates whether this Port should be used when PXE booting this Node.\n  * The ``local_link_connection`` field may be used to supply the port binding profile.","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"c951f8499a3423dd750dbef613d871b8586288ef","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    API version is bumped to 1.19, ``local_link_connection`` and"},{"line_number":5,"context_line":"    ``pxe_enabled`` fields were added to a Port:"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    * ``pxe_enabled`` indicates whether PXE is enabled for the port."},{"line_number":8,"context_line":"    * ``local_link_connection`` contains the port binding profile."}],"source_content_type":"text/x-yaml","patch_set":116,"id":"1aa78d24_e815aa4c","line":5,"in_reply_to":"1aa78d24_aa655a1e","updated":"2016-07-13 21:37:05.000000000","message":"+1","commit_id":"0a5549680d491894faad5133db38e1bc2b4c93d6"}],"releasenotes/notes/update-dhcp-opts-interface-change-9257dd14ea49d6eb.yaml":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Updated DHCP providers update_dhcp_opts function return"},{"line_number":4,"context_line":"    value format to: ``{\u0027ports\u0027: {\u0027port.uuid\u0027: vif.id},"},{"line_number":5,"context_line":"    \u0027portgroups\u0027: {\u0027portgroup.uuid\u0027: vif.id}}.`` This may"},{"line_number":6,"context_line":"    affect out of tree DHCP providers."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"3a57f1b5_4f49d330","line":3,"updated":"2016-02-10 15:54:41.000000000","message":"This should have been added in the patch that had the change but we forgot to mention it there which is why I suggested you add it to this patch.\n\nWe also need something that mentions the feature that will be available to the user with this particular patch -- the portgroup stuff.","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"4eb685b36d4ac6e2871d1588a28a614708f6aa28","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - Updated DHCP providers update_dhcp_opts function return"},{"line_number":4,"context_line":"    value format to: ``{\u0027ports\u0027: {\u0027port.uuid\u0027: vif.id},"},{"line_number":5,"context_line":"    \u0027portgroups\u0027: {\u0027portgroup.uuid\u0027: vif.id}}.`` This may"},{"line_number":6,"context_line":"    affect out of tree DHCP providers."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"3a57f1b5_cc3b87ea","line":3,"in_reply_to":"3a57f1b5_4f49d330","updated":"2016-02-10 18:28:22.000000000","message":"Done","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"9f3d827a6cfbc11cb8fb1175eea0f3db676ea154","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Updated DHCP providers update_dhcp_opts function return"},{"line_number":4,"context_line":"    value format to: ``{\u0027ports\u0027: {\u0027port.uuid\u0027: vif.id},"},{"line_number":5,"context_line":"    \u0027portgroups\u0027: {\u0027portgroup.uuid\u0027: vif.id}}.`` This may"},{"line_number":6,"context_line":"    affect out of tree DHCP providers."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"3a57f1b5_0f1bdb73","line":6,"updated":"2016-02-10 15:54:41.000000000","message":"How about something like \n\nThe BaseDHCP.update_dhcp_opts() vifs parameter was changed to: ``\u003cwhat you have above\u003e``. This is a breaking change for out-of-tree DHCP providers.","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"4eb685b36d4ac6e2871d1588a28a614708f6aa28","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - Updated DHCP providers update_dhcp_opts function return"},{"line_number":4,"context_line":"    value format to: ``{\u0027ports\u0027: {\u0027port.uuid\u0027: vif.id},"},{"line_number":5,"context_line":"    \u0027portgroups\u0027: {\u0027portgroup.uuid\u0027: vif.id}}.`` This may"},{"line_number":6,"context_line":"    affect out of tree DHCP providers."}],"source_content_type":"text/x-yaml","patch_set":63,"id":"3a57f1b5_ac73abe6","line":6,"in_reply_to":"3a57f1b5_0f1bdb73","updated":"2016-02-10 18:28:22.000000000","message":"Done","commit_id":"46d08afa7532a244db74ebec11b8274ae8f73d5d"},{"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":"66ff6abe144b4ab6f253e2d311295a3dc57fdff3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":89,"id":"ba0121b8_c8de2ddc","line":7,"updated":"2016-03-31 22:22:13.000000000","message":"Should these be separate release note files?","commit_id":"9490ddfc7253cac7745363b3e18a9343c1245a62"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0516c2d1c085196920d3e96244e9e62da198ac83","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":96,"id":"dab17558_68ca50a3","updated":"2016-05-06 10:34:40.000000000","message":"you don\u0027t need to release note files, you can put both changes in one","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"ebd2a664d10ae9e71f21e3df084fae1da2e97ab3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":96,"id":"bab6814e_4b1edd0c","in_reply_to":"dab17558_68ca50a3","updated":"2016-05-26 14:57:35.000000000","message":"Done","commit_id":"053a5f4796da035326213c398790e1c701e4d7d3"}]}
