)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"a4e35c4ce4c3f7f1241a74c15e3ecee1f88ac9e3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vasyl Saienko \u003cvsaienko@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-12-22 08:14:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Generate necessary network metadata for portgroups"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint ironic-portgroups-support"},{"line_number":10,"context_line":"Co-Authored-By: Sam Betts \u003csambetts@cisco.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba5201f7_7de78e12","line":7,"updated":"2016-12-30 11:58:08.000000000","message":"and ports also","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"0a0bf0f21300ec770718af868147b2d39a9c77a7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vasyl Saienko \u003cvsaienko@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-12-22 08:14:00 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Generate necessary network metadata for portgroups"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint ironic-portgroups-support"},{"line_number":10,"context_line":"Co-Authored-By: Sam Betts \u003csambetts@cisco.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"ba5201f7_dc621516","line":7,"in_reply_to":"ba5201f7_7de78e12","updated":"2017-01-10 14:14:38.000000000","message":"Not sure it\u0027s worth mentioning here, it is only necessary for portgroups. ports placed there is a side effect :)","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"35bbb2427897bdf511eaf4a18172bb78594d13e3","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Vladyslav Drok \u003cvdrok@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-01-13 16:47:11 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Generate necessary network metadata for portgroups"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Implements: blueprint ironic-portgroups-support"},{"line_number":10,"context_line":"Co-Authored-By: Sam Betts \u003csambetts@cisco.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7a3c09a3_03d29200","line":7,"updated":"2017-01-13 18:23:54.000000000","message":"Probably want a better commit message here, yes? Definitely mention ironic, maybe something about what this actually accomplishes (putting bonding info in the instance metadata, etc)","commit_id":"28308a778817add75f7afd2a6f9cdeaace80244a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Implements: blueprint ironic-portgroups-support"},{"line_number":26,"context_line":"Co-Authored-By: Sam Betts \u003csambetts@cisco.com\u003e"},{"line_number":27,"context_line":"Depends-On: I0dca2c2d98184e370c08c3e05aa3edadead869af"},{"line_number":28,"context_line":"Change-Id: Ic9bf6ca9e3de0068a289cbe6760cd8c4526ec7e0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7a3c09a3_3d3b5b3a","line":27,"updated":"2017-01-18 19:44:23.000000000","message":"And Id8afa902026ce4466e96cc7bfb7fb97447d65809 but that\u0027s fine.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef4ff9179aa662f38c0fb568ad0ab1db7be55964","unresolved":false,"context_lines":[{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Implements: blueprint ironic-portgroups-support"},{"line_number":26,"context_line":"Co-Authored-By: Sam Betts \u003csambetts@cisco.com\u003e"},{"line_number":27,"context_line":"Depends-On: I0dca2c2d98184e370c08c3e05aa3edadead869af"},{"line_number":28,"context_line":"Change-Id: Ic9bf6ca9e3de0068a289cbe6760cd8c4526ec7e0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":17,"id":"7a3c09a3_0ed580b8","line":27,"in_reply_to":"7a3c09a3_3d3b5b3a","updated":"2017-01-18 21:09:05.000000000","message":"Done","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bfa6a2a15e6e7b786ec0a88c96b75b1c9b50b738","unresolved":false,"context_lines":[{"line_number":1750,"context_line":""},{"line_number":1751,"context_line":"    def test_generate_network_metadata_no_pg_address(self, mock_cd_builder,"},{"line_number":1752,"context_line":"                                                     mock_instance_meta):"},{"line_number":1753,"context_line":"        self._test_generate_network_metadata()"},{"line_number":1754,"context_line":""},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"class HashRingTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_55887671","line":1753,"updated":"2017-01-11 16:17:41.000000000","message":"Do we want to add a test that uses a standalone port, or only ports, or anything like that?","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"802e33a31932308f2667129d380a6d637ae1c8a4","unresolved":false,"context_lines":[{"line_number":1750,"context_line":""},{"line_number":1751,"context_line":"    def test_generate_network_metadata_no_pg_address(self, mock_cd_builder,"},{"line_number":1752,"context_line":"                                                     mock_instance_meta):"},{"line_number":1753,"context_line":"        self._test_generate_network_metadata()"},{"line_number":1754,"context_line":""},{"line_number":1755,"context_line":""},{"line_number":1756,"context_line":"class HashRingTestCase(test.NoDBTestCase):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a57fde8_e05f590c","line":1753,"in_reply_to":"ba5201f7_55887671","updated":"2017-01-12 16:39:08.000000000","message":"Hm, yeah, might be worth adding.","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":1694,"context_line":"    @mock.patch.object(FAKE_CLIENT.node, \u0027list_ports\u0027)"},{"line_number":1695,"context_line":"    @mock.patch.object(FAKE_CLIENT.portgroup, \u0027list\u0027)"},{"line_number":1696,"context_line":"    def _test_generate_network_metadata(self, mock_portgroups, mock_ports,"},{"line_number":1697,"context_line":"                                        address\u003dNone, vif_internal_info\u003dTrue):"},{"line_number":1698,"context_line":"        internal_info \u003d ({\u0027tenant_vif_port_id\u0027: utils.FAKE_VIF_UUID}"},{"line_number":1699,"context_line":"                         if vif_internal_info else {})"},{"line_number":1700,"context_line":"        extra \u003d ({\u0027vif_port_id\u0027: utils.FAKE_VIF_UUID}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_bea5fea2","line":1697,"updated":"2017-01-17 00:06:35.000000000","message":"I don\u0027t see this being called with vif_internal_info\u003dFalse. Is the code related to this needed?","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7f42ac6ada86edb9e2f802298563c9d47dafb85a","unresolved":false,"context_lines":[{"line_number":1694,"context_line":"    @mock.patch.object(FAKE_CLIENT.node, \u0027list_ports\u0027)"},{"line_number":1695,"context_line":"    @mock.patch.object(FAKE_CLIENT.portgroup, \u0027list\u0027)"},{"line_number":1696,"context_line":"    def _test_generate_network_metadata(self, mock_portgroups, mock_ports,"},{"line_number":1697,"context_line":"                                        address\u003dNone, vif_internal_info\u003dTrue):"},{"line_number":1698,"context_line":"        internal_info \u003d ({\u0027tenant_vif_port_id\u0027: utils.FAKE_VIF_UUID}"},{"line_number":1699,"context_line":"                         if vif_internal_info else {})"},{"line_number":1700,"context_line":"        extra \u003d ({\u0027vif_port_id\u0027: utils.FAKE_VIF_UUID}"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_fcc05552","line":1697,"in_reply_to":"7a3c09a3_bea5fea2","updated":"2017-01-17 13:18:52.000000000","message":"Ah, right, forgot to add this. But looking at Sam\u0027s/Jim\u0027s comments, it might be not needed.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"a264b80a3b031cfe3534c23df678d80f8745967b","unresolved":false,"context_lines":[{"line_number":1719,"context_line":"            extra\u003dextra, internal_info\u003dinternal_info,"},{"line_number":1720,"context_line":"            properties\u003d{\u0027bond_miimon\u0027: 100, \u0027xmit_hash_policy\u0027: \u0027layer3+4\u0027}"},{"line_number":1721,"context_line":"        )"},{"line_number":1722,"context_line":"        port1 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1723,"context_line":"                                           address\u003d\u002700:00:00:00:00:01\u0027,"},{"line_number":1724,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1725,"context_line":"        port2 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1726,"context_line":"                                           address\u003d\u002700:00:00:00:00:02\u0027,"},{"line_number":1727,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1728,"context_line":"        mock_ports.return_value \u003d [port1, port2]"},{"line_number":1729,"context_line":"        mock_portgroups.return_value \u003d [portgroup]"},{"line_number":1730,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_35e60f17","line":1727,"range":{"start_line":1722,"start_character":8,"end_line":1727,"end_character":73},"updated":"2017-01-18 20:03:32.000000000","message":"I would think that we\u0027d want unique uuids for these ports, since don\u0027t they by default get the same hard-coded port uuid?\n\nhttps://review.openstack.org/#/c/388756/17/nova/tests/unit/virt/ironic/utils.py@57","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1dd20adbc708a26634c4dfde74d3c771241713df","unresolved":false,"context_lines":[{"line_number":1719,"context_line":"            extra\u003dextra, internal_info\u003dinternal_info,"},{"line_number":1720,"context_line":"            properties\u003d{\u0027bond_miimon\u0027: 100, \u0027xmit_hash_policy\u0027: \u0027layer3+4\u0027}"},{"line_number":1721,"context_line":"        )"},{"line_number":1722,"context_line":"        port1 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1723,"context_line":"                                           address\u003d\u002700:00:00:00:00:01\u0027,"},{"line_number":1724,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1725,"context_line":"        port2 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1726,"context_line":"                                           address\u003d\u002700:00:00:00:00:02\u0027,"},{"line_number":1727,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1728,"context_line":"        mock_ports.return_value \u003d [port1, port2]"},{"line_number":1729,"context_line":"        mock_portgroups.return_value \u003d [portgroup]"},{"line_number":1730,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_b5483f8c","line":1727,"range":{"start_line":1722,"start_character":8,"end_line":1727,"end_character":73},"in_reply_to":"7a3c09a3_3501af3a","updated":"2017-01-18 20:11:07.000000000","message":"Me too. :)\n\nHaving said that, apparently it makes no difference in the result of the test. I pulled this down and gave each port a unique uuid and the test still passes. But it violates the assertion about having duplicates in the links results.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ecddbccfaafd0d2f20dacac1ed0ba60fa2ace6c3","unresolved":false,"context_lines":[{"line_number":1719,"context_line":"            extra\u003dextra, internal_info\u003dinternal_info,"},{"line_number":1720,"context_line":"            properties\u003d{\u0027bond_miimon\u0027: 100, \u0027xmit_hash_policy\u0027: \u0027layer3+4\u0027}"},{"line_number":1721,"context_line":"        )"},{"line_number":1722,"context_line":"        port1 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1723,"context_line":"                                           address\u003d\u002700:00:00:00:00:01\u0027,"},{"line_number":1724,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1725,"context_line":"        port2 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1726,"context_line":"                                           address\u003d\u002700:00:00:00:00:02\u0027,"},{"line_number":1727,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1728,"context_line":"        mock_ports.return_value \u003d [port1, port2]"},{"line_number":1729,"context_line":"        mock_portgroups.return_value \u003d [portgroup]"},{"line_number":1730,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_3501af3a","line":1727,"range":{"start_line":1722,"start_character":8,"end_line":1727,"end_character":73},"in_reply_to":"7a3c09a3_35e60f17","updated":"2017-01-18 20:07:33.000000000","message":"yup, good catch. (I am reminded of how much I hate reviewing unit tests...)","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8c627591e56a64218f245ba934e24aaef526ce52","unresolved":false,"context_lines":[{"line_number":1719,"context_line":"            extra\u003dextra, internal_info\u003dinternal_info,"},{"line_number":1720,"context_line":"            properties\u003d{\u0027bond_miimon\u0027: 100, \u0027xmit_hash_policy\u0027: \u0027layer3+4\u0027}"},{"line_number":1721,"context_line":"        )"},{"line_number":1722,"context_line":"        port1 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1723,"context_line":"                                           address\u003d\u002700:00:00:00:00:01\u0027,"},{"line_number":1724,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1725,"context_line":"        port2 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1726,"context_line":"                                           address\u003d\u002700:00:00:00:00:02\u0027,"},{"line_number":1727,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1728,"context_line":"        mock_ports.return_value \u003d [port1, port2]"},{"line_number":1729,"context_line":"        mock_portgroups.return_value \u003d [portgroup]"},{"line_number":1730,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_f80abe78","line":1727,"range":{"start_line":1722,"start_character":8,"end_line":1727,"end_character":73},"in_reply_to":"7a3c09a3_b5483f8c","updated":"2017-01-18 20:23:04.000000000","message":"FWIW this is what I did locally to assert there are no duplicates in the resulting links:\ndiff --git a/nova/tests/unit/virt/ironic/test_driver.py b/nova/tests/unit/virt/ironic/test_driver.py\nindex 69e7ac9..f66a3ae 100644\n--- a/nova/tests/unit/virt/ironic/test_driver.py\n+++ b/nova/tests/unit/virt/ironic/test_driver.py\n@@ -1746,6 +1746,10 @@ class IronicDriverGenerateConfigDriveTestCase(test.NoDBTestCase):\n                           {\u0027id\u0027: port2.uuid, \u0027type\u0027: \u0027phy\u0027,\n                            \u0027ethernet_mac_address\u0027: port2.address}],\n                          metadata[\u0027links\u0027][1:])\n+        # assert there are no duplicate links\n+        link_ids \u003d [link[\u0027id\u0027] for link in metadata[\u0027links\u0027]]\n+        self.assertEqual(len(set(link_ids)), len(link_ids),\n+                         \u0027There are duplicate link IDs: %s\u0027 % link_ids)\n \n     def test_generate_network_metadata(self, mock_cd_builder,\n                                        mock_instance_meta):\n\n\nI\u0027d suggest adding that to this test.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef4ff9179aa662f38c0fb568ad0ab1db7be55964","unresolved":false,"context_lines":[{"line_number":1719,"context_line":"            extra\u003dextra, internal_info\u003dinternal_info,"},{"line_number":1720,"context_line":"            properties\u003d{\u0027bond_miimon\u0027: 100, \u0027xmit_hash_policy\u0027: \u0027layer3+4\u0027}"},{"line_number":1721,"context_line":"        )"},{"line_number":1722,"context_line":"        port1 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1723,"context_line":"                                           address\u003d\u002700:00:00:00:00:01\u0027,"},{"line_number":1724,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1725,"context_line":"        port2 \u003d ironic_utils.get_test_port(node_uuid\u003dself.node.uuid,"},{"line_number":1726,"context_line":"                                           address\u003d\u002700:00:00:00:00:02\u0027,"},{"line_number":1727,"context_line":"                                           portgroup_uuid\u003dportgroup.uuid)"},{"line_number":1728,"context_line":"        mock_ports.return_value \u003d [port1, port2]"},{"line_number":1729,"context_line":"        mock_portgroups.return_value \u003d [portgroup]"},{"line_number":1730,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_4ed788bf","line":1727,"range":{"start_line":1722,"start_character":8,"end_line":1727,"end_character":73},"in_reply_to":"7a3c09a3_f80abe78","updated":"2017-01-18 21:09:05.000000000","message":"Good idea. Done.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":1751,"context_line":"                                       mock_instance_meta):"},{"line_number":1752,"context_line":"        self._test_generate_network_metadata(address\u003d\u002700:00:00:00:00:00\u0027)"},{"line_number":1753,"context_line":""},{"line_number":1754,"context_line":"    def test_generate_network_metadata_no_pg_address(self, mock_cd_builder,"},{"line_number":1755,"context_line":"                                                     mock_instance_meta):"},{"line_number":1756,"context_line":"        self._test_generate_network_metadata()"},{"line_number":1757,"context_line":""},{"line_number":1758,"context_line":"    def test_generate_network_metadata_vif_in_extra(self, mock_cd_builder,"},{"line_number":1759,"context_line":"                                                    mock_instance_meta):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_e33f7085","line":1756,"range":{"start_line":1754,"start_character":4,"end_line":1756,"end_character":46},"updated":"2017-01-18 19:44:23.000000000","message":"Isn\u0027t this already covered in the test above since vif_internal_info\u003dTrue by default?","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4ef960349ceda5461b8bab4ceb4f526a325c46fa","unresolved":false,"context_lines":[{"line_number":1751,"context_line":"                                       mock_instance_meta):"},{"line_number":1752,"context_line":"        self._test_generate_network_metadata(address\u003d\u002700:00:00:00:00:00\u0027)"},{"line_number":1753,"context_line":""},{"line_number":1754,"context_line":"    def test_generate_network_metadata_no_pg_address(self, mock_cd_builder,"},{"line_number":1755,"context_line":"                                                     mock_instance_meta):"},{"line_number":1756,"context_line":"        self._test_generate_network_metadata()"},{"line_number":1757,"context_line":""},{"line_number":1758,"context_line":"    def test_generate_network_metadata_vif_in_extra(self, mock_cd_builder,"},{"line_number":1759,"context_line":"                                                    mock_instance_meta):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_e30a1079","line":1756,"range":{"start_line":1754,"start_character":4,"end_line":1756,"end_character":46},"in_reply_to":"7a3c09a3_e33f7085","updated":"2017-01-18 19:57:29.000000000","message":"The difference is that the port group has no address in this test, whereas in the one above (@L1750), the port group has an address.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"}],"nova/tests/unit/virt/ironic/utils.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_test_portgroup(**kw):"},{"line_number":68,"context_line":"    return type(\u0027portgroup\u0027, (object,),"},{"line_number":69,"context_line":"               {\u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u0027deadbeef-1234-5678-9012-fedcbafedcba\u0027),"},{"line_number":70,"context_line":"                \u0027node_uuid\u0027: kw.get(\u0027node_uuid\u0027, get_test_node().uuid),"},{"line_number":71,"context_line":"                \u0027address\u0027: kw.get(\u0027address\u0027, \u0027EE:EE:EE:EE:EE:EE\u0027),"},{"line_number":72,"context_line":"                \u0027extra\u0027: kw.get(\u0027extra\u0027, {}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_3bc92027","line":69,"updated":"2017-01-17 00:06:35.000000000","message":"deadbeef? I hope that doesn\u0027t offend anyone (like a vegan). :)\n\nactually, it is a nit, i think it might be better to change it to something else.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def get_test_portgroup(**kw):"},{"line_number":68,"context_line":"    return type(\u0027portgroup\u0027, (object,),"},{"line_number":69,"context_line":"               {\u0027uuid\u0027: kw.get(\u0027uuid\u0027, \u0027deadbeef-1234-5678-9012-fedcbafedcba\u0027),"},{"line_number":70,"context_line":"                \u0027node_uuid\u0027: kw.get(\u0027node_uuid\u0027, get_test_node().uuid),"},{"line_number":71,"context_line":"                \u0027address\u0027: kw.get(\u0027address\u0027, \u0027EE:EE:EE:EE:EE:EE\u0027),"},{"line_number":72,"context_line":"                \u0027extra\u0027: kw.get(\u0027extra\u0027, {}),"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_9d72e80f","line":69,"in_reply_to":"7a3c09a3_3bc92027","updated":"2017-01-17 15:48:52.000000000","message":"Done","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027standalone_ports_supported\u0027: kw.get("},{"line_number":77,"context_line":"                    \u0027standalone_ports_supported\u0027, True),"},{"line_number":78,"context_line":"                \u0027created_at\u0027: kw.get(\u0027created_at\u0027),"},{"line_number":79,"context_line":"                \u0027updated_at\u0027: kw.get(\u0027updated_at\u0027)})()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def get_test_vif(**kw):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_3bf04067","line":79,"updated":"2017-01-17 00:06:35.000000000","message":"how accurate should this be? What about \u0027name\u0027 ?","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                \u0027standalone_ports_supported\u0027: kw.get("},{"line_number":77,"context_line":"                    \u0027standalone_ports_supported\u0027, True),"},{"line_number":78,"context_line":"                \u0027created_at\u0027: kw.get(\u0027created_at\u0027),"},{"line_number":79,"context_line":"                \u0027updated_at\u0027: kw.get(\u0027updated_at\u0027)})()"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"def get_test_vif(**kw):"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_1dea78ac","line":79,"in_reply_to":"7a3c09a3_3bf04067","updated":"2017-01-17 15:48:52.000000000","message":"It\u0027s for testing, so if there\u0027ll be a test requiring a name, it will need to be added. not a big deal, so will add.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"461c48424ad392df0a75c128623ea19d1e58d9c6","unresolved":false,"context_lines":[{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":677,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":678,"context_line":"        portgroups \u003d self.ironicclient.call(\"node.list_portgroups\","},{"line_number":679,"context_line":"                                            node.uuid, detail\u003dTrue)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        additional_links \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_c7cda286","line":678,"updated":"2016-12-26 11:02:27.000000000","message":"\"node.list_portgroups\" was removed in the review[1].\nself.ironicclient.call(\"portgroup.list\", node\u003dnode.uuid, detail\u003dTrue) would be alternative.\n\n[1] https://review.openstack.org/#/c/335964/20/ironicclient/v1/node.py@192","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"59045d2740ed52daa195fc404750fb49fcb79e34","unresolved":false,"context_lines":[{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":677,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":678,"context_line":"        portgroups \u003d self.ironicclient.call(\"node.list_portgroups\","},{"line_number":679,"context_line":"                                            node.uuid, detail\u003dTrue)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        additional_links \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_eda4c209","line":678,"in_reply_to":"da4df55a_22b9bc2e","updated":"2016-12-29 13:04:35.000000000","message":"It depends on the patch with attach/detach, which is not merged yet. It is a bit strange, but the attach/detach in ironic will come later than portgroups, while in nova it\u0027s vice versa :) The version set in the attach/detach patch is enough for portgroups listing.","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4ba3864466937a979c7788fc017cc86c3dd7c36","unresolved":false,"context_lines":[{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":677,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":678,"context_line":"        portgroups \u003d self.ironicclient.call(\"node.list_portgroups\","},{"line_number":679,"context_line":"                                            node.uuid, detail\u003dTrue)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        additional_links \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_e26b34b5","line":678,"in_reply_to":"da4df55a_c7cda286","updated":"2016-12-28 23:16:28.000000000","message":"Also, doesn\u0027t that require at least Ironic 1.23?\n\nhttp://docs.openstack.org/developer/ironic/dev/webapi-version-history.html\n\nSo the ironicclient wrapper in nova would need to be updated:\n\nhttps://github.com/openstack/nova/blob/a74d3ae4e815e3727961ef67bd801dada0267a0b/nova/virt/ironic/client_wrapper.py#L37","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f23bda52e32eef88f2534fa3ee54a289d20b2ec","unresolved":false,"context_lines":[{"line_number":675,"context_line":""},{"line_number":676,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":677,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":678,"context_line":"        portgroups \u003d self.ironicclient.call(\"node.list_portgroups\","},{"line_number":679,"context_line":"                                            node.uuid, detail\u003dTrue)"},{"line_number":680,"context_line":""},{"line_number":681,"context_line":"        additional_links \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"da4df55a_22b9bc2e","line":678,"in_reply_to":"da4df55a_e26b34b5","updated":"2016-12-28 23:19:09.000000000","message":"Also, https://review.openstack.org/#/c/335964/ is not yet released, so that\u0027s going to have to get released and then bump the minimum required version of python-ironicclient in global-requirements and have Nova depend on that g-r bump change.","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"a4e35c4ce4c3f7f1241a74c15e3ecee1f88ac9e3","unresolved":false,"context_lines":[{"line_number":687,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":688,"context_line":"                link.update({"},{"line_number":689,"context_line":"                    \u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":690,"context_line":"                    \u0027ethernet_mac_address\u0027: pg.address, \u0027bond_links\u0027: []"},{"line_number":691,"context_line":"                })"},{"line_number":692,"context_line":"                for prop in pg.properties:"},{"line_number":693,"context_line":"                    # cloud-init checks the same way, parameter name has to"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_1d3122a3","line":690,"updated":"2016-12-30 11:58:08.000000000","message":"portgroup address is no longer mandatory field, we should pick value from neutron port if not set.","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"0a0bf0f21300ec770718af868147b2d39a9c77a7","unresolved":false,"context_lines":[{"line_number":687,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":688,"context_line":"                link.update({"},{"line_number":689,"context_line":"                    \u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":690,"context_line":"                    \u0027ethernet_mac_address\u0027: pg.address, \u0027bond_links\u0027: []"},{"line_number":691,"context_line":"                })"},{"line_number":692,"context_line":"                for prop in pg.properties:"},{"line_number":693,"context_line":"                    # cloud-init checks the same way, parameter name has to"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba5201f7_fc65191d","line":690,"in_reply_to":"ba5201f7_1d3122a3","updated":"2017-01-10 14:14:38.000000000","message":"Done","commit_id":"79242d0249cc48abf68b55f4bfc0479739441990"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bfa6a2a15e6e7b786ec0a88c96b75b1c9b50b738","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                # generated by neutron"},{"line_number":692,"context_line":"                if pg.address:"},{"line_number":693,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_1a537d3a","line":694,"updated":"2017-01-11 16:17:41.000000000","message":"Should we have a whitelist of properties here, so arbitrary stuff isn\u0027t getting thrown into the metadata?","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"df2e241c8dc167f75c5c914cd056e3976b7f0d87","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                # generated by neutron"},{"line_number":692,"context_line":"                if pg.address:"},{"line_number":693,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a3c09a3_0881fb4a","line":694,"in_reply_to":"9a57fde8_80ddad72","updated":"2017-01-12 23:03:40.000000000","message":"Hm, I only count 28, which wouldn\u0027t be too bad to stick in a list. It might be hard to keep up with new options though; not sure how often they are added.\n\nThat said, maybe ironic is a better place to do that validation anyway.","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"802e33a31932308f2667129d380a6d637ae1c8a4","unresolved":false,"context_lines":[{"line_number":691,"context_line":"                # generated by neutron"},{"line_number":692,"context_line":"                if pg.address:"},{"line_number":693,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a57fde8_80ddad72","line":694,"in_reply_to":"ba5201f7_1a537d3a","updated":"2017-01-12 16:39:08.000000000","message":"Ideally, yes, but I\u0027m not sure how we can accomplish it. It is a rather long list (described in Bonding Driver Options here https://www.kernel.org/doc/Documentation/networking/bonding.txt)","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bfa6a2a15e6e7b786ec0a88c96b75b1c9b50b738","unresolved":false,"context_lines":[{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":698,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":699,"context_line":"                for port in pg_ports:"},{"line_number":700,"context_line":"                    additional_links.append({"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba5201f7_7a6ac9ee","line":697,"updated":"2017-01-11 16:17:41.000000000","message":"should it be .startswith(\u0027bond_\u0027)?","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"df2e241c8dc167f75c5c914cd056e3976b7f0d87","unresolved":false,"context_lines":[{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":698,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":699,"context_line":"                for port in pg_ports:"},{"line_number":700,"context_line":"                    additional_links.append({"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a3c09a3_e8c90fae","line":697,"in_reply_to":"9a57fde8_203161a3","updated":"2017-01-12 23:03:40.000000000","message":"Cool, thanks for the info :) maybe just \u0027bond\u0027 is fine then, to allow for \u0027bond-\u0027.","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"802e33a31932308f2667129d380a6d637ae1c8a4","unresolved":false,"context_lines":[{"line_number":694,"context_line":"                for prop in pg.properties:"},{"line_number":695,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":696,"context_line":"                    # start with bond"},{"line_number":697,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":698,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":699,"context_line":"                for port in pg_ports:"},{"line_number":700,"context_line":"                    additional_links.append({"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a57fde8_203161a3","line":697,"in_reply_to":"ba5201f7_7a6ac9ee","updated":"2017-01-12 16:39:08.000000000","message":"I\u0027m not sure about this either, https://git.launchpad.net/cloud-init/tree/cloudinit/sources/helpers/openstack.py#n594 is the check in cloud-init, but obviously it expects _ too after bond (https://git.launchpad.net/cloud-init/tree/tests/unittests/test_datasource/test_configdrive.py#n166)... will change to bond_ just in case :)\n\nEven better example here https://git.launchpad.net/cloud-init/tree/cloudinit/net/sysconfig.py#n259, _ and - seem to be interchangeable in fact.","commit_id":"ef1e6d97ab73d4545071b644c81468c23d3c897a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"d09e654a00cd20b3e07fc67a01bc96f16a6bdc53","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_845aba28","line":684,"updated":"2017-01-16 19:37:21.000000000","message":"nit: Likely worth putting an inline note to clean up p.extra.get(\u0027vif_port_id\u0027) at a later point in time, or not if it makes sense to keep in nova for the time being.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"9fec0bfa847335612e9f9b95cbce39e5f52f9de9","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_e8a7b3ba","line":684,"in_reply_to":"7a3c09a3_8260ced0","updated":"2017-01-17 12:07:48.000000000","message":"Yeah, I like Sam\u0027s idea, though I\u0027d rather make calls to list ports/portgroups so we don\u0027t do lots of API calls here.\n\nI wonder if in the future we should have the vif-list call also return which port(group) the vif is on so we can just use that. Or even better, we could return all the info we need here in vif-list. :)","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_fb56b828","line":684,"in_reply_to":"7a3c09a3_845aba28","updated":"2017-01-17 00:06:35.000000000","message":"I was just thinking that I thought the whole idea wrt attach/detach was to provide an API so that nova/ironic driver didn\u0027t need to know internals, but here we are, looking at internals :-(","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_58afae29","line":684,"in_reply_to":"7a3c09a3_bcededb8","updated":"2017-01-17 15:48:52.000000000","message":"After some discussion that happened among sambetts, jroll, rloo, vsaienko and me, let\u0027s go with what\u0027s here now, and add a TODO to change to proper API calls that will be added in ironic a bit later :)","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"7f42ac6ada86edb9e2f802298563c9d47dafb85a","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_bcededb8","line":684,"in_reply_to":"7a3c09a3_e8a7b3ba","updated":"2017-01-17 13:18:52.000000000","message":"++, I was also thinking that it would be good to return that kind of info in vif_list.\n\nWill update according to this, maybe can do the neutron port list in bulk too.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6637,"name":"Sam Betts","email":"sam@code-smash.net","username":"sambetts"},"change_message_id":"79005559dda23cc2d35567bdcb5b634498c2d16b","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"},{"line_number":682,"context_line":"            for p in collection:"},{"line_number":683,"context_line":"                vif_id \u003d (p.internal_info.get(\u0027tenant_vif_port_id\u0027) or"},{"line_number":684,"context_line":"                          p.extra.get(\u0027vif_port_id\u0027))"},{"line_number":685,"context_line":"                if vif_id:"},{"line_number":686,"context_line":"                    vif_id_to_objects[name][vif_id] \u003d p"},{"line_number":687,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_8260ced0","line":684,"in_reply_to":"7a3c09a3_fb56b828","updated":"2017-01-17 11:19:06.000000000","message":"I don\u0027t think we need to be looking at the internals... IMO we should be using the MAC addresses to look up the ports and portgroups that have been assigned to the VIFs, because at this point every VIF mac address should match a MAC address stored in Ironic. Something like:\n\nfor link in base_metadata[link]:\n    vif_id \u003d link[\u0027vif_id\u0027]\n    # Update our neutron port record to make sure mac address is up to date\n    neutron_port \u003d neutronclient.get_port(vif_id)\n    # See if an Ironic port matches this mac address\n    if ironicclient.get_port(neutron_port[\u0027mac_address\u0027])\n        link.update(....)\n    else:\n        # See if an Ironic portgroup matches this mac address\n        portgroup \u003d ironicclient.get_portgroup(neutron_port[\u0027mac_address\u0027])\n        if portgroup:\n            # Add additional links for portgroup sub-ports\n            pg_ports \u003d ironicclient.get_ports(pg_id\u003dportgroup)\n            for port in pg_ports:\n                links.append(...)\n            link.update(....)","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":695,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":696,"context_line":"                # If address is not set on the portgroup, use the one"},{"line_number":697,"context_line":"                # generated by neutron, otherwise attach has updated neutron"},{"line_number":698,"context_line":"                # port address, reflect it here"},{"line_number":699,"context_line":"                if pg.address:"},{"line_number":700,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":701,"context_line":"                for prop in pg.properties:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_1eba920a","line":698,"updated":"2017-01-17 00:06:35.000000000","message":"nit. If I understand the comment, I\u0027d reverse the order, because the code is if pg.address do-something. So I would think the comment would be more like \u0027if address is set on the port group, it means that it has an updated neutron port address (via ironic\u0027s vif-attach operation). Reflect that here. Otherwise, an address generated by neutron will be used instead (code is elsewhere to handle this case).","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":695,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":696,"context_line":"                # If address is not set on the portgroup, use the one"},{"line_number":697,"context_line":"                # generated by neutron, otherwise attach has updated neutron"},{"line_number":698,"context_line":"                # port address, reflect it here"},{"line_number":699,"context_line":"                if pg.address:"},{"line_number":700,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":701,"context_line":"                for prop in pg.properties:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_b8efb285","line":698,"in_reply_to":"7a3c09a3_1eba920a","updated":"2017-01-17 15:48:52.000000000","message":"Done","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"718140eb0ad9637323a276c8635f47d9395b07b6","unresolved":false,"context_lines":[{"line_number":698,"context_line":"                # port address, reflect it here"},{"line_number":699,"context_line":"                if pg.address:"},{"line_number":700,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":701,"context_line":"                for prop in pg.properties:"},{"line_number":702,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":703,"context_line":"                    # start with bond"},{"line_number":704,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_fee306a2","line":701,"updated":"2017-01-17 00:19:49.000000000","message":"is it worth adding a comment as to what these properties are?\n\neg: These properties are the bonding driver options described at https://www.kernel.org/doc/Documentation/networking/bonding.txt","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":698,"context_line":"                # port address, reflect it here"},{"line_number":699,"context_line":"                if pg.address:"},{"line_number":700,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"},{"line_number":701,"context_line":"                for prop in pg.properties:"},{"line_number":702,"context_line":"                    # cloud-init checks the same way, parameter name has to"},{"line_number":703,"context_line":"                    # start with bond"},{"line_number":704,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_784c6ac8","line":701,"in_reply_to":"7a3c09a3_fee306a2","updated":"2017-01-17 15:48:52.000000000","message":"Done","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":706,"context_line":"                for port in pg_ports:"},{"line_number":707,"context_line":"                    additional_links.append({"},{"line_number":708,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":709,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":710,"context_line":"                    })"},{"line_number":711,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_5e0c1aed","line":708,"updated":"2017-01-17 00:06:35.000000000","message":"there\u0027s no way that this port.uuid is already in base_metadata[\u0027links\u0027]? (or if it is, there isn\u0027t a problem with adding this additional link?)","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e2e6977900245d450215df20e0f2666fa7adaa96","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":706,"context_line":"                for port in pg_ports:"},{"line_number":707,"context_line":"                    additional_links.append({"},{"line_number":708,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":709,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":710,"context_line":"                    })"},{"line_number":711,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_70471e77","line":708,"in_reply_to":"7a3c09a3_3db2d494","updated":"2017-01-17 16:03:36.000000000","message":"Ah, it seems it is not possible in case of neutron actually: https://github.com/openstack/nova/blob/stable/newton/nova/network/neutronv2/api.py#L2198-L2199 devname is not a neutron thing, it is generated in nova internally.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":705,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":706,"context_line":"                for port in pg_ports:"},{"line_number":707,"context_line":"                    additional_links.append({"},{"line_number":708,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":709,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":710,"context_line":"                    })"},{"line_number":711,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a3c09a3_3db2d494","line":708,"in_reply_to":"7a3c09a3_5e0c1aed","updated":"2017-01-17 15:48:52.000000000","message":"https://github.com/openstack/nova/blob/stable/newton/nova/virt/netutils.py#L246-L248 Unless a user sets devname in neutron port to be the same value as the ironic port (which should be selected at random in theory), it is impossible. Not sure if it makes much sense to handle that.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"db03c557d4a2f09897ec1c839c226b9dad02399d","unresolved":false,"context_lines":[{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # TODO(vdrok): change to doing a single \"detailed vif list\" call,"},{"line_number":690,"context_line":"        # when added to ironic API, response to that will contain all"},{"line_number":691,"context_line":"        # necessary information. This will let us to get rid of looking at"},{"line_number":692,"context_line":"        # internal_info/extra fields."},{"line_number":693,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":694,"context_line":"                                       node.uuid, detail\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a3c09a3_8b7610d5","line":691,"updated":"2017-01-17 18:40:04.000000000","message":"nit (only if you do another revision)\n\ns/This will let us to get rid of/Then we can also avoid/","commit_id":"007b05d6d1084ea687295bd210535e7ff1472710"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # internal_info/extra fields."},{"line_number":701,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":702,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":703,"context_line":"        portgroups \u003d self.ironicclient.call(\"portgroup.list\", node\u003dnode.uuid,"},{"line_number":704,"context_line":"                                            detail\u003dTrue)"},{"line_number":705,"context_line":"        vif_id_to_objects \u003d {\u0027ports\u0027: {}, \u0027portgroups\u0027: {}}"},{"line_number":706,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_bdbf4b5f","line":703,"updated":"2017-01-18 19:44:23.000000000","message":"And we\u0027re good version-wise because this is Ironic API 1.23 and we\u0027re using 1.28 in Nova now.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4ef960349ceda5461b8bab4ceb4f526a325c46fa","unresolved":false,"context_lines":[{"line_number":700,"context_line":"        # internal_info/extra fields."},{"line_number":701,"context_line":"        ports \u003d self.ironicclient.call(\"node.list_ports\","},{"line_number":702,"context_line":"                                       node.uuid, detail\u003dTrue)"},{"line_number":703,"context_line":"        portgroups \u003d self.ironicclient.call(\"portgroup.list\", node\u003dnode.uuid,"},{"line_number":704,"context_line":"                                            detail\u003dTrue)"},{"line_number":705,"context_line":"        vif_id_to_objects \u003d {\u0027ports\u0027: {}, \u0027portgroups\u0027: {}}"},{"line_number":706,"context_line":"        for collection, name in ((ports, \u0027ports\u0027), (portgroups, \u0027portgroups\u0027)):"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_a348088c","line":703,"in_reply_to":"7a3c09a3_bdbf4b5f","updated":"2017-01-18 19:57:29.000000000","message":"yup :)","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            vif_id \u003d link[\u0027vif_id\u0027]"},{"line_number":716,"context_line":"            if vif_id in vif_id_to_objects[\u0027portgroups\u0027]:"},{"line_number":717,"context_line":"                pg \u003d vif_id_to_objects[\u0027portgroups\u0027][vif_id]"},{"line_number":718,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":719,"context_line":"                link.update({\u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":720,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":721,"context_line":"                # If address is set on the portgroup, attach call has updated"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_fd3e33d9","line":718,"range":{"start_line":718,"start_character":50,"end_line":718,"end_character":64},"updated":"2017-01-18 19:44:23.000000000","message":"Available in microversion 1.24 so we\u0027re good there...","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":715,"context_line":"            vif_id \u003d link[\u0027vif_id\u0027]"},{"line_number":716,"context_line":"            if vif_id in vif_id_to_objects[\u0027portgroups\u0027]:"},{"line_number":717,"context_line":"                pg \u003d vif_id_to_objects[\u0027portgroups\u0027][vif_id]"},{"line_number":718,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":719,"context_line":"                link.update({\u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":720,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":721,"context_line":"                # If address is set on the portgroup, attach call has updated"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_633380f7","line":718,"range":{"start_line":718,"start_character":30,"end_line":718,"end_character":44},"updated":"2017-01-18 19:44:23.000000000","message":"nit: seems we could create a mapping outside of the links loop we\u0027re in which maps ports to pg.uuid so we don\u0027t need to iterate the list of ports for every iteration of links. But that\u0027s a minor detail.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":716,"context_line":"            if vif_id in vif_id_to_objects[\u0027portgroups\u0027]:"},{"line_number":717,"context_line":"                pg \u003d vif_id_to_objects[\u0027portgroups\u0027][vif_id]"},{"line_number":718,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":719,"context_line":"                link.update({\u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":720,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":721,"context_line":"                # If address is set on the portgroup, attach call has updated"},{"line_number":722,"context_line":"                # neutron port address, reflect it here. Otherwise, an address"},{"line_number":723,"context_line":"                # generated by neutron will be used instead (code is elsewhere"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_2853176e","line":720,"range":{"start_line":719,"start_character":16,"end_line":720,"end_character":47},"updated":"2017-01-18 19:44:23.000000000","message":"Just for my own awareness, are these documented in cloud-init anywhere? I\u0027m not finding anything here:\n\nhttp://cloudinit.readthedocs.io/en/latest/","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef4ff9179aa662f38c0fb568ad0ab1db7be55964","unresolved":false,"context_lines":[{"line_number":716,"context_line":"            if vif_id in vif_id_to_objects[\u0027portgroups\u0027]:"},{"line_number":717,"context_line":"                pg \u003d vif_id_to_objects[\u0027portgroups\u0027][vif_id]"},{"line_number":718,"context_line":"                pg_ports \u003d [p for p in ports if p.portgroup_uuid \u003d\u003d pg.uuid]"},{"line_number":719,"context_line":"                link.update({\u0027type\u0027: \u0027bond\u0027, \u0027bond_mode\u0027: pg.mode,"},{"line_number":720,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":721,"context_line":"                # If address is set on the portgroup, attach call has updated"},{"line_number":722,"context_line":"                # neutron port address, reflect it here. Otherwise, an address"},{"line_number":723,"context_line":"                # generated by neutron will be used instead (code is elsewhere"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_ae61cc13","line":720,"range":{"start_line":719,"start_character":16,"end_line":720,"end_character":47},"in_reply_to":"7a3c09a3_2853176e","updated":"2017-01-18 21:09:05.000000000","message":"the bond mode is part of the bonding driver options (see L729). I don\u0027t know about the other two.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                             \u0027bond_links\u0027: []})"},{"line_number":721,"context_line":"                # If address is set on the portgroup, attach call has updated"},{"line_number":722,"context_line":"                # neutron port address, reflect it here. Otherwise, an address"},{"line_number":723,"context_line":"                # generated by neutron will be used instead (code is elsewhere"},{"line_number":724,"context_line":"                # to handle this case)"},{"line_number":725,"context_line":"                if pg.address:"},{"line_number":726,"context_line":"                    link.update({\u0027ethernet_mac_address\u0027: pg.address})"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_288877c6","line":723,"range":{"start_line":723,"start_character":69,"end_line":723,"end_character":78},"updated":"2017-01-18 19:44:23.000000000","message":"meaning in Ironic, or elsewhere elsewhere?","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":732,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":733,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":734,"context_line":"                for port in pg_ports:"},{"line_number":735,"context_line":"                    additional_links.append({"},{"line_number":736,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_2395f887","line":738,"range":{"start_line":735,"start_character":20,"end_line":738,"end_character":22},"updated":"2017-01-18 19:44:23.000000000","message":"Could this list end up with duplicates in it? i.e. can you have a port in more than one port group for the same node?","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9279d04c5a6983fef17b599ad6af2bcdbeab9058","unresolved":false,"context_lines":[{"line_number":732,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":733,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":734,"context_line":"                for port in pg_ports:"},{"line_number":735,"context_line":"                    additional_links.append({"},{"line_number":736,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_751c176b","line":738,"range":{"start_line":735,"start_character":20,"end_line":738,"end_character":22},"in_reply_to":"7a3c09a3_2395f887","updated":"2017-01-18 19:56:15.000000000","message":"(1:54:24 PM) mriedem: jroll: question the 2nd: can you have a port in more than one portgroup for the same node?\n(1:55:33 PM) jroll: mriedem: no","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4ef960349ceda5461b8bab4ceb4f526a325c46fa","unresolved":false,"context_lines":[{"line_number":732,"context_line":"                    key \u003d prop if prop.startswith(\u0027bond\u0027) else \u0027bond_%s\u0027 % prop"},{"line_number":733,"context_line":"                    link[key] \u003d pg.properties[prop]"},{"line_number":734,"context_line":"                for port in pg_ports:"},{"line_number":735,"context_line":"                    additional_links.append({"},{"line_number":736,"context_line":"                        \u0027id\u0027: port.uuid,"},{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_150d9337","line":738,"range":{"start_line":735,"start_character":20,"end_line":738,"end_character":22},"in_reply_to":"7a3c09a3_2395f887","updated":"2017-01-18 19:57:29.000000000","message":"See review comments in patch set 14. Vladyslav, might be worth adding a comment for others that may wonder.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"},{"line_number":742,"context_line":"                # Ironic updates neutron port\u0027s address during attachment"},{"line_number":743,"context_line":"                link.update({\u0027ethernet_mac_address\u0027: p.address,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_2801573a","line":740,"range":{"start_line":740,"start_character":12,"end_line":740,"end_character":16},"updated":"2017-01-18 19:44:23.000000000","message":"Should this just be \u0027if\u0027? i.e. can the vif_id be in both portgroups and ports?","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f349dfaf92aa1979ecc4d237f281568f80785bd5","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"},{"line_number":742,"context_line":"                # Ironic updates neutron port\u0027s address during attachment"},{"line_number":743,"context_line":"                link.update({\u0027ethernet_mac_address\u0027: p.address,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_c31b547f","line":740,"range":{"start_line":740,"start_character":12,"end_line":740,"end_character":16},"in_reply_to":"7a3c09a3_2801573a","updated":"2017-01-18 19:54:47.000000000","message":"(1:53:36 PM) jroll: mriedem: no, a vif id can only be attached to one thing, AIUI","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef4ff9179aa662f38c0fb568ad0ab1db7be55964","unresolved":false,"context_lines":[{"line_number":737,"context_line":"                        \u0027type\u0027: \u0027phy\u0027, \u0027ethernet_mac_address\u0027: port.address,"},{"line_number":738,"context_line":"                    })"},{"line_number":739,"context_line":"                    link[\u0027bond_links\u0027].append(port.uuid)"},{"line_number":740,"context_line":"            elif vif_id in vif_id_to_objects[\u0027ports\u0027]:"},{"line_number":741,"context_line":"                p \u003d vif_id_to_objects[\u0027ports\u0027][vif_id]"},{"line_number":742,"context_line":"                # Ironic updates neutron port\u0027s address during attachment"},{"line_number":743,"context_line":"                link.update({\u0027ethernet_mac_address\u0027: p.address,"}],"source_content_type":"text/x-python","patch_set":17,"id":"7a3c09a3_ae48ec8b","line":740,"range":{"start_line":740,"start_character":12,"end_line":740,"end_character":16},"in_reply_to":"7a3c09a3_c31b547f","updated":"2017-01-18 21:09:05.000000000","message":"i left it as elif cuz i am not 100% so I\u0027ll leave it for someone else to be braver.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"}],"releasenotes/notes/add-ironic-configdrive-network-metadata-4e8f06dfd6d6d6d4.yaml":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7299b710371096e0d9d8739458abc2cb3aa0234","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Network metadata is being passed to configdrive in ironic virt driver. It"},{"line_number":5,"context_line":"    is necessary to configure port groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7a3c09a3_5e325a60","line":5,"updated":"2017-01-17 00:06:35.000000000","message":"How about something like\n\nUpdates the network metadata that is passed to configdrive by the ironic virt driver. The metadata now includes network information about port groups and their associated ports.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"b66b0d88ab276035c8f96f2bb3f3e19ade6469c1","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Network metadata is being passed to configdrive in ironic virt driver. It"},{"line_number":5,"context_line":"    is necessary to configure port groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7a3c09a3_fd9ccc0f","line":5,"in_reply_to":"7a3c09a3_4bc6019b","updated":"2017-01-17 15:48:52.000000000","message":"Done","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"9fec0bfa847335612e9f9b95cbce39e5f52f9de9","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Network metadata is being passed to configdrive in ironic virt driver. It"},{"line_number":5,"context_line":"    is necessary to configure port groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7a3c09a3_88faaf41","line":5,"in_reply_to":"7a3c09a3_5928b486","updated":"2017-01-17 12:07:48.000000000","message":"I\u0027m fairly certain we already pass network info, but people keep telling me we don\u0027t. /me investigates","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"718140eb0ad9637323a276c8635f47d9395b07b6","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Network metadata is being passed to configdrive in ironic virt driver. It"},{"line_number":5,"context_line":"    is necessary to configure port groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7a3c09a3_5928b486","line":5,"in_reply_to":"7a3c09a3_5e325a60","updated":"2017-01-17 00:19:49.000000000","message":"Oh, even though this is modifying the metadata, based on a comment from Vasyl, it looks like we want to mention that this is new.\n\nSo how about (well, it isn\u0027t that great but maybe someone can improve):\n\nThe ironic virt driver now adds network metadata to the configdrive. This metadata includes network information about port groups and ports. This will be used for configuring port groups (and ports) on the baremetal instance side.","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"7fdb6378ddf4a2c54413d647af8c21c789402f34","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Network metadata is being passed to configdrive in ironic virt driver. It"},{"line_number":5,"context_line":"    is necessary to configure port groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":14,"id":"7a3c09a3_4bc6019b","line":5,"in_reply_to":"7a3c09a3_88faaf41","updated":"2017-01-17 12:16:41.000000000","message":"yeah, confirmed. from an instance in devstack, running nova master at about a month old (4b71d7e221e445a3b28a9db3f8a8874832f39e0d):\n\n    $ mount /dev/vda2 /mnt\n    $ cd /mnt\n    $ ls\n    ec2        openstack\n    $ cd openstack/latest/\n    $ ls\n    meta_data.json     network_data.json  vendor_data.json   vendor_data2.json\n    $ cat network_data.json \n    {\"services\": [], \"networks\": [{\"network_id\": \"3140867c-7ad5-42e2-a7e3-f0114cdcf92e\", \"link\": \"tap5065811c-29\", \"type\": \"ipv4_dhcp\", \"id\": \"network0\"}], \"links\": [{\"ethernet_mac_address\": \"52:54:00:b7:54:20\", \"mtu\": 1500, \"type\": \"unbound\", \"id\": \"tap5065811c-29\", \"vif_id\": \"5065811c-2907-4e17-a3c6-402e769ca698\"}]}\n    $","commit_id":"de10540d17c47206217e9d8ab657beb8344abadd"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"060662367013d165ddce80ad05c651ea2bfe661c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Updates the network metadata that is passed to configdrive by the ironic"},{"line_number":5,"context_line":"    virt driver. The metadata now includes network information about port"},{"line_number":6,"context_line":"    groups and their associated ports. It will be used to configure port"},{"line_number":7,"context_line":"    groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"7a3c09a3_fdd473be","line":4,"range":{"start_line":4,"start_character":70,"end_line":4,"end_character":76},"updated":"2017-01-18 19:44:23.000000000","message":"nit: \"Ironic\" if you need to respin.","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"ef4ff9179aa662f38c0fb568ad0ab1db7be55964","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Updates the network metadata that is passed to configdrive by the ironic"},{"line_number":5,"context_line":"    virt driver. The metadata now includes network information about port"},{"line_number":6,"context_line":"    groups and their associated ports. It will be used to configure port"},{"line_number":7,"context_line":"    groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"7a3c09a3_0e482087","line":4,"range":{"start_line":4,"start_character":70,"end_line":4,"end_character":76},"in_reply_to":"7a3c09a3_556e3b97","updated":"2017-01-18 21:09:05.000000000","message":"Done","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a7865a2b4e984695c74df97b0553aaf759f4bcf0","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Updates the network metadata that is passed to configdrive by the ironic"},{"line_number":5,"context_line":"    virt driver. The metadata now includes network information about port"},{"line_number":6,"context_line":"    groups and their associated ports. It will be used to configure port"},{"line_number":7,"context_line":"    groups on the baremetal instance side."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"7a3c09a3_556e3b97","line":4,"range":{"start_line":4,"start_character":70,"end_line":4,"end_character":76},"in_reply_to":"7a3c09a3_fdd473be","updated":"2017-01-18 20:00:09.000000000","message":"@Matt, in case you wonder why some of us use lower case: http://docs.openstack.org/contributor-guide/writing-style/openstack-components.html :-(","commit_id":"27ade5f3025e871b5c2e633d1d7d0c448ba6686e"}]}
