)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"97a1dd313ba7b09a3ebc645ae74fc976c78a2248","unresolved":false,"context_lines":[{"line_number":10,"context_line":"would failed on migrate prechecking."},{"line_number":11,"context_line":"Change network to shared to avoid network checking failure."},{"line_number":12,"context_line":"Set vif map to blank to avoid vif map checking failure."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"df3967d1_fde78ee3","line":13,"updated":"2017-08-02 08:55:08.000000000","message":"We should have a bug ID","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6c9b0b28d76608cd3985b7e9d5a60598e30d9ade","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-21 08:51:20 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Live migration failed in xapi pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7f287b81_f726f216","line":7,"updated":"2017-08-22 10:19:46.000000000","message":"Thinking about this, we need this to be a BP - and the BP isn\u0027t complete without the os-xenapi change as well (which is needed to use pools).\n\nLet\u0027s make a BP (I don\u0027t think it needs a spec) for this feature, and explain the changes at a high level on the BP.","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7fa3314fc83f2013173546f78bf38670a4593af","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-21 08:51:20 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Live migration failed in xapi pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"7f287b81_53f1fa6a","line":7,"in_reply_to":"7f287b81_f726f216","updated":"2017-08-25 05:13:07.000000000","message":"Will check it","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"54e1ceffc19e02d06e7fcb34cc2f6f525ad9bdff","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-29 07:42:51 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Live migration failed in xapi pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7f287b81_39c72167","line":7,"updated":"2017-08-29 08:23:09.000000000","message":"Suggest change the title as this is implemented as a feature with the BP not via a bug fix.","commit_id":"ee0b91fa48c99f96f7f3ecd4f8c1513104885983"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"e46c3227e47da7ab937dbf3a294e0872eca7cb97","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     naichuans \u003cnaichuan.sun@citrix.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2017-08-29 07:42:51 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Live migration failed in xapi pool"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"7f287b81_443d6029","line":7,"in_reply_to":"7f287b81_39c72167","updated":"2017-08-29 09:06:33.000000000","message":"will change it","commit_id":"ee0b91fa48c99f96f7f3ecd4f8c1513104885983"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"ed8076fc0a396e715076cb85ce41fde3f2c78dac","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."},{"line_number":11,"context_line":"Set network to be shared while create to avoid network checking"},{"line_number":12,"context_line":"failure before live migration."},{"line_number":13,"context_line":"Set vif map to blank to avoid vif map checking failure."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5f2577a7_2ff4a685","line":10,"updated":"2017-09-14 08:11:39.000000000","message":"It seems now this patch is not only cover these items to fix the migration pre-check failure. Suggest update it. It seems the description in the BP supplied more useful information. Suggest rework this commit message by referring to the statements from BP.","commit_id":"4ca12521586affa0182feb76c08afff6c55a292a"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"8a5147fb26f43f86ba6bb2ae2375aecb89f1e3c3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When using multi-node openstack environment in xapi pool, live migrate"},{"line_number":10,"context_line":"would failed on migrate prechecking."},{"line_number":11,"context_line":"Set network to be shared while create to avoid network checking"},{"line_number":12,"context_line":"failure before live migration."},{"line_number":13,"context_line":"Set vif map to blank to avoid vif map checking failure."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":21,"id":"5f2577a7_aa2ce8ab","line":10,"in_reply_to":"5f2577a7_2ff4a685","updated":"2017-09-15 07:43:59.000000000","message":"sorry, forgot this comment. Will change the commit message","commit_id":"4ca12521586affa0182feb76c08afff6c55a292a"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c3de4634da8b044b0e8252073e200e3fbfc97969","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The previous implementation doesn\u0027t support live migration in pool-based multi-hosts OpenStack environments. Modify code to support it"},{"line_number":10,"context_line":"In this patch we will,"},{"line_number":11,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":12,"context_line":"2. Add code to support resource pre-check before live migration."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1f2f7f8d_ee685fbb","line":9,"updated":"2017-09-19 01:09:50.000000000","message":"This line is too long, please refer https://wiki.openstack.org/wiki/GitCommitMessages\n\"Summary of Git commit message structure\"","commit_id":"e483c344dc349e9ba1eebe19549d510bdbbf5646"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6b1fefd011ae42a36e950eed87420712077490c8","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The previous implementation doesn\u0027t support live migration in pool-based multi-hosts OpenStack environments. Modify code to support it"},{"line_number":10,"context_line":"In this patch we will,"},{"line_number":11,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":12,"context_line":"2. Add code to support resource pre-check before live migration."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"1f2f7f8d_0ea96bde","line":9,"in_reply_to":"1f2f7f8d_ee685fbb","updated":"2017-09-19 01:14:32.000000000","message":"will change it.","commit_id":"e483c344dc349e9ba1eebe19549d510bdbbf5646"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"70b8348bdd029b7fee63138fa6431d9686ce3067","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"5f2577a7_c2bdb9d8","line":18,"updated":"2017-09-18 08:52:45.000000000","message":"Depends-On requirements change?\nAlso needs a change in requirements.txt here?","commit_id":"e483c344dc349e9ba1eebe19549d510bdbbf5646"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6b1fefd011ae42a36e950eed87420712077490c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":24,"id":"1f2f7f8d_4e889370","line":18,"in_reply_to":"5f2577a7_c2bdb9d8","updated":"2017-09-19 01:14:32.000000000","message":"Will add the dependency here","commit_id":"e483c344dc349e9ba1eebe19549d510bdbbf5646"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b698122d99f5aa939da75c10e84aac96e2279c5c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_c3dce7e5","line":13,"updated":"2018-03-13 16:15:20.000000000","message":"This patch removes dependence on aggregate based pools right? Is deprecate the right word?","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4bcd4e9702fff8c803e1261f2d7f62f96e7ad641","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_fa6ae1b0","line":13,"in_reply_to":"df7087c5_5f165f57","updated":"2018-03-14 02:20:45.000000000","message":"Will modify it, thanks.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"6c563e8735eb6a014b38b7dce4d9ac44731c2c77","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_5f165f57","line":13,"in_reply_to":"df7087c5_76c7db65","updated":"2018-03-14 01:59:51.000000000","message":"Deprecation is the original plan. Per the PTG meeting, that\u0027s right we should remove the aggregation upcalls. That work should be covered in a new patch in the stack. @naichuan will work on it. Naichuan please update the commit message accordingly. Thanks.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"ff3182994bd0f39918ab407839a3fe89de8af0ac","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_a0be33d2","line":13,"in_reply_to":"df7087c5_76c7db65","updated":"2018-03-16 07:36:08.000000000","message":"Done","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2baa680cf830cc533e991f14c37b90a477712184","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_4a53b66b","line":13,"in_reply_to":"df7087c5_76c7db65","updated":"2018-03-16 06:53:37.000000000","message":"Hi, Dan and Matt. Will remove aggregate upcall in another patch and modify the commit message.\nThank you very much.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"ff3182994bd0f39918ab407839a3fe89de8af0ac","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_e0ee6beb","line":13,"in_reply_to":"df7087c5_c3dce7e5","updated":"2018-03-16 07:36:08.000000000","message":"Done","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6eb7f33e2c4ed1c03777c4b84fce9c1af217692","unresolved":false,"context_lines":[{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Deprecate aggregate-based-pools, Use xapi pool instead."},{"line_number":14,"context_line":"2. Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"3. Add code to support resource clean after live migration."},{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_76c7db65","line":13,"in_reply_to":"df7087c5_c3dce7e5","updated":"2018-03-13 16:21:29.000000000","message":"See my question in vmops about this, but this patch isn\u0027t removing the up-call at all from what I can tell.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6eb7f33e2c4ed1c03777c4b84fce9c1af217692","unresolved":false,"context_lines":[{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"},{"line_number":20,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_b6e813e2","line":19,"updated":"2018-03-13 16:21:29.000000000","message":"This isn\u0027t approved. Specless blueprints should be brought up in the weekly team meeting:\n\nhttps://docs.openstack.org/nova/latest/contributor/blueprints.html#specs\n\nhttps://wiki.openstack.org/wiki/Meetings/Nova","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"58f13f213025583bd5038b4568ff40fd7d8554dd","unresolved":false,"context_lines":[{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"},{"line_number":20,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_b6a685c0","line":19,"in_reply_to":"df7087c5_412ac6da","updated":"2018-03-16 01:47:50.000000000","message":"Matt, thanks. I see the BP is approved now. Cheers:-)","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"52d251e052210ded15d4ad3c543ea27418d37200","unresolved":false,"context_lines":[{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"},{"line_number":20,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_412ac6da","line":19,"in_reply_to":"df7087c5_6b2025f8","updated":"2018-03-15 21:56:40.000000000","message":"Talked about this at the nova meeting today, the blueprint will be approved.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"1177ad5ed9931664540d3eb7240545f121f3227b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"},{"line_number":20,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_6b2025f8","line":19,"in_reply_to":"df7087c5_b6e813e2","updated":"2018-03-15 03:06:50.000000000","message":"Matt and Dan,\n\nI assume we\u0027ve already got agreement for this BP in the PTG:\n\n1. proceed this work with specless BP.\n\n2. submit a new patch on top of this patch to remove aggregate uppercall;\n\nDefinitely we can take this BP to the nova meeting. But the next meeting is at 5am (China time zone) which surely is not good for us to show up. Is it worthy to wait for another week to approve it even we\u0027ve already got agreement?\n\nThanks.\n\nRegards,\nJianghua","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4bcd4e9702fff8c803e1261f2d7f62f96e7ad641","unresolved":false,"context_lines":[{"line_number":16,"context_line":"4. Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"},{"line_number":20,"context_line":"Change-Id: I6437a315f1400a73f7a149bed5550f6d6dd1406f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"df7087c5_faaf41e0","line":19,"in_reply_to":"df7087c5_b6e813e2","updated":"2018-03-14 02:20:45.000000000","message":"Will check it, thank you.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The previous implementation doesn\u0027t support live migration in"},{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Support live migration in XAPI pool:"},{"line_number":14,"context_line":"    -Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"    -Add code to support resource clean after live migration."},{"line_number":16,"context_line":"    -Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"bf659307_f058cb8a","line":16,"range":{"start_line":9,"start_character":0,"end_line":16,"end_character":58},"updated":"2018-04-12 15:00:20.000000000","message":"You don\u0027t need to provide the \"sausage-making\" in the commit message. Just focus on summarizing why the patch is needed.\n\nSomething like this would be fine:\n\n Adds support for live-migrating instances when XenAPI storage\n pools are utilized. Previous code requires nova host aggregates,\n which require an upcall from the compute node to the nova-api\n service. This upcall is prohibited in a cellsv2 environment.","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a167b514e4c2f1bccb515b16357602a6f8f8cc20","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"xenapi: Support live migration in pooled multi-nodes environment"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The previous implementation doesn\u0027t support live migration in"},{"line_number":10,"context_line":"pool-based multi-hosts OpenStack environments. Modify code to"},{"line_number":11,"context_line":"support it."},{"line_number":12,"context_line":"In this patch we will,"},{"line_number":13,"context_line":"1. Support live migration in XAPI pool:"},{"line_number":14,"context_line":"    -Add code to support resource pre-check before live migration."},{"line_number":15,"context_line":"    -Add code to support resource clean after live migration."},{"line_number":16,"context_line":"    -Add code to support using local storage in xapi pool."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Depends-On: I80007bb897a1f7eda47ebda82e08fe270f97ff40"},{"line_number":19,"context_line":"Implements: blueprint live-migration-in-xapi-pool"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":41,"id":"bf659307_d770f374","line":16,"range":{"start_line":9,"start_character":0,"end_line":16,"end_character":58},"in_reply_to":"bf659307_f058cb8a","updated":"2018-04-13 01:14:50.000000000","message":"Thank you for the guild, Jay.","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"}],"nova/tests/unit/virt/xenapi/test_vif.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b698122d99f5aa939da75c10e84aac96e2279c5c","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            mock_delete_linux_bridge):"},{"line_number":308,"context_line":"        mock_get_network.return_value \u003d \u0027fake_network\u0027"},{"line_number":309,"context_line":"        instance \u003d {\u0027name\u0027: \u0027fake_instance\u0027}"},{"line_number":310,"context_line":"        # self._session \u003d mock.Mock()"},{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_834d8fc5","line":310,"updated":"2018-03-13 16:15:20.000000000","message":"This should be removed.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"ff3182994bd0f39918ab407839a3fe89de8af0ac","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            mock_delete_linux_bridge):"},{"line_number":308,"context_line":"        mock_get_network.return_value \u003d \u0027fake_network\u0027"},{"line_number":309,"context_line":"        instance \u003d {\u0027name\u0027: \u0027fake_instance\u0027}"},{"line_number":310,"context_line":"        # self._session \u003d mock.Mock()"},{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_20d22329","line":310,"in_reply_to":"df7087c5_834d8fc5","updated":"2018-03-16 07:36:08.000000000","message":"Done","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4bcd4e9702fff8c803e1261f2d7f62f96e7ad641","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            mock_delete_linux_bridge):"},{"line_number":308,"context_line":"        mock_get_network.return_value \u003d \u0027fake_network\u0027"},{"line_number":309,"context_line":"        instance \u003d {\u0027name\u0027: \u0027fake_instance\u0027}"},{"line_number":310,"context_line":"        # self._session \u003d mock.Mock()"},{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_3a7b797b","line":310,"in_reply_to":"df7087c5_834d8fc5","updated":"2018-03-14 02:20:45.000000000","message":"Will remove it, thanks, Dan.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":274,"context_line":"        self.mock_patch_object("},{"line_number":275,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"},{"line_number":276,"context_line":"            return_val\u003d\u0027fake_vif\u0027)"},{"line_number":277,"context_line":"        self.mock_patch_object("},{"line_number":278,"context_line":"            self._session.VIF, \u0027get_all_records_where\u0027,"},{"line_number":279,"context_line":"            return_val\u003d{\u0027rec\u0027: \u0027fake_rec\u0027})"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_741cdac0","line":276,"range":{"start_line":276,"start_character":23,"end_line":276,"end_character":33},"updated":"2018-04-10 13:24:07.000000000","message":"This should be a list of vifs right?","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":273,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":274,"context_line":"        self.mock_patch_object("},{"line_number":275,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"},{"line_number":276,"context_line":"            return_val\u003d\u0027fake_vif\u0027)"},{"line_number":277,"context_line":"        self.mock_patch_object("},{"line_number":278,"context_line":"            self._session.VIF, \u0027get_all_records_where\u0027,"},{"line_number":279,"context_line":"            return_val\u003d{\u0027rec\u0027: \u0027fake_rec\u0027})"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_5128b6e0","line":276,"range":{"start_line":276,"start_character":23,"end_line":276,"end_character":33},"in_reply_to":"bf659307_741cdac0","updated":"2018-04-11 01:10:53.000000000","message":"Yes, you are right. Although it doesn\u0027t affect test result, I should use a more reasonable fake return value.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._session.network.get_bridge.assert_called_once_with("},{"line_number":289,"context_line":"            \u0027fake_network\u0027)"},{"line_number":290,"context_line":"        self._session.network.destroy.assert_not_called()"},{"line_number":291,"context_line":"        self.assertEqual(mock_ovs_del_port.call_count, 2)"},{"line_number":292,"context_line":"        self.assertEqual(mock_delete_linux_port.call_count, 2)"},{"line_number":293,"context_line":"        self.assertTrue(mock_delete_linux_bridge.called)"},{"line_number":294,"context_line":"        self.assertTrue(mock_ovs_del_br.called)"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_94cbae51","line":292,"range":{"start_line":291,"start_character":8,"end_line":292,"end_character":62},"updated":"2018-04-10 13:24:07.000000000","message":"nit: swap the argument order here, which will matter if this assertion ever fails because the MismatchError in the output will have the wrong (expected, actual) values.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        self._session.network.get_bridge.assert_called_once_with("},{"line_number":289,"context_line":"            \u0027fake_network\u0027)"},{"line_number":290,"context_line":"        self._session.network.destroy.assert_not_called()"},{"line_number":291,"context_line":"        self.assertEqual(mock_ovs_del_port.call_count, 2)"},{"line_number":292,"context_line":"        self.assertEqual(mock_delete_linux_port.call_count, 2)"},{"line_number":293,"context_line":"        self.assertTrue(mock_delete_linux_bridge.called)"},{"line_number":294,"context_line":"        self.assertTrue(mock_ovs_del_br.called)"},{"line_number":295,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_51faf674","line":292,"range":{"start_line":291,"start_character":8,"end_line":292,"end_character":62},"in_reply_to":"bf659307_94cbae51","updated":"2018-04-11 01:10:53.000000000","message":"Got it, thanks, Matt.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self._session.network.destroy.assert_not_called()"},{"line_number":291,"context_line":"        self.assertEqual(mock_ovs_del_port.call_count, 2)"},{"line_number":292,"context_line":"        self.assertEqual(mock_delete_linux_port.call_count, 2)"},{"line_number":293,"context_line":"        self.assertTrue(mock_delete_linux_bridge.called)"},{"line_number":294,"context_line":"        self.assertTrue(mock_ovs_del_br.called)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_bridge\u0027)"},{"line_number":297,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_port\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_14dd5e13","line":294,"range":{"start_line":293,"start_character":8,"end_line":294,"end_character":47},"updated":"2018-04-10 13:24:07.000000000","message":"nit: you could also use the \u0027assert_called()\u0027 method on the mocks, which might provide a more useful assertion error message if it fails.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":290,"context_line":"        self._session.network.destroy.assert_not_called()"},{"line_number":291,"context_line":"        self.assertEqual(mock_ovs_del_port.call_count, 2)"},{"line_number":292,"context_line":"        self.assertEqual(mock_delete_linux_port.call_count, 2)"},{"line_number":293,"context_line":"        self.assertTrue(mock_delete_linux_bridge.called)"},{"line_number":294,"context_line":"        self.assertTrue(mock_ovs_del_br.called)"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_bridge\u0027)"},{"line_number":297,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_delete_linux_port\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_71f7fa8c","line":294,"range":{"start_line":293,"start_character":8,"end_line":294,"end_character":47},"in_reply_to":"bf659307_14dd5e13","updated":"2018-04-11 01:10:53.000000000","message":"Will switch to that function.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            mock_delete_linux_bridge):"},{"line_number":308,"context_line":"        mock_get_network.return_value \u003d \u0027fake_network\u0027"},{"line_number":309,"context_line":"        instance \u003d {\u0027name\u0027: \u0027fake_instance\u0027}"},{"line_number":310,"context_line":"        # self._session \u003d mock.Mock()"},{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_34650246","line":310,"range":{"start_line":310,"start_character":8,"end_line":310,"end_character":37},"updated":"2018-04-10 13:24:07.000000000","message":"Looks like this should be removed.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            mock_delete_linux_bridge):"},{"line_number":308,"context_line":"        mock_get_network.return_value \u003d \u0027fake_network\u0027"},{"line_number":309,"context_line":"        instance \u003d {\u0027name\u0027: \u0027fake_instance\u0027}"},{"line_number":310,"context_line":"        # self._session \u003d mock.Mock()"},{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_d12b66e8","line":310,"range":{"start_line":310,"start_character":8,"end_line":310,"end_character":37},"in_reply_to":"bf659307_34650246","updated":"2018-04-11 01:10:53.000000000","message":"will remove it.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":311,"context_line":"        self._session.host_ref \u003d \u0027fake_host_ref\u0027"},{"line_number":312,"context_line":"        self.mock_patch_object("},{"line_number":313,"context_line":"            self._session.network, \u0027get_VIFs\u0027,"},{"line_number":314,"context_line":"            return_val\u003d\u0027fake_vif\u0027)"},{"line_number":315,"context_line":"        self.mock_patch_object("},{"line_number":316,"context_line":"            self._session.VIF, \u0027get_all_records_where\u0027,"},{"line_number":317,"context_line":"            return_val\u003d{\u0027rec\u0027: \u0027fake_rec\u0027})"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_f4854ad0","line":314,"updated":"2018-04-10 13:24:07.000000000","message":"same","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":374,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_get_network_by_vif\u0027)"},{"line_number":375,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver,"},{"line_number":376,"context_line":"                       \u0027_get_patch_port_pair_names\u0027)"},{"line_number":377,"context_line":"    def test_delete_network_and_bridge_del_br_exc(self, mock_get_port_name,"},{"line_number":378,"context_line":"                                                  mock_get_network,"},{"line_number":379,"context_line":"                                                  mock_find_network,"},{"line_number":380,"context_line":"                                                  mock_ovs_del_port,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_74d5bae4","line":377,"range":{"start_line":377,"start_character":8,"end_line":377,"end_character":49},"updated":"2018-04-10 13:24:07.000000000","message":"I\u0027m having a hard time telling what the difference is between this test and test_delete_network_and_bridge_del_port_exc above, they look nearly identical except for the assertion on the mock_ovs_del_br mock. Can you add some comments to the tests to explain what they are doing which will help people understand how they are different?","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":374,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver, \u0027_get_network_by_vif\u0027)"},{"line_number":375,"context_line":"    @mock.patch.object(vif.XenAPIOpenVswitchDriver,"},{"line_number":376,"context_line":"                       \u0027_get_patch_port_pair_names\u0027)"},{"line_number":377,"context_line":"    def test_delete_network_and_bridge_del_br_exc(self, mock_get_port_name,"},{"line_number":378,"context_line":"                                                  mock_get_network,"},{"line_number":379,"context_line":"                                                  mock_find_network,"},{"line_number":380,"context_line":"                                                  mock_ovs_del_port,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_713cda2e","line":377,"range":{"start_line":377,"start_character":8,"end_line":377,"end_character":49},"in_reply_to":"bf659307_74d5bae4","updated":"2018-04-11 01:10:53.000000000","message":"Sorry, it is not easy to understand indeed. Will add some comments to make it clear.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4a4ac31206e81d97162cd76540d85a04c4bda12","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        self._session.network.get_VIFs.return_value \u003d None"},{"line_number":410,"context_line":"        self._session.network.get_bridge.return_value \u003d \u0027fake_bridge\u0027"},{"line_number":411,"context_line":"        mock_get_port_name.return_value \u003d [\u0027fake_port\u0027, \u0027fake_tap\u0027]"},{"line_number":412,"context_line":"        mock_ovs_del_br.side_effect \u003d test.TestingException"},{"line_number":413,"context_line":"        self.assertRaises(exception.VirtualInterfaceUnplugException,"},{"line_number":414,"context_line":"                          self.ovs_driver.delete_network_and_bridge, instance,"},{"line_number":415,"context_line":"                          \u0027fake_vif_id\u0027)"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_618ab76a","line":412,"range":{"start_line":412,"start_character":8,"end_line":412,"end_character":23},"updated":"2018-04-11 15:36:05.000000000","message":"OK now I see this. In the test above, port deletion fails (mock_ovs_del_port) but here bridge deletion fails.","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"407f8832031b05ed90f21bd4c3b77e71f69df1c9","unresolved":false,"context_lines":[{"line_number":409,"context_line":"        self._session.network.get_VIFs.return_value \u003d None"},{"line_number":410,"context_line":"        self._session.network.get_bridge.return_value \u003d \u0027fake_bridge\u0027"},{"line_number":411,"context_line":"        mock_get_port_name.return_value \u003d [\u0027fake_port\u0027, \u0027fake_tap\u0027]"},{"line_number":412,"context_line":"        mock_ovs_del_br.side_effect \u003d test.TestingException"},{"line_number":413,"context_line":"        self.assertRaises(exception.VirtualInterfaceUnplugException,"},{"line_number":414,"context_line":"                          self.ovs_driver.delete_network_and_bridge, instance,"},{"line_number":415,"context_line":"                          \u0027fake_vif_id\u0027)"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_13cea259","line":412,"range":{"start_line":412,"start_character":8,"end_line":412,"end_character":23},"in_reply_to":"bf659307_618ab76a","updated":"2018-04-12 00:54:36.000000000","message":":)","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"}],"nova/tests/unit/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":3502,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        self.stubs.Set(vm_utils, \"safe_find_sr\", lambda _x: \"asdf\")"},{"line_number":3505,"context_line":"        self.stubs.Set(self.conn._vmops._session, \"host_ref\","},{"line_number":3506,"context_line":"                       \"fake_host_ref\")"},{"line_number":3507,"context_line":"        expected \u003d {\u0027block_migration\u0027: True,"},{"line_number":3508,"context_line":"                    \u0027is_volume_backed\u0027: False,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_142b1eeb","line":3505,"range":{"start_line":3505,"start_character":8,"end_line":3505,"end_character":22},"updated":"2018-04-10 13:24:07.000000000","message":"Can you please use mock instead of self.stubs.Set (which relies on mox). We\u0027re trying to stop use of mox.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":3502,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3503,"context_line":""},{"line_number":3504,"context_line":"        self.stubs.Set(vm_utils, \"safe_find_sr\", lambda _x: \"asdf\")"},{"line_number":3505,"context_line":"        self.stubs.Set(self.conn._vmops._session, \"host_ref\","},{"line_number":3506,"context_line":"                       \"fake_host_ref\")"},{"line_number":3507,"context_line":"        expected \u003d {\u0027block_migration\u0027: True,"},{"line_number":3508,"context_line":"                    \u0027is_volume_backed\u0027: False,"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_917f2ede","line":3505,"range":{"start_line":3505,"start_character":8,"end_line":3505,"end_character":22},"in_reply_to":"bf659307_142b1eeb","updated":"2018-04-11 01:10:53.000000000","message":"Will change it.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":3660,"context_line":"    def test_check_can_live_migrate_works(self, mock_get_by_host):"},{"line_number":3661,"context_line":"        stubs.stubout_session(self.stubs, stubs.FakeSessionForVMTests)"},{"line_number":3662,"context_line":"        self.conn \u003d xenapi_conn.XenAPIDriver(fake.FakeVirtAPI(), False)"},{"line_number":3663,"context_line":"        self.stubs.Set(self.conn._vmops._session, \"host_ref\","},{"line_number":3664,"context_line":"                       \"fake_host_ref\")"},{"line_number":3665,"context_line":"        metadata \u003d {\u0027host\u0027: \u0027test_host_uuid\u0027}"},{"line_number":3666,"context_line":"        aggregate \u003d objects.Aggregate(metadata\u003dmetadata)"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_342e62fa","line":3663,"range":{"start_line":3663,"start_character":8,"end_line":3663,"end_character":22},"updated":"2018-04-10 13:24:07.000000000","message":"same","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"}],"nova/virt/xenapi/fake.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":353,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":354,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":355,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":356,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":357,"context_line":"    return pif_ref"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_2a5e9c43","line":355,"updated":"2017-08-15 09:00:52.000000000","message":"host_ref is passed in - is that actually a uuid or a ref?\nI worry that if we don\u0027t actually have the same host ref then we can\u0027t test pooled scenarios properly?","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":353,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":354,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":355,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":356,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":357,"context_line":"    return pif_ref"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_c5dee30f","line":355,"in_reply_to":"9f436f4f_2a5e9c43","updated":"2017-08-15 09:17:56.000000000","message":"Will check it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"66cacaa369ce1fa1ce2718450202e5fdfd17c451","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":353,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":354,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":355,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":356,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":357,"context_line":"    return pif_ref"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_eef50ccc","line":355,"in_reply_to":"9f436f4f_c5dee30f","updated":"2017-08-17 07:10:30.000000000","message":"Hi,Bob, I got the data using session.xenapi.PIF.get_all_records(), the return data should be a host ref.\n\u0027host\u0027: \u0027OpaqueRef:4fea3c67-5579-7b86-24d0-052c819114ca\u0027\nBecause we modify the below function in vmops.py, and add \"host\" as a filter, so we need to add it in the unit test as well.\nhttps://review.openstack.org/#/c/489451/12/nova/virt/xenapi/vmops.py line2211","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"37ed2ba1bca5e4aa0ac5b66017db41945c0ca898","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":357,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":358,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":359,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":360,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":361,"context_line":"    return pif_ref"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_ad56ae5b","line":359,"range":{"start_line":359,"start_character":39,"end_line":359,"end_character":52},"updated":"2018-03-28 09:06:07.000000000","message":"Is this really a fake_host_ref?  (should it be host_ref above?) or is this the host name?","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f466a5c72f1df76e663de1d6d1b1dea3859d19ca","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":357,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":358,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":359,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":360,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":361,"context_line":"    return pif_ref"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_ce46797d","line":359,"range":{"start_line":359,"start_character":39,"end_line":359,"end_character":52},"in_reply_to":"bf659307_ad56ae5b","updated":"2018-03-28 10:00:07.000000000","message":"Will confirm it.","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"dab863d9ca4137597464dc192bc07a5fd4ee3dd0","unresolved":false,"context_lines":[{"line_number":356,"context_line":"                              \u0027IPv6\u0027: \u0027\u0027,"},{"line_number":357,"context_line":"                              \u0027uuid\u0027: \u0027\u0027,"},{"line_number":358,"context_line":"                              \u0027management\u0027: \u0027true\u0027,"},{"line_number":359,"context_line":"                              \u0027host\u0027: \u0027fake_host_ref\u0027})"},{"line_number":360,"context_line":"    _db_content[\u0027PIF\u0027][pif_ref][\u0027uuid\u0027] \u003d pif_ref"},{"line_number":361,"context_line":"    return pif_ref"},{"line_number":362,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_398a8b69","line":359,"range":{"start_line":359,"start_character":39,"end_line":359,"end_character":52},"in_reply_to":"bf659307_ce46797d","updated":"2018-04-03 09:24:45.000000000","message":"Just confirmed it is host ref like:\n\u0027host\u0027: \u0027OpaqueRef:52b18304-8dc6-4e64-637d-4c053f36dfcd\u0027","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"}],"nova/virt/xenapi/network_utils.py":[{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"b61ea276a580df7194c428b58b4ab35ebffe1b4a","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def find_network_with_name_label(session, name_label):"},{"line_number":26,"context_line":"    networks \u003d session.network.get_by_name_label(name_label)"},{"line_number":27,"context_line":"    if len(networks) \u003d\u003d 1:"},{"line_number":28,"context_line":"        return networks[0]"},{"line_number":29,"context_line":"    elif len(networks) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_9707bcca","line":26,"updated":"2017-08-31 08:48:45.000000000","message":"This is clearly using the XAPI network to find the one with the given name label, so if it\u0027s destroyed before this call then we won\u0027t find the network.","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6edcc7d747ec897de40eaa0a63dbabeb38ba4655","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def find_network_with_name_label(session, name_label):"},{"line_number":26,"context_line":"    networks \u003d session.network.get_by_name_label(name_label)"},{"line_number":27,"context_line":"    if len(networks) \u003d\u003d 1:"},{"line_number":28,"context_line":"        return networks[0]"},{"line_number":29,"context_line":"    elif len(networks) \u003e 1:"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_7a665e2c","line":26,"in_reply_to":"7f287b81_9707bcca","updated":"2017-09-01 07:03:09.000000000","message":"Will check it","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f2f1e8c381a0d8e758a25bbe33c6ee61b8b14b2a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                _(\u0027Found no network for bridge %s\u0027) % bridge)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_network_shared(session, network_ref):"},{"line_number":56,"context_line":"    other_config \u003d session.network.get_other_config(network_ref)"},{"line_number":57,"context_line":"    return other_config.get(\u0027assume_network_is_shared\u0027, \u0027false\u0027) \u003d\u003d \u0027true\u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_f6fd2b6e","line":55,"updated":"2018-03-13 16:27:10.000000000","message":"What is this for? I don\u0027t see it used anywhere in this patch.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"ff3182994bd0f39918ab407839a3fe89de8af0ac","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                _(\u0027Found no network for bridge %s\u0027) % bridge)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_network_shared(session, network_ref):"},{"line_number":56,"context_line":"    other_config \u003d session.network.get_other_config(network_ref)"},{"line_number":57,"context_line":"    return other_config.get(\u0027assume_network_is_shared\u0027, \u0027false\u0027) \u003d\u003d \u0027true\u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_80b76ff5","line":55,"in_reply_to":"df7087c5_f6fd2b6e","updated":"2018-03-16 07:36:08.000000000","message":"Done","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4bcd4e9702fff8c803e1261f2d7f62f96e7ad641","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                _(\u0027Found no network for bridge %s\u0027) % bridge)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def is_network_shared(session, network_ref):"},{"line_number":56,"context_line":"    other_config \u003d session.network.get_other_config(network_ref)"},{"line_number":57,"context_line":"    return other_config.get(\u0027assume_network_is_shared\u0027, \u0027false\u0027) \u003d\u003d \u0027true\u0027"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_7a06d1d0","line":55,"in_reply_to":"df7087c5_f6fd2b6e","updated":"2018-03-14 02:20:45.000000000","message":"Sorry, it should be a modification out of date.\nWill remove it. Thanks, Matt.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"}],"nova/virt/xenapi/vif.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"153f27110402e013ab652007af0c9ad731eb5d22","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            # source and target VM will be connected to the same"},{"line_number":306,"context_line":"            # interim network."},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        self.delete_network_and_bridge(instance, vif)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":311,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"df3967d1_1985cf08","line":308,"updated":"2017-08-02 02:04:45.000000000","message":"As we chatted in slack before, we should refactor this function to split the resources to pool shared resources and local ones. And process them separately.\ne.g. the network is pool shared and the linux bridges are local. For shared resources, we only remove them once none in the pool use them; but should delete all local stuffs.","commit_id":"214fc83b1db807fd3cc3f2ed178db99f0a171ada"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1e03ab3fa4aed6807a52abe24dea4fc82b66fec4","unresolved":false,"context_lines":[{"line_number":305,"context_line":"            # source and target VM will be connected to the same"},{"line_number":306,"context_line":"            # interim network."},{"line_number":307,"context_line":"            return"},{"line_number":308,"context_line":"        self.delete_network_and_bridge(instance, vif)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":311,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":1,"id":"df3967d1_f9ea0baa","line":308,"in_reply_to":"df3967d1_1985cf08","updated":"2017-08-02 02:09:32.000000000","message":"will check that","commit_id":"214fc83b1db807fd3cc3f2ed178db99f0a171ada"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"dd1bd1f01c35e9f90bf3ac6f4a95f7abb508e4e9","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # interim network."},{"line_number":307,"context_line":"            delete_network(instance, vif)"},{"line_number":308,"context_line":"            delete_bridge(instance, vif)"},{"line_number":309,"context_line":"        elif network_utils.is_network_shared(network):"},{"line_number":310,"context_line":"            delete_bridge(instance, vif)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def delete_network(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_676e6d96","line":309,"updated":"2017-08-02 07:49:49.000000000","message":"seems it should always try to clear the bridges if they exist; but only delete the network if no vif plugged into the network.","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"97a1dd313ba7b09a3ebc645ae74fc976c78a2248","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # interim network."},{"line_number":307,"context_line":"            delete_network(instance, vif)"},{"line_number":308,"context_line":"            delete_bridge(instance, vif)"},{"line_number":309,"context_line":"        elif network_utils.is_network_shared(network):"},{"line_number":310,"context_line":"            delete_bridge(instance, vif)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def delete_network(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_dd384a3e","line":309,"in_reply_to":"df3967d1_676e6d96","updated":"2017-08-02 08:55:08.000000000","message":"Agreed - this code is confusing to me; perhaps have another explanatory comment here for why we are deleting the bridge here?","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f6e1b0e326eeb3894a0ce1ea46e513a3fb832e0c","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            # interim network."},{"line_number":307,"context_line":"            delete_network(instance, vif)"},{"line_number":308,"context_line":"            delete_bridge(instance, vif)"},{"line_number":309,"context_line":"        elif network_utils.is_network_shared(network):"},{"line_number":310,"context_line":"            delete_bridge(instance, vif)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def delete_network(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_19e486e0","line":309,"in_reply_to":"df3967d1_dd384a3e","updated":"2017-08-03 01:57:43.000000000","message":"Because we set the network to shared when creating a VM, so the network should alway be shared now. Will check if we have another way to fix it and add a detail description.","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"97a1dd313ba7b09a3ebc645ae74fc976c78a2248","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            delete_bridge(instance, vif)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def delete_network(self, instance, vif):"},{"line_number":313,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":314,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":315,"context_line":"            self._session, net_name)"},{"line_number":316,"context_line":"        if network is None:"},{"line_number":317,"context_line":"            LOG.debug(\"Didn\u0027t find network by name %s\", net_name,"},{"line_number":318,"context_line":"                      instance\u003dinstance)"},{"line_number":319,"context_line":"            return"},{"line_number":320,"context_line":"        self._session.network.destroy(network)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def delete_bridge(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_fdd1cece","line":319,"range":{"start_line":313,"start_character":0,"end_line":319,"end_character":18},"updated":"2017-08-02 08:55:08.000000000","message":"This is copy/pasted code from below which isn\u0027t nice - if it\u0027s a helper method to get the network, then move that to a utility function.\nFor example, the call to delete_network above could just be  _get_network_ref() followed by self._session.network.destroy(network), then this function wouldn\u0027t be needed?","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f6e1b0e326eeb3894a0ce1ea46e513a3fb832e0c","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            delete_bridge(instance, vif)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def delete_network(self, instance, vif):"},{"line_number":313,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":314,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":315,"context_line":"            self._session, net_name)"},{"line_number":316,"context_line":"        if network is None:"},{"line_number":317,"context_line":"            LOG.debug(\"Didn\u0027t find network by name %s\", net_name,"},{"line_number":318,"context_line":"                      instance\u003dinstance)"},{"line_number":319,"context_line":"            return"},{"line_number":320,"context_line":"        self._session.network.destroy(network)"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":"    def delete_bridge(self, instance, vif):"}],"source_content_type":"text/x-python","patch_set":3,"id":"df3967d1_d99b9e63","line":319,"range":{"start_line":313,"start_character":0,"end_line":319,"end_character":18},"in_reply_to":"df3967d1_fdd1cece","updated":"2017-08-03 01:57:43.000000000","message":"Will check if it is better to set a utility function. If needed, it should act as get a network according to the vif.","commit_id":"8f2b38dc2ff1a6ae8a32127dc8f1c43f8d76e0bc"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"143633f5962d8ae23770c377c10e6ed104658a9d","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            self._session.network.destroy(network)"},{"line_number":303,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":304,"context_line":"        elif self._get_host_from_vif(vif) !\u003d self._session.host_ref:"},{"line_number":305,"context_line":"            # for resize/migrate on local host, vifs on both of the"},{"line_number":306,"context_line":"            # source and target VM will be connected to the same"},{"line_number":307,"context_line":"            # interim network. If the VM is resident on a remote host,"},{"line_number":308,"context_line":"            # linux bridge on current host will be deleted."}],"source_content_type":"text/x-python","patch_set":6,"id":"df3967d1_59a1bc45","line":305,"range":{"start_line":305,"start_character":24,"end_line":305,"end_character":45},"updated":"2017-08-04 11:08:49.000000000","message":"\u003d\u003e intra-pool migration?","commit_id":"2a338113ceaddeb90c57652bd123042f619a86f0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"143633f5962d8ae23770c377c10e6ed104658a9d","unresolved":false,"context_lines":[{"line_number":356,"context_line":"            raise exception.VirtualInterfaceUnplugException("},{"line_number":357,"context_line":"                reason\u003d_(\"Failed to delete bridge\"))"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def _get_network_from_vif(self, vif):"},{"line_number":360,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif)"},{"line_number":361,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":362,"context_line":"            self._session, net_name)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df3967d1_f9a87020","line":359,"range":{"start_line":359,"start_character":21,"end_line":359,"end_character":25},"updated":"2017-08-04 11:08:49.000000000","message":"nit: \u003d\u003e by","commit_id":"2a338113ceaddeb90c57652bd123042f619a86f0"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"143633f5962d8ae23770c377c10e6ed104658a9d","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            LOG.debug(\"Couldn\u0027t find network by name %s\", net_name)"},{"line_number":365,"context_line":"        return network"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"    def _get_host_from_vif(self, vif):"},{"line_number":368,"context_line":"        network \u003d self._get_network_from_vif(vif)"},{"line_number":369,"context_line":"        if not network:"},{"line_number":370,"context_line":"            raise Exception(\"Couldn\u0027t find network on neutron port %s\" % vif)"}],"source_content_type":"text/x-python","patch_set":6,"id":"df3967d1_b9642823","line":367,"range":{"start_line":367,"start_character":18,"end_line":367,"end_character":22},"updated":"2017-08-04 11:08:49.000000000","message":"nit: \u003d\u003e by","commit_id":"2a338113ceaddeb90c57652bd123042f619a86f0"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"638599ef15fb1f50cf27eb85b0a16fac25447412","unresolved":false,"context_lines":[{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":299,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":300,"context_line":"        vifs \u003d self._session.network.get_VIFs(network)"},{"line_number":301,"context_line":"        if not vifs:"},{"line_number":302,"context_line":"            # destory network"},{"line_number":303,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f436f4f_81e726e5","line":300,"range":{"start_line":300,"start_character":15,"end_line":300,"end_character":54},"updated":"2017-08-10 03:34:38.000000000","message":"As network is get from above Line:299 function self._get_network_by_vif() and this function maybe return None, see Line:372, the if you using None to get_VIFs(), will xapi raise exception?","commit_id":"6ed4a308bd26b314e0a2b62dc016b8fbed14f428"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"791d2ec9fbff96fe97310615a5ec7fa999f92efa","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def unplug(self, instance, vif, vm_ref):"},{"line_number":288,"context_line":"        \"\"\"unplug vif:"},{"line_number":289,"context_line":"        1. delete the patch port pair between the integration bridge and"},{"line_number":290,"context_line":"           the qbr linux bridge(if exist) and the interim network."},{"line_number":291,"context_line":"        2. destroy the interim network"},{"line_number":292,"context_line":"        3. delete the OVS bridge service for the interim network"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_3d828801","line":289,"updated":"2017-08-14 05:37:53.000000000","message":"Need update the comments. moving to the function of delete_network_and...?","commit_id":"973fcabd6c085ffcd7c82af1239de238602b9d97"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"791d2ec9fbff96fe97310615a5ec7fa999f92efa","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                    reason\u003d_(\"Failed to destroy network\"))"},{"line_number":311,"context_line":"            # delete bridge"},{"line_number":312,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":313,"context_line":"        elif self._get_host_by_vif(vif) !\u003d self._session.host_ref:"},{"line_number":314,"context_line":"            # for resize/intra-pool migrate, vifs on both of the"},{"line_number":315,"context_line":"            # source and target VM will be connected to the same"},{"line_number":316,"context_line":"            # interim network. If the VM is resident on a remote host,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_bdc31838","line":313,"updated":"2017-08-14 05:37:53.000000000","message":"Should check each vif from vifs returned from self._session.network.get_VIFs(network)?","commit_id":"973fcabd6c085ffcd7c82af1239de238602b9d97"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"791d2ec9fbff96fe97310615a5ec7fa999f92efa","unresolved":false,"context_lines":[{"line_number":339,"context_line":"                  \u0027bridge\u003d%(br)s\u0027,"},{"line_number":340,"context_line":"                  {\u0027network\u0027: network, \u0027br\u0027: bridge_name})"},{"line_number":341,"context_line":"        try:"},{"line_number":342,"context_line":"                # delete bridge if it still exists."},{"line_number":343,"context_line":"                # As there is patch port existing on this bridge when"},{"line_number":344,"context_line":"                # destroying won\u0027t be destroyed automatically by XAPI. So let\u0027s"},{"line_number":345,"context_line":"                # destroy it at here."}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_ddf81c7c","line":342,"updated":"2017-08-14 05:37:53.000000000","message":"wrong indent","commit_id":"973fcabd6c085ffcd7c82af1239de238602b9d97"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"791d2ec9fbff96fe97310615a5ec7fa999f92efa","unresolved":false,"context_lines":[{"line_number":376,"context_line":"    def _get_host_by_vif(self, vif):"},{"line_number":377,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":378,"context_line":"        if not network:"},{"line_number":379,"context_line":"            raise Exception(\"Couldn\u0027t find network on neutron port %s\" % vif)"},{"line_number":380,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("},{"line_number":381,"context_line":"            \u0027field \"network\" \u003d \"%s\"\u0027 % network)"},{"line_number":382,"context_line":"        if not vif_info:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_3d0cc892","line":379,"range":{"start_line":379,"start_character":62,"end_line":379,"end_character":66},"updated":"2017-08-14 05:37:53.000000000","message":"port or vif?","commit_id":"973fcabd6c085ffcd7c82af1239de238602b9d97"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"791d2ec9fbff96fe97310615a5ec7fa999f92efa","unresolved":false,"context_lines":[{"line_number":382,"context_line":"        if not vif_info:"},{"line_number":383,"context_line":"            raise Exception(\"Couldn\u0027t find vif information in network %s\""},{"line_number":384,"context_line":"                            % network)"},{"line_number":385,"context_line":"        vm_ref \u003d self._session.VIF.get_VM(list(vif_info.keys())[0])"},{"line_number":386,"context_line":"        return self._session.VM.get_resident_on(vm_ref)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"    def hot_plug(self, vif, instance, vm_ref, vif_ref):"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_dd6b7c1b","line":385,"range":{"start_line":385,"start_character":47,"end_line":385,"end_character":66},"updated":"2017-08-14 05:37:53.000000000","message":"raise an exception if multiple vif_info returned?","commit_id":"973fcabd6c085ffcd7c82af1239de238602b9d97"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def unplug(self, instance, vif, vm_ref):"},{"line_number":288,"context_line":"        super(XenAPIOpenVswitchDriver, self).unplug(instance, vif, vm_ref)"},{"line_number":289,"context_line":"        self.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":292,"context_line":"        \"\"\"Delete network and bridge:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_05b62b3f","line":289,"range":{"start_line":289,"start_character":49,"end_line":289,"end_character":58},"updated":"2017-08-15 09:00:52.000000000","message":"If changing vif to vif[\u0027id\u0027] then also change the parameter name from vif to vif_id","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def unplug(self, instance, vif, vm_ref):"},{"line_number":288,"context_line":"        super(XenAPIOpenVswitchDriver, self).unplug(instance, vif, vm_ref)"},{"line_number":289,"context_line":"        self.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":292,"context_line":"        \"\"\"Delete network and bridge:"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_e5a687ab","line":289,"range":{"start_line":289,"start_character":49,"end_line":289,"end_character":58},"in_reply_to":"9f436f4f_05b62b3f","updated":"2017-08-15 09:17:56.000000000","message":"will change it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        super(XenAPIOpenVswitchDriver, self).unplug(instance, vif, vm_ref)"},{"line_number":289,"context_line":"        self.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":292,"context_line":"        \"\"\"Delete network and bridge:"},{"line_number":293,"context_line":"        1. delete the patch port pair between the integration bridge and"},{"line_number":294,"context_line":"           the qbr linux bridge(if exist) and the interim network."}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_ea01b407","line":291,"updated":"2017-08-15 09:00:52.000000000","message":"Why is this now in a new method?","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        super(XenAPIOpenVswitchDriver, self).unplug(instance, vif, vm_ref)"},{"line_number":289,"context_line":"        self.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":292,"context_line":"        \"\"\"Delete network and bridge:"},{"line_number":293,"context_line":"        1. delete the patch port pair between the integration bridge and"},{"line_number":294,"context_line":"           the qbr linux bridge(if exist) and the interim network."}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_e54207ab","line":291,"in_reply_to":"9f436f4f_ea01b407","updated":"2017-08-15 09:17:56.000000000","message":"It is not a new method, we just move some code to the next function. \"delete_network_and_bridge\" function need check vifs on the bridge which going to be delete.","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            # delete bridge"},{"line_number":312,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":313,"context_line":"        else:"},{"line_number":314,"context_line":"            for remain_vif in vifs:"},{"line_number":315,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":316,"context_line":"                    return"},{"line_number":317,"context_line":"            # for resize/intra-pool migrate, vifs on both of the"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_e5444749","line":314,"updated":"2017-08-15 09:00:52.000000000","message":"Switch the logic here - this should be run at line 301, and return from the function if we detect that we should not delete the bridge.","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            # delete bridge"},{"line_number":312,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":313,"context_line":"        else:"},{"line_number":314,"context_line":"            for remain_vif in vifs:"},{"line_number":315,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":316,"context_line":"                    return"},{"line_number":317,"context_line":"            # for resize/intra-pool migrate, vifs on both of the"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_850b3b7b","line":314,"in_reply_to":"9f436f4f_e5444749","updated":"2017-08-15 09:17:56.000000000","message":"Will move it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def delete_bridge(self, instance, vif):"},{"line_number":324,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":325,"context_line":"        if network is None:"},{"line_number":326,"context_line":"            return"},{"line_number":327,"context_line":"        LOG.debug(\u0027destroying patch port pair for vif: vif_id\u003d%(vif_id)s\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_05618bd3","line":324,"updated":"2017-08-15 09:00:52.000000000","message":"We already have the network in all callers, don\u0027t we?  so pass it in?","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def delete_bridge(self, instance, vif):"},{"line_number":324,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":325,"context_line":"        if network is None:"},{"line_number":326,"context_line":"            return"},{"line_number":327,"context_line":"        LOG.debug(\u0027destroying patch port pair for vif: vif_id\u003d%(vif_id)s\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_45cd5364","line":324,"in_reply_to":"9f436f4f_05618bd3","updated":"2017-08-15 09:17:56.000000000","message":"Will change it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4992460b23a608a943ebb03c798a01eac4335fdd","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            self.delete_bridge(instance, vif)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def delete_bridge(self, instance, vif):"},{"line_number":324,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":325,"context_line":"        if network is None:"},{"line_number":326,"context_line":"            return"},{"line_number":327,"context_line":"        LOG.debug(\u0027destroying patch port pair for vif: vif_id\u003d%(vif_id)s\u0027,"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_54ca6ca0","line":324,"in_reply_to":"9f436f4f_45cd5364","updated":"2017-08-17 05:22:27.000000000","message":"Hi, Bob, because we used vif id many times in this function, so we can\u0027t remove it even we pass network in. So I prefer to keep current arugs. it is good looking in structure, and also easy to use. For example, someone may want to call this function with vif only, no network.","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                self._delete_linux_port(qbr_name, tap_name)"},{"line_number":358,"context_line":"                self._delete_linux_port(qbr_name, qvb_name)"},{"line_number":359,"context_line":"                self._delete_linux_bridge(qbr_name)"},{"line_number":360,"context_line":"                host_network.ovs_del_port("},{"line_number":361,"context_line":"                    self._session,"},{"line_number":362,"context_line":"                    CONF.xenserver.ovs_integration_bridge,"},{"line_number":363,"context_line":"                    qvo_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_e567a7b6","line":360,"range":{"start_line":360,"start_character":26,"end_line":360,"end_character":42},"updated":"2017-08-15 09:00:52.000000000","message":"Refactor not needed here - just add the indentation for all lines?\nIt\u0027s also not clear whether the new indentation for ovs_del_port is intended?","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                self._delete_linux_port(qbr_name, tap_name)"},{"line_number":358,"context_line":"                self._delete_linux_port(qbr_name, qvb_name)"},{"line_number":359,"context_line":"                self._delete_linux_bridge(qbr_name)"},{"line_number":360,"context_line":"                host_network.ovs_del_port("},{"line_number":361,"context_line":"                    self._session,"},{"line_number":362,"context_line":"                    CONF.xenserver.ovs_integration_bridge,"},{"line_number":363,"context_line":"                    qvo_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_458af3be","line":360,"range":{"start_line":360,"start_character":26,"end_line":360,"end_character":42},"in_reply_to":"9f436f4f_e567a7b6","updated":"2017-08-15 09:17:56.000000000","message":"Will check it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"66d00210c4ea08cff8e8f0f4206f7c8a9c19971e","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        return network"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def _get_host_by_vif(self, vif):"},{"line_number":380,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":381,"context_line":"        if not network:"},{"line_number":382,"context_line":"            raise Exception(\"Couldn\u0027t find network on vif %s\" % vif)"},{"line_number":383,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_c52f033d","line":380,"range":{"start_line":380,"start_character":23,"end_line":380,"end_character":42},"updated":"2017-08-15 09:00:52.000000000","message":"We might be able to find the VIF directly by looking at other-config of the VIF object?","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4992460b23a608a943ebb03c798a01eac4335fdd","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        return network"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def _get_host_by_vif(self, vif):"},{"line_number":380,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":381,"context_line":"        if not network:"},{"line_number":382,"context_line":"            raise Exception(\"Couldn\u0027t find network on vif %s\" % vif)"},{"line_number":383,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_5f0cc592","line":380,"range":{"start_line":380,"start_character":23,"end_line":380,"end_character":42},"in_reply_to":"9f436f4f_c52f033d","updated":"2017-08-17 05:22:27.000000000","message":"Hi, Bob, I checked other-config of some VIF object, it is blank. Like\n[root@rshp-1 ~]# xe vif-param-list uuid\u003d691fac69-d098-feb0-b3bd-3e18922c0b11\nuuid ( RO)                        : 691fac69-d098-feb0-b3bd-3e18922c0b11\n                     vm-uuid ( RO): 5446ef24-653b-af03-b42c-0676fbb4d0ff\n               vm-name-label ( RO): before_first_boot\n          allowed-operations (SRO): attach\n          current-operations (SRO):\n                      device ( RO): 1\n                         MAC ( RO): 1a:d8:06:aa:c7:7d\n           MAC-autogenerated ( RO): false\n                         MTU ( RO): 1500\n          currently-attached ( RO): false\n          qos_algorithm_type ( RW):\n        qos_algorithm_params (MRW):\n    qos_supported_algorithms (SRO):\n                other-config (MRW):\n                network-uuid ( RO): 96ba0357-e6df-b57d-e1ea-5583ebf0894d\n          network-name-label ( RO): OpenStack VM Network\n                 io_read_kbs ( RO): \u003cunknown\u003e\n                io_write_kbs ( RO): \u003cunknown\u003e\n                locking-mode ( RW): network_default\n                ipv4-allowed (SRW):\n                ipv6-allowed (SRW):\n     ipv4-configuration-mode ( RO): None\n              ipv4-addresses ( RO):\n                ipv4-gateway ( RO):\n     ipv6-configuration-mode ( RO): None\n              ipv6-addresses ( RO):\n                ipv6-gateway ( RO):","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"cb35ed65610bf502e4a3e77862f5732e2f15b3c9","unresolved":false,"context_lines":[{"line_number":377,"context_line":"        return network"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def _get_host_by_vif(self, vif):"},{"line_number":380,"context_line":"        network \u003d self._get_network_by_vif(vif)"},{"line_number":381,"context_line":"        if not network:"},{"line_number":382,"context_line":"            raise Exception(\"Couldn\u0027t find network on vif %s\" % vif)"},{"line_number":383,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_e58c47d8","line":380,"range":{"start_line":380,"start_character":23,"end_line":380,"end_character":42},"in_reply_to":"9f436f4f_c52f033d","updated":"2017-08-15 09:17:56.000000000","message":"Will check it","commit_id":"c5f2912837b151fd69da97fa459c5a3d4f16f358"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"30cb55f82261cd94284d32801338bdf67b40dff4","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            try:"},{"line_number":308,"context_line":"                self._session.network.destroy(network)"},{"line_number":309,"context_line":"            except Exception as e:"},{"line_number":310,"context_line":"                LOG.warning(\"Failed to destory network for vif_id %(if)s, \""},{"line_number":311,"context_line":"                            \"exception:%(exception)s\","},{"line_number":312,"context_line":"                            {\u0027if\u0027: vif_id, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":313,"context_line":"                raise exception.VirtualInterfaceUnplugException("}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_3118ec73","line":310,"range":{"start_line":310,"start_character":59,"end_line":310,"end_character":72},"updated":"2017-08-18 11:49:33.000000000","message":"suggest change it as: \"vif (id\u003d%(if)s,\"","commit_id":"d0f6602169345fe0baca32d71dc2728f98d4780f"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"174462f8dcd05e61d6c8fffab16442ca86bd9639","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            try:"},{"line_number":308,"context_line":"                self._session.network.destroy(network)"},{"line_number":309,"context_line":"            except Exception as e:"},{"line_number":310,"context_line":"                LOG.warning(\"Failed to destory network for vif_id %(if)s, \""},{"line_number":311,"context_line":"                            \"exception:%(exception)s\","},{"line_number":312,"context_line":"                            {\u0027if\u0027: vif_id, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":313,"context_line":"                raise exception.VirtualInterfaceUnplugException("}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_f02d9ea8","line":310,"range":{"start_line":310,"start_character":59,"end_line":310,"end_character":72},"in_reply_to":"9f436f4f_3118ec73","updated":"2017-08-21 01:33:54.000000000","message":"Hi, Jianghua, this is vif id, not vif. Because this function will always use vif id, so I change the paramater form vif[\u0027id\u0027] to vif_id","commit_id":"d0f6602169345fe0baca32d71dc2728f98d4780f"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5978a61b58b285e932d15fda6762826b668b95da","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            try:"},{"line_number":308,"context_line":"                self._session.network.destroy(network)"},{"line_number":309,"context_line":"            except Exception as e:"},{"line_number":310,"context_line":"                LOG.warning(\"Failed to destory network for vif_id %(if)s, \""},{"line_number":311,"context_line":"                            \"exception:%(exception)s\","},{"line_number":312,"context_line":"                            {\u0027if\u0027: vif_id, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":313,"context_line":"                raise exception.VirtualInterfaceUnplugException("}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_7621a69f","line":310,"range":{"start_line":310,"start_character":59,"end_line":310,"end_character":72},"in_reply_to":"9f436f4f_db4e3b37","updated":"2017-08-21 03:11:38.000000000","message":"OK, will modify it~","commit_id":"d0f6602169345fe0baca32d71dc2728f98d4780f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"4d51849a9d4835676fddd768941ad0f4123ec70f","unresolved":false,"context_lines":[{"line_number":307,"context_line":"            try:"},{"line_number":308,"context_line":"                self._session.network.destroy(network)"},{"line_number":309,"context_line":"            except Exception as e:"},{"line_number":310,"context_line":"                LOG.warning(\"Failed to destory network for vif_id %(if)s, \""},{"line_number":311,"context_line":"                            \"exception:%(exception)s\","},{"line_number":312,"context_line":"                            {\u0027if\u0027: vif_id, \u0027exception\u0027: e}, instance\u003dinstance)"},{"line_number":313,"context_line":"                raise exception.VirtualInterfaceUnplugException("}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_db4e3b37","line":310,"range":{"start_line":310,"start_character":59,"end_line":310,"end_character":72},"in_reply_to":"9f436f4f_f02d9ea8","updated":"2017-08-21 02:04:48.000000000","message":"Naichuan, I see. I means it\u0027s destroying network for VIF instead of for a VIF_ID. So it\u0027s better to reword it as \"destroy network for vif (vif_id\u003d%(if_id)s)\". \n\nNote there is a typo at here: \"destory\" should be \"destroy\":-)","commit_id":"d0f6602169345fe0baca32d71dc2728f98d4780f"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"30cb55f82261cd94284d32801338bdf67b40dff4","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("},{"line_number":384,"context_line":"            \u0027field \"network\" \u003d \"%s\"\u0027 % network)"},{"line_number":385,"context_line":"        if not vif_info or len(vif_info) !\u003d 1:"},{"line_number":386,"context_line":"            raise Exception(\"Couldn\u0027t find vif id information in network %s\""},{"line_number":387,"context_line":"                            % network)"},{"line_number":388,"context_line":"        vm_ref \u003d self._session.VIF.get_VM(list(vif_info.keys())[0])"},{"line_number":389,"context_line":"        return self._session.VM.get_resident_on(vm_ref)"}],"source_content_type":"text/x-python","patch_set":13,"id":"9f436f4f_0e194787","line":386,"range":{"start_line":386,"start_character":43,"end_line":386,"end_character":50},"updated":"2017-08-18 11:49:33.000000000","message":"here it should be vif?","commit_id":"d0f6602169345fe0baca32d71dc2728f98d4780f"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6c9b0b28d76608cd3985b7e9d5a60598e30d9ade","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                      instance\u003dinstance)"},{"line_number":317,"context_line":"            return"},{"line_number":318,"context_line":"        LOG.debug(\u0027destroying patch port pair for vif: vif_id\u003d%(vif_id)s\u0027,"},{"line_number":319,"context_line":"                  {\u0027vif_id\u0027: vif[\u0027id\u0027]})"},{"line_number":320,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":321,"context_line":"        patch_port1, tap_name \u003d self._get_patch_port_pair_names(vif[\u0027id\u0027])"},{"line_number":322,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_f754b256","side":"PARENT","line":319,"updated":"2017-08-22 10:19:46.000000000","message":"Remind me, why did we change this from being vif[\u0027id\u0027]?  i.e. why only pass in the vif_id to this function now?\nIt seems to be making the number of lines changed to be quite a bit larger than is needed.","commit_id":"929de34a474a23b43b78a7f28c9863eef9aa2253"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7fa3314fc83f2013173546f78bf38670a4593af","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                      instance\u003dinstance)"},{"line_number":317,"context_line":"            return"},{"line_number":318,"context_line":"        LOG.debug(\u0027destroying patch port pair for vif: vif_id\u003d%(vif_id)s\u0027,"},{"line_number":319,"context_line":"                  {\u0027vif_id\u0027: vif[\u0027id\u0027]})"},{"line_number":320,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":321,"context_line":"        patch_port1, tap_name \u003d self._get_patch_port_pair_names(vif[\u0027id\u0027])"},{"line_number":322,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_f3034672","side":"PARENT","line":319,"in_reply_to":"7f287b81_f754b256","updated":"2017-08-25 05:13:07.000000000","message":"In the old code, vif is passed to delete_network_and_bridge function, but only vif[\u0027id\u0027] is used. so I changed to only pass vif_id","commit_id":"929de34a474a23b43b78a7f28c9863eef9aa2253"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6c9b0b28d76608cd3985b7e9d5a60598e30d9ade","unresolved":false,"context_lines":[{"line_number":358,"context_line":"                self._delete_linux_port(qbr_name, qvb_name)"},{"line_number":359,"context_line":"                self._delete_linux_bridge(qbr_name)"},{"line_number":360,"context_line":"            host_network.ovs_del_port("},{"line_number":361,"context_line":"                self._session,"},{"line_number":362,"context_line":"                CONF.xenserver.ovs_integration_bridge,"},{"line_number":363,"context_line":"                qvo_name)"},{"line_number":364,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_37d0fac9","line":361,"updated":"2017-08-22 10:19:46.000000000","message":"Why change the formatting here?\nIt doesn\u0027t seem needed and makes the number of lines look bigger than they actually are","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7fa3314fc83f2013173546f78bf38670a4593af","unresolved":false,"context_lines":[{"line_number":358,"context_line":"                self._delete_linux_port(qbr_name, qvb_name)"},{"line_number":359,"context_line":"                self._delete_linux_bridge(qbr_name)"},{"line_number":360,"context_line":"            host_network.ovs_del_port("},{"line_number":361,"context_line":"                self._session,"},{"line_number":362,"context_line":"                CONF.xenserver.ovs_integration_bridge,"},{"line_number":363,"context_line":"                qvo_name)"},{"line_number":364,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_93f40288","line":361,"in_reply_to":"7f287b81_37d0fac9","updated":"2017-08-25 05:13:07.000000000","message":"Will revert the change","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6c9b0b28d76608cd3985b7e9d5a60598e30d9ade","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":523,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":524,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":525,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":526,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":527,"context_line":"            self._session, net_name)"},{"line_number":528,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_779442e9","line":525,"updated":"2017-08-22 10:19:46.000000000","message":"Not mentioned in the commit message.  This is a small but fundamental change that should be highlighted (and briefly explained)","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7fa3314fc83f2013173546f78bf38670a4593af","unresolved":false,"context_lines":[{"line_number":522,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":523,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":524,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":525,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":526,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":527,"context_line":"            self._session, net_name)"},{"line_number":528,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_532c5a01","line":525,"in_reply_to":"7f287b81_779442e9","updated":"2017-08-25 05:13:07.000000000","message":"Will add the description","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"b61ea276a580df7194c428b58b4ab35ebffe1b4a","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        #    source and target VM will be connected to the same"},{"line_number":319,"context_line":"        #    interim network. If the VM is resident on a remote host,"},{"line_number":320,"context_line":"        #    linux bridge on current host will be deleted."},{"line_number":321,"context_line":"        self.delete_bridge(instance, vif_id)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def delete_bridge(self, instance, vif_id):"},{"line_number":324,"context_line":"        network \u003d self._get_network_by_vif(vif_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_b76638ba","line":321,"updated":"2017-08-31 08:48:45.000000000","message":"But we potentially deleted the network above - assuming there was no vif - so how can we get_network_by_vif from within delete_bridge?","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6edcc7d747ec897de40eaa0a63dbabeb38ba4655","unresolved":false,"context_lines":[{"line_number":318,"context_line":"        #    source and target VM will be connected to the same"},{"line_number":319,"context_line":"        #    interim network. If the VM is resident on a remote host,"},{"line_number":320,"context_line":"        #    linux bridge on current host will be deleted."},{"line_number":321,"context_line":"        self.delete_bridge(instance, vif_id)"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"    def delete_bridge(self, instance, vif_id):"},{"line_number":324,"context_line":"        network \u003d self._get_network_by_vif(vif_id)"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_1ab07a8b","line":321,"in_reply_to":"7f287b81_b76638ba","updated":"2017-09-01 07:03:09.000000000","message":"Sorry, will check how to rewrite the code","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"b61ea276a580df7194c428b58b4ab35ebffe1b4a","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":373,"context_line":"            self._session, net_name)"},{"line_number":374,"context_line":"        if network is None:"},{"line_number":375,"context_line":"            raise Exception(\"Couldn\u0027t find network in network %s\" % network)"},{"line_number":376,"context_line":"        return network"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _get_host_by_vif(self, vif_id):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_57ca74a0","line":375,"updated":"2017-08-31 08:48:45.000000000","message":"This exception is not helpful as network is definitely \"none\" as per previous check.\nDid you mean to reference net_name?","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6edcc7d747ec897de40eaa0a63dbabeb38ba4655","unresolved":false,"context_lines":[{"line_number":372,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":373,"context_line":"            self._session, net_name)"},{"line_number":374,"context_line":"        if network is None:"},{"line_number":375,"context_line":"            raise Exception(\"Couldn\u0027t find network in network %s\" % network)"},{"line_number":376,"context_line":"        return network"},{"line_number":377,"context_line":""},{"line_number":378,"context_line":"    def _get_host_by_vif(self, vif_id):"}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_daa9d224","line":375,"in_reply_to":"7f287b81_57ca74a0","updated":"2017-09-01 07:03:09.000000000","message":"Will change to net_name","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"490973bd3bd7ac11fdcfc86c547b04dd3fe190c6","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":521,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":522,"context_line":"        # Make network to be shared to ensure the VM can detect it while"},{"line_number":523,"context_line":"        # live migration"},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_82a55f49","line":522,"updated":"2017-08-30 03:29:12.000000000","message":"I think bob\u0027s comment was that we need include the description on this change in the commit message.","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"5bc1b75837ac764e254db21f557419973d147f12","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":521,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":522,"context_line":"        # Make network to be shared to ensure the VM can detect it while"},{"line_number":523,"context_line":"        # live migration"},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_c7e8167d","line":522,"in_reply_to":"7f287b81_82a55f49","updated":"2017-08-30 05:51:32.000000000","message":"Already add it on commit message","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"6edcc7d747ec897de40eaa0a63dbabeb38ba4655","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":521,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":522,"context_line":"        # Make network to be shared to ensure the VM can detect it while"},{"line_number":523,"context_line":"        # live migration"},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_9a610a15","line":522,"in_reply_to":"7f287b81_87b44e81","updated":"2017-09-01 07:03:09.000000000","message":":)","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"152fec234304667ae420674c518022a80495fbb2","unresolved":false,"context_lines":[{"line_number":519,"context_line":""},{"line_number":520,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":521,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":522,"context_line":"        # Make network to be shared to ensure the VM can detect it while"},{"line_number":523,"context_line":"        # live migration"},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":19,"id":"7f287b81_87b44e81","line":522,"in_reply_to":"7f287b81_c7e8167d","updated":"2017-08-30 05:56:32.000000000","message":"Ah, yes that\u0027s the second item in the commit message. Sorry, I missed that change.","commit_id":"bfd49d114f2d78ce107baa59ae93d68249eb88db"},{"author":{"_account_id":17922,"name":"Huan Xie","email":"huan.xie@citrix.com","username":"huan"},"change_message_id":"c3de4634da8b044b0e8252073e200e3fbfc97969","unresolved":false,"context_lines":[{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":516,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":517,"context_line":"        # Make network to be shared to ensure the VM can detect it while"},{"line_number":518,"context_line":"        # live migration"},{"line_number":519,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":520,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":521,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"}],"source_content_type":"text/x-python","patch_set":21,"id":"5f2577a7_80c6d199","line":518,"range":{"start_line":517,"start_character":0,"end_line":518,"end_character":24},"updated":"2017-09-19 01:09:50.000000000","message":"Suggest adding a bit more, I think this is to support live migration operation for both pool and non-pool XenSever environment","commit_id":"4ca12521586affa0182feb76c08afff6c55a292a"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"24e738224971dda22a05e80453349fb117fe7986","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":520,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":521,"context_line":"        # In a pooled environments, make the network to be shared to ensure the"},{"line_number":522,"context_line":"        # VM can detect it while live migration. It will make no change if the"},{"line_number":523,"context_line":"        # environment is not pooled."},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f515b1d_6898c969","line":521,"range":{"start_line":521,"start_character":33,"end_line":521,"end_character":34},"updated":"2017-09-22 09:54:25.000000000","message":"typo: delete s.","commit_id":"033f08caca44d1ab634ed671612f6c31b557dd82"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"867ee4b33eb70ab33b8c116f2566aa44ed1293bd","unresolved":false,"context_lines":[{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":520,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":521,"context_line":"        # In a pooled environments, make the network to be shared to ensure the"},{"line_number":522,"context_line":"        # VM can detect it while live migration. It will make no change if the"},{"line_number":523,"context_line":"        # environment is not pooled."},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"}],"source_content_type":"text/x-python","patch_set":26,"id":"7f515b1d_282411c6","line":521,"range":{"start_line":521,"start_character":33,"end_line":521,"end_character":34},"in_reply_to":"7f515b1d_6898c969","updated":"2017-09-22 10:07:18.000000000","message":"will remove it","commit_id":"033f08caca44d1ab634ed671612f6c31b557dd82"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"24e738224971dda22a05e80453349fb117fe7986","unresolved":false,"context_lines":[{"line_number":519,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":520,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":521,"context_line":"        # In a pooled environments, make the network to be shared to ensure the"},{"line_number":522,"context_line":"        # VM can detect it while live migration. It will make no change if the"},{"line_number":523,"context_line":"        # environment is not pooled."},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":26,"id":"7f515b1d_c8efbdae","line":522,"range":{"start_line":522,"start_character":10,"end_line":522,"end_character":32},"updated":"2017-09-22 09:54:25.000000000","message":"nit: it can also be used in the target host while...?","commit_id":"033f08caca44d1ab634ed671612f6c31b557dd82"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"867ee4b33eb70ab33b8c116f2566aa44ed1293bd","unresolved":false,"context_lines":[{"line_number":519,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":520,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":521,"context_line":"        # In a pooled environments, make the network to be shared to ensure the"},{"line_number":522,"context_line":"        # VM can detect it while live migration. It will make no change if the"},{"line_number":523,"context_line":"        # environment is not pooled."},{"line_number":524,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":525,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","}],"source_content_type":"text/x-python","patch_set":26,"id":"7f515b1d_883545fa","line":522,"range":{"start_line":522,"start_character":10,"end_line":522,"end_character":32},"in_reply_to":"7f515b1d_c8efbdae","updated":"2017-09-22 10:07:18.000000000","message":"will modify it.","commit_id":"033f08caca44d1ab634ed671612f6c31b557dd82"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"edcd44c7483050682835c834e64c8aefa55b2ed3","unresolved":false,"context_lines":[{"line_number":520,"context_line":"        # can also be used in the target host while live migration. It will"},{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_d19ff800","line":523,"range":{"start_line":523,"start_character":40,"end_line":523,"end_character":63},"updated":"2018-03-28 10:14:30.000000000","message":"While we\u0027re here, can we have a better name description?\ne.g. \"Interim network for VIF \u0027id\u0027 for VM \u003cvm_id\u003e\"?  Can we easily get the VM name here?\nI see it\u0027s passed into hot_plug so we could potentially pass it through to create_vif_interim_network.","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d515f82d869d4af34979bc90a1bccd2aa9bbeabc","unresolved":false,"context_lines":[{"line_number":520,"context_line":"        # can also be used in the target host while live migration. It will"},{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_598c547e","line":523,"range":{"start_line":523,"start_character":40,"end_line":523,"end_character":63},"in_reply_to":"bf659307_d19ff800","updated":"2018-03-29 06:36:20.000000000","message":"Will change the name","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"37ed2ba1bca5e4aa0ac5b66017db41945c0ca898","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_2d15be9c","line":524,"updated":"2018-03-28 09:06:07.000000000","message":"Can you remind me why we need to do this, rather than creating a new interim network for the destination host as we do in the non-pooled case?","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"dbe257a8de07236994a2995fcdf5d6ff9edd00cc","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_31667453","line":524,"in_reply_to":"bf659307_08eb08b0","updated":"2018-03-28 10:12:10.000000000","message":"So would an alternative fix be to have extra data in other-config (e.g. the host-uuid) and search for the network based on the name-label and host-uuid?","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f466a5c72f1df76e663de1d6d1b1dea3859d19ca","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_08eb08b0","line":524,"in_reply_to":"bf659307_2d15be9c","updated":"2018-03-28 10:00:07.000000000","message":"If we create another network, its name would be same as the previous one. The networks with same name caused a VM can\u0027t boot up issue.","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"400b73424d64bfbc0ca8960633626acd1f4fb12b","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_93629609","line":524,"in_reply_to":"bf659307_31667453","updated":"2018-04-02 02:50:53.000000000","message":"Hi, Bob. I checked the previous discussion about network flags on July 28th 2017. It looks reasonable. Do we have other considerations about this requirement?","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d515f82d869d4af34979bc90a1bccd2aa9bbeabc","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_b9f010ff","line":524,"in_reply_to":"bf659307_31667453","updated":"2018-03-29 06:36:20.000000000","message":"Will check if it is OK.","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"dab863d9ca4137597464dc192bc07a5fd4ee3dd0","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_ff913e48","line":524,"in_reply_to":"bf659307_4cc8ca72","updated":"2018-04-03 09:24:45.000000000","message":"Thanks, Bob. Will keep it unchanged.","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"f7b261c5439d62239f1431cb23bbabeb8c8b81b4","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        # make no change if the environment is not pooled."},{"line_number":522,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":523,"context_line":"                   \u0027name_description\u0027: \"interim network for vif\","},{"line_number":524,"context_line":"                   \u0027other_config\u0027: {\u0027assume_network_is_shared\u0027: \u0027true\u0027}}"},{"line_number":525,"context_line":"        network_ref \u003d network_utils.find_network_with_name_label("},{"line_number":526,"context_line":"            self._session, net_name)"},{"line_number":527,"context_line":"        if network_ref:"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_4cc8ca72","line":524,"in_reply_to":"bf659307_93629609","updated":"2018-04-03 08:52:48.000000000","message":"OK - let\u0027s keep it using assume_network_is_shared","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":128,"context_line":"        pass"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":131,"context_line":"        pass"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_67bd2a67","line":130,"range":{"start_line":130,"start_character":50,"end_line":130,"end_character":53},"updated":"2018-04-09 16:12:44.000000000","message":"This should be vif_id now.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":128,"context_line":"        pass"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def delete_network_and_bridge(self, instance, vif):"},{"line_number":131,"context_line":"        pass"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_9091889c","line":130,"range":{"start_line":130,"start_character":50,"end_line":130,"end_character":53},"in_reply_to":"bf659307_67bd2a67","updated":"2018-04-10 01:34:18.000000000","message":"Will modify it.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":302,"context_line":"        if vifs:"},{"line_number":303,"context_line":"            for remain_vif in vifs:"},{"line_number":304,"context_line":"                # Still has vif on local server, return"},{"line_number":305,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":306,"context_line":"                    return"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            try:"},{"line_number":309,"context_line":"                self._session.network.destroy(network)"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_3978b629","line":306,"range":{"start_line":304,"start_character":16,"end_line":306,"end_character":26},"updated":"2018-04-09 16:12:44.000000000","message":"I\u0027m unclear on what this means. The method is called delete_network_and_bridge so if there is something still in place for this network, isn\u0027t it a failure to not be able to delete it?","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":302,"context_line":"        if vifs:"},{"line_number":303,"context_line":"            for remain_vif in vifs:"},{"line_number":304,"context_line":"                # Still has vif on local server, return"},{"line_number":305,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":306,"context_line":"                    return"},{"line_number":307,"context_line":"        else:"},{"line_number":308,"context_line":"            try:"},{"line_number":309,"context_line":"                self._session.network.destroy(network)"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_5060d0a5","line":306,"range":{"start_line":304,"start_character":16,"end_line":306,"end_character":26},"in_reply_to":"bf659307_3978b629","updated":"2018-04-10 01:34:18.000000000","message":"Hi, Matt. Because the network is shared, there may be more than one vifs(maybe belong to many VMs) attach to the network. So we destroy the network only when all the vifs has been removed.\nIt is a common case, not a failure.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":368,"context_line":"            self._session, net_name)"},{"line_number":369,"context_line":"        if network is None:"},{"line_number":370,"context_line":"            LOG.warning(\"Failed to find network for vif id %(if)s\","},{"line_number":371,"context_line":"                        {\u0027if\u0027: vif_id})"},{"line_number":372,"context_line":"            return"},{"line_number":373,"context_line":"        return network"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_99b782d9","line":370,"updated":"2018-04-09 16:12:44.000000000","message":"In the old delete_network_and_bridge impl, this was just DEBUG. Is there a reason it should be a warning now?","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        network \u003d network_utils.find_network_with_name_label("},{"line_number":368,"context_line":"            self._session, net_name)"},{"line_number":369,"context_line":"        if network is None:"},{"line_number":370,"context_line":"            LOG.warning(\"Failed to find network for vif id %(if)s\","},{"line_number":371,"context_line":"                        {\u0027if\u0027: vif_id})"},{"line_number":372,"context_line":"            return"},{"line_number":373,"context_line":"        return network"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_30cf5cb1","line":370,"in_reply_to":"bf659307_99b782d9","updated":"2018-04-10 01:34:18.000000000","message":"It is an unexpected result in this case. But in some case, caller may not sure there is a network or not. Will change back to DEBUG. Thanks, Matt.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("},{"line_number":380,"context_line":"            \u0027field \"network\" \u003d \"%s\"\u0027 % network)"},{"line_number":381,"context_line":"        if not vif_info or len(vif_info) !\u003d 1:"},{"line_number":382,"context_line":"            raise Exception(\"Couldn\u0027t find vif id information in network %s\""},{"line_number":383,"context_line":"                            % network)"},{"line_number":384,"context_line":"        vm_ref \u003d self._session.VIF.get_VM(list(vif_info.keys())[0])"},{"line_number":385,"context_line":"        return self._session.VM.get_resident_on(vm_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_39cbd64a","line":382,"range":{"start_line":382,"start_character":18,"end_line":382,"end_character":27},"updated":"2018-04-09 16:12:44.000000000","message":"NovaException at least? Raising a generic Exception is wrong.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        vif_info \u003d self._session.VIF.get_all_records_where("},{"line_number":380,"context_line":"            \u0027field \"network\" \u003d \"%s\"\u0027 % network)"},{"line_number":381,"context_line":"        if not vif_info or len(vif_info) !\u003d 1:"},{"line_number":382,"context_line":"            raise Exception(\"Couldn\u0027t find vif id information in network %s\""},{"line_number":383,"context_line":"                            % network)"},{"line_number":384,"context_line":"        vm_ref \u003d self._session.VIF.get_VM(list(vif_info.keys())[0])"},{"line_number":385,"context_line":"        return self._session.VM.get_resident_on(vm_ref)"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_d0dce075","line":382,"range":{"start_line":382,"start_character":18,"end_line":382,"end_character":27},"in_reply_to":"bf659307_39cbd64a","updated":"2018-04-10 01:34:18.000000000","message":"You are right, thank you very much, Matt.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":302,"context_line":"        if vifs:"},{"line_number":303,"context_line":"            for remain_vif in vifs:"},{"line_number":304,"context_line":"                # Still has vifs attched to this network on local server, means"},{"line_number":305,"context_line":"                # the network is still in use, can\u0027t delete it, return."},{"line_number":306,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":307,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_d4b5a6ef","line":304,"range":{"start_line":304,"start_character":33,"end_line":304,"end_character":40},"updated":"2018-04-10 13:24:07.000000000","message":"attached","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":301,"context_line":"        bridge_name \u003d self._session.network.get_bridge(network)"},{"line_number":302,"context_line":"        if vifs:"},{"line_number":303,"context_line":"            for remain_vif in vifs:"},{"line_number":304,"context_line":"                # Still has vifs attched to this network on local server, means"},{"line_number":305,"context_line":"                # the network is still in use, can\u0027t delete it, return."},{"line_number":306,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":307,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_b184b2d4","line":304,"range":{"start_line":304,"start_character":33,"end_line":304,"end_character":40},"in_reply_to":"bf659307_d4b5a6ef","updated":"2018-04-11 01:10:53.000000000","message":"Thanks, :)","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"4165403b417d297c8676cc58497bf10c5a2af13e","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                # Still has vifs attched to this network on local server, means"},{"line_number":305,"context_line":"                # the network is still in use, can\u0027t delete it, return."},{"line_number":306,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":307,"context_line":"                    return"},{"line_number":308,"context_line":"        else:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                self._session.network.destroy(network)"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_544f56bc","line":307,"range":{"start_line":307,"start_character":20,"end_line":307,"end_character":26},"updated":"2018-04-10 13:24:07.000000000","message":"I\u0027m having a hard time telling which test is hitting this condition - if there is a test for it, can you please add a docstring to the test to explain the scenario it\u0027s testing (the same is true for all of the new tests really).","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"da2148523008e6c367d8f0ced0c30452699ce555","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                # Still has vifs attched to this network on local server, means"},{"line_number":305,"context_line":"                # the network is still in use, can\u0027t delete it, return."},{"line_number":306,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":307,"context_line":"                    return"},{"line_number":308,"context_line":"        else:"},{"line_number":309,"context_line":"            try:"},{"line_number":310,"context_line":"                self._session.network.destroy(network)"}],"source_content_type":"text/x-python","patch_set":40,"id":"bf659307_11731e18","line":307,"range":{"start_line":307,"start_character":20,"end_line":307,"end_character":26},"in_reply_to":"bf659307_544f56bc","updated":"2018-04-11 01:10:53.000000000","message":"Will obey the rule, thanks, Matt.","commit_id":"2830ba71c666670262a02971ed8c62bc22cca72c"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":302,"context_line":"        if vifs:"},{"line_number":303,"context_line":"            # Still has vifs attached to this network"},{"line_number":304,"context_line":"            for remain_vif in vifs:"},{"line_number":305,"context_line":"                # if remain vifs are on the local server, give up all the"},{"line_number":306,"context_line":"                # operations. If remain vifs are on the remote hosts, keep"},{"line_number":307,"context_line":"                # the network and delete the bridge"},{"line_number":308,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_4b054c10","line":305,"range":{"start_line":305,"start_character":21,"end_line":305,"end_character":27},"updated":"2018-04-12 15:00:20.000000000","message":"s/remain vifs/the remaining vifs/","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            # Still has vifs attached to this network"},{"line_number":304,"context_line":"            for remain_vif in vifs:"},{"line_number":305,"context_line":"                # if remain vifs are on the local server, give up all the"},{"line_number":306,"context_line":"                # operations. If remain vifs are on the remote hosts, keep"},{"line_number":307,"context_line":"                # the network and delete the bridge"},{"line_number":308,"context_line":"                if self._get_host_by_vif(remain_vif) \u003d\u003d self._session.host_ref:"},{"line_number":309,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_eb054011","line":306,"range":{"start_line":306,"start_character":30,"end_line":306,"end_character":44},"updated":"2018-04-12 15:00:20.000000000","message":"If the remaining vifs","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":521,"context_line":""},{"line_number":522,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":523,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":524,"context_line":"        # In a pooled environment, make the network to be shared to ensure it"},{"line_number":525,"context_line":"        # can also be used in the target host while live migration. It will"},{"line_number":526,"context_line":"        # make no change if the environment is not pooled."},{"line_number":527,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_1048df84","line":524,"range":{"start_line":524,"start_character":40,"end_line":524,"end_character":66},"updated":"2018-04-12 15:00:20.000000000","message":"s/the network to be shared to ensure/the network shared in order to ensure/","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":522,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":523,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":524,"context_line":"        # In a pooled environment, make the network to be shared to ensure it"},{"line_number":525,"context_line":"        # can also be used in the target host while live migration. It will"},{"line_number":526,"context_line":"        # make no change if the environment is not pooled."},{"line_number":527,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":528,"context_line":"                       \u0027name_description\u0027: \"interim network for vif[%s]\""}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_d05d8747","line":525,"range":{"start_line":525,"start_character":46,"end_line":525,"end_character":66},"updated":"2018-04-12 15:00:20.000000000","message":"s/while live migration/while live migrating/","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"baf21af0d6b8380c523b1d7981cfab1479f74823","unresolved":false,"context_lines":[{"line_number":522,"context_line":"    def create_vif_interim_network(self, vif):"},{"line_number":523,"context_line":"        net_name \u003d self.get_vif_interim_net_name(vif[\u0027id\u0027])"},{"line_number":524,"context_line":"        # In a pooled environment, make the network to be shared to ensure it"},{"line_number":525,"context_line":"        # can also be used in the target host while live migration. It will"},{"line_number":526,"context_line":"        # make no change if the environment is not pooled."},{"line_number":527,"context_line":"        network_rec \u003d {\u0027name_label\u0027: net_name,"},{"line_number":528,"context_line":"                       \u0027name_description\u0027: \"interim network for vif[%s]\""},{"line_number":529,"context_line":"                       % vif[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_b00ed338","line":526,"range":{"start_line":525,"start_character":68,"end_line":526,"end_character":58},"updated":"2018-04-12 15:00:20.000000000","message":"Do you mean to say this will be a NO-OP if there are no storage pools in the environment? Or are you saying that the \"assume_network_is_shared\" key/value does not affect environments where storage pools are not used?","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"}],"nova/virt/xenapi/vm_utils.py":[{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"afce1ebe0e77d32867e33365a3165370ac05c454","unresolved":false,"context_lines":[{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_host_pooled(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    if host_ref not in rec_dict.keys():"},{"line_number":2663,"context_line":"        return False"},{"line_number":2664,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"df3967d1_ed8b0e65","line":2662,"range":{"start_line":2662,"start_character":31,"end_line":2662,"end_character":38},"updated":"2017-08-04 07:57:20.000000000","message":"redundant","commit_id":"3beee5e0fb864a6979183c259f4daf16db5dc4b4"},{"author":{"_account_id":23630,"name":"Tovin Seven","email":"tovin07@gmail.com","username":"tovin07"},"change_message_id":"afce1ebe0e77d32867e33365a3165370ac05c454","unresolved":false,"context_lines":[{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_host_pooled(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    if host_ref not in rec_dict.keys():"},{"line_number":2663,"context_line":"        return False"},{"line_number":2664,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"df3967d1_8df002ff","line":2664,"range":{"start_line":2662,"start_character":0,"end_line":2664,"end_character":15},"updated":"2017-08-04 07:57:20.000000000","message":"you can make this in one line","commit_id":"3beee5e0fb864a6979183c259f4daf16db5dc4b4"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3e8c39b56902a1ac484213a3ea4a63b7857e5b91","unresolved":false,"context_lines":[{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_host_pooled(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    if host_ref not in rec_dict.keys():"},{"line_number":2663,"context_line":"        return False"},{"line_number":2664,"context_line":"    return True"}],"source_content_type":"text/x-python","patch_set":5,"id":"df3967d1_2d7c761d","line":2664,"range":{"start_line":2662,"start_character":0,"end_line":2664,"end_character":15},"in_reply_to":"df3967d1_8df002ff","updated":"2017-08-04 08:02:47.000000000","message":"Will modify it, thank you","commit_id":"3beee5e0fb864a6979183c259f4daf16db5dc4b4"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"143633f5962d8ae23770c377c10e6ed104658a9d","unresolved":false,"context_lines":[{"line_number":2657,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"},{"line_number":2658,"context_line":""},{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_host_pooled(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    return host_ref in rec_dict.keys()"}],"source_content_type":"text/x-python","patch_set":6,"id":"df3967d1_59441b47","line":2660,"range":{"start_line":2660,"start_character":4,"end_line":2660,"end_character":18},"updated":"2017-08-04 11:08:49.000000000","message":"each host will belong to a pool. I think it\u0027s checking if the host belong to the same pool where this session is connected.","commit_id":"2a338113ceaddeb90c57652bd123042f619a86f0"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"6c9b0b28d76608cd3985b7e9d5a60598e30d9ade","unresolved":false,"context_lines":[{"line_number":2657,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"},{"line_number":2658,"context_line":""},{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_same_pool_host(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    return host_ref in rec_dict.keys()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_f78712b6","line":2660,"updated":"2017-08-22 10:19:46.000000000","message":"Function doesn\u0027t sound right - perhaps \"is_host_in_pool\"?","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"d7fa3314fc83f2013173546f78bf38670a4593af","unresolved":false,"context_lines":[{"line_number":2657,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"},{"line_number":2658,"context_line":""},{"line_number":2659,"context_line":""},{"line_number":2660,"context_line":"def is_same_pool_host(session, host_ref):"},{"line_number":2661,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2662,"context_line":"    return host_ref in rec_dict.keys()"}],"source_content_type":"text/x-python","patch_set":15,"id":"7f287b81_53157a9b","line":2660,"in_reply_to":"7f287b81_f78712b6","updated":"2017-08-25 05:13:07.000000000","message":"At first the name is \"is_host_pooled\", but someone said because all the host is pooled(single host have the pool of itself), it is not right. So I change it to this function name.","commit_id":"5fef892c8e2f54937c0e9b5bc2388e8645b574a2"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"37ed2ba1bca5e4aa0ac5b66017db41945c0ca898","unresolved":false,"context_lines":[{"line_number":2621,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"},{"line_number":2622,"context_line":""},{"line_number":2623,"context_line":""},{"line_number":2624,"context_line":"def is_same_pool_host(session, host_ref):"},{"line_number":2625,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2626,"context_line":"    return host_ref in rec_dict.keys()"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_0d88fa1c","line":2624,"range":{"start_line":2624,"start_character":4,"end_line":2624,"end_character":21},"updated":"2018-03-28 09:06:07.000000000","message":"\"host_in_this_pool\" would be better","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f466a5c72f1df76e663de1d6d1b1dea3859d19ca","unresolved":false,"context_lines":[{"line_number":2621,"context_line":"    session.call_xenapi(\"VM.set_other_config\", vm_ref, other_config)"},{"line_number":2622,"context_line":""},{"line_number":2623,"context_line":""},{"line_number":2624,"context_line":"def is_same_pool_host(session, host_ref):"},{"line_number":2625,"context_line":"    rec_dict \u003d session.host.get_all_records()"},{"line_number":2626,"context_line":"    return host_ref in rec_dict.keys()"}],"source_content_type":"text/x-python","patch_set":36,"id":"bf659307_c890b051","line":2624,"range":{"start_line":2624,"start_character":4,"end_line":2624,"end_character":21},"in_reply_to":"bf659307_0d88fa1c","updated":"2018-03-28 10:00:07.000000000","message":"Will modify it. Thanks","commit_id":"429730cd77a7dd4369b1bb107a9440fc2eb373e5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":813,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":814,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":815,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":816,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"},{"line_number":817,"context_line":"            % {\u0027name_label\u0027: name_label, \u0027SR\u0027: sr_ref})"},{"line_number":818,"context_line":"    recs \u003d session.call_xenapi(\"VDI.get_all_records_where\", expr)"},{"line_number":819,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_59824aca","line":816,"updated":"2018-04-09 16:12:44.000000000","message":"Why is this change needed? If this is needed because of a change in behavior for live migration, please add a comment.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":813,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":814,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":815,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":816,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"},{"line_number":817,"context_line":"            % {\u0027name_label\u0027: name_label, \u0027SR\u0027: sr_ref})"},{"line_number":818,"context_line":"    recs \u003d session.call_xenapi(\"VDI.get_all_records_where\", expr)"},{"line_number":819,"context_line":""}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_3012fc0a","line":816,"in_reply_to":"bf659307_59824aca","updated":"2018-04-10 01:34:18.000000000","message":"It is for pooled hosts image searching. Will add comments","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"df516c744cf6cde0f4aa7f9981b72a1d06e0b7cf","unresolved":false,"context_lines":[{"line_number":814,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a image. When"},{"line_number":818,"context_line":"    # the host belong to a pool, there may be more than one images with the"},{"line_number":819,"context_line":"    # specified name, need to specify SR ref to ensure only one image return."},{"line_number":820,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"}],"source_content_type":"text/x-python","patch_set":39,"id":"bf659307_79eb7cdb","line":817,"range":{"start_line":817,"start_character":61,"end_line":817,"end_character":62},"updated":"2018-04-10 07:42:58.000000000","message":"the cached image.","commit_id":"b93b41c81dd9378594ab57ca8c7f4c0d8809cf9b"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"99d635a5416288acfb5faaf9fb7022766c79f67b","unresolved":false,"context_lines":[{"line_number":814,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a image. When"},{"line_number":818,"context_line":"    # the host belong to a pool, there may be more than one images with the"},{"line_number":819,"context_line":"    # specified name, need to specify SR ref to ensure only one image return."},{"line_number":820,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"}],"source_content_type":"text/x-python","patch_set":39,"id":"bf659307_d70daf35","line":817,"range":{"start_line":817,"start_character":61,"end_line":817,"end_character":62},"in_reply_to":"bf659307_79eb7cdb","updated":"2018-04-10 08:36:50.000000000","message":"will modify it.","commit_id":"b93b41c81dd9378594ab57ca8c7f4c0d8809cf9b"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"df516c744cf6cde0f4aa7f9981b72a1d06e0b7cf","unresolved":false,"context_lines":[{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a image. When"},{"line_number":818,"context_line":"    # the host belong to a pool, there may be more than one images with the"},{"line_number":819,"context_line":"    # specified name, need to specify SR ref to ensure only one image return."},{"line_number":820,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"},{"line_number":821,"context_line":"            % {\u0027name_label\u0027: name_label, \u0027SR\u0027: sr_ref})"}],"source_content_type":"text/x-python","patch_set":39,"id":"bf659307_99a2109a","line":818,"updated":"2018-04-10 07:42:58.000000000","message":"You may explain why there are multiple images having the same name. The real reason is that we name the cached image as \"Glance Image \u003cimage-id\u003e\" e.g.: Glance Image b182b99a-f8c7-45ee-bf36-2a029ce7e5f9\". If the hosts belong to pool use local SRs, each SR will have a cached image. And the images are all visible to master host.","commit_id":"b93b41c81dd9378594ab57ca8c7f4c0d8809cf9b"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"99d635a5416288acfb5faaf9fb7022766c79f67b","unresolved":false,"context_lines":[{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a image. When"},{"line_number":818,"context_line":"    # the host belong to a pool, there may be more than one images with the"},{"line_number":819,"context_line":"    # specified name, need to specify SR ref to ensure only one image return."},{"line_number":820,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"},{"line_number":821,"context_line":"            % {\u0027name_label\u0027: name_label, \u0027SR\u0027: sr_ref})"}],"source_content_type":"text/x-python","patch_set":39,"id":"bf659307_774aa355","line":818,"in_reply_to":"bf659307_99a2109a","updated":"2018-04-10 08:36:50.000000000","message":"I don\u0027t think it is caused by naming rules. the root cause is xapi api would return all the images on the different host when using xapi-pool.","commit_id":"b93b41c81dd9378594ab57ca8c7f4c0d8809cf9b"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"df516c744cf6cde0f4aa7f9981b72a1d06e0b7cf","unresolved":false,"context_lines":[{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a image. When"},{"line_number":818,"context_line":"    # the host belong to a pool, there may be more than one images with the"},{"line_number":819,"context_line":"    # specified name, need to specify SR ref to ensure only one image return."},{"line_number":820,"context_line":"    expr \u003d (\u0027field \"name__label\"\u003d\"%(name_label)s\" and field \"SR\" \u003d \"%(SR)s\"\u0027"},{"line_number":821,"context_line":"            % {\u0027name_label\u0027: name_label, \u0027SR\u0027: sr_ref})"},{"line_number":822,"context_line":"    recs \u003d session.call_xenapi(\"VDI.get_all_records_where\", expr)"}],"source_content_type":"text/x-python","patch_set":39,"id":"bf659307_b9cb5448","line":819,"updated":"2018-04-10 07:42:58.000000000","message":"Glance Image b182b99a-f8c7-45ee-bf36-2a029ce7e5f9","commit_id":"b93b41c81dd9378594ab57ca8c7f4c0d8809cf9b"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"8a692e61ca41699d7ff6f327ba7177fbbb96b703","unresolved":false,"context_lines":[{"line_number":814,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a cached image."},{"line_number":818,"context_line":"    # When in a xapi pool, each host may have a cached image using the"},{"line_number":819,"context_line":"    # same name while xapi api will search all of them. Add SR to the filter"},{"line_number":820,"context_line":"    # to ensure only one image returns."}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_109bed16","line":817,"range":{"start_line":817,"start_character":33,"end_line":817,"end_character":43},"updated":"2018-04-12 09:08:18.000000000","message":"Minor typo.  Not worth withholding the +1 though.","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"a167b514e4c2f1bccb515b16357602a6f8f8cc20","unresolved":false,"context_lines":[{"line_number":814,"context_line":"def _find_cached_image(session, image_id, sr_ref):"},{"line_number":815,"context_line":"    \"\"\"Returns the vdi-ref of the cached image.\"\"\""},{"line_number":816,"context_line":"    name_label \u003d _get_image_vdi_label(image_id)"},{"line_number":817,"context_line":"    # For not pooled hosts, only name_lable is enough to get a cached image."},{"line_number":818,"context_line":"    # When in a xapi pool, each host may have a cached image using the"},{"line_number":819,"context_line":"    # same name while xapi api will search all of them. Add SR to the filter"},{"line_number":820,"context_line":"    # to ensure only one image returns."}],"source_content_type":"text/x-python","patch_set":41,"id":"bf659307_37304f9f","line":817,"range":{"start_line":817,"start_character":33,"end_line":817,"end_character":43},"in_reply_to":"bf659307_109bed16","updated":"2018-04-13 01:14:50.000000000","message":"Thanks, Bob. Will modify it in the next patch","commit_id":"c0187a010c2ebaa58b95776ca3ae41249ac9e8af"}],"nova/virt/xenapi/vmops.py":[{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"153f27110402e013ab652007af0c9ad731eb5d22","unresolved":false,"context_lines":[{"line_number":2439,"context_line":"                    self._generate_vdi_map("},{"line_number":2440,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2441,"context_line":"        vif_map \u003d {}"},{"line_number":2442,"context_line":"        rec_dict \u003d self._session.host.get_all_records()"},{"line_number":2443,"context_line":"        if migrate_send_data.get(\u0027host\u0027) not in rec_dict.keys():"},{"line_number":2444,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2445,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df3967d1_b9e24300","line":2442,"updated":"2017-08-02 02:04:45.000000000","message":"suggest define a new function in vm_utils.py -\n e.g. is_host_in_cur_pool(); explicitly indicating the vif_map is empty for intra-pool migration.","commit_id":"214fc83b1db807fd3cc3f2ed178db99f0a171ada"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"1e03ab3fa4aed6807a52abe24dea4fc82b66fec4","unresolved":false,"context_lines":[{"line_number":2439,"context_line":"                    self._generate_vdi_map("},{"line_number":2440,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2441,"context_line":"        vif_map \u003d {}"},{"line_number":2442,"context_line":"        rec_dict \u003d self._session.host.get_all_records()"},{"line_number":2443,"context_line":"        if migrate_send_data.get(\u0027host\u0027) not in rec_dict.keys():"},{"line_number":2444,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2445,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":1,"id":"df3967d1_b9cc8361","line":2442,"in_reply_to":"df3967d1_b9e24300","updated":"2017-08-02 02:09:32.000000000","message":"Will fix it","commit_id":"214fc83b1db807fd3cc3f2ed178db99f0a171ada"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6eb7f33e2c4ed1c03777c4b84fce9c1af217692","unresolved":false,"context_lines":[{"line_number":2300,"context_line":"        if block_migration is None:"},{"line_number":2301,"context_line":"            src \u003d instance_ref[\u0027host\u0027]"},{"line_number":2302,"context_line":"            try:"},{"line_number":2303,"context_line":"                self._ensure_host_in_aggregate(ctxt, src)"},{"line_number":2304,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":2305,"context_line":"                block_migration \u003d True"},{"line_number":2306,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_d6cee780","line":2303,"updated":"2018-03-13 16:21:29.000000000","message":"You\u0027re still calling this during live migration which does the \"up-call\" to the API database to get aggregate information, but the commit message said that\u0027s deprecated in this change, but I don\u0027t see how?","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"ff3182994bd0f39918ab407839a3fe89de8af0ac","unresolved":false,"context_lines":[{"line_number":2300,"context_line":"        if block_migration is None:"},{"line_number":2301,"context_line":"            src \u003d instance_ref[\u0027host\u0027]"},{"line_number":2302,"context_line":"            try:"},{"line_number":2303,"context_line":"                self._ensure_host_in_aggregate(ctxt, src)"},{"line_number":2304,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":2305,"context_line":"                block_migration \u003d True"},{"line_number":2306,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_40cdd782","line":2303,"in_reply_to":"df7087c5_d6cee780","updated":"2018-03-16 07:36:08.000000000","message":"Use another patch to fix it.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"4bcd4e9702fff8c803e1261f2d7f62f96e7ad641","unresolved":false,"context_lines":[{"line_number":2300,"context_line":"        if block_migration is None:"},{"line_number":2301,"context_line":"            src \u003d instance_ref[\u0027host\u0027]"},{"line_number":2302,"context_line":"            try:"},{"line_number":2303,"context_line":"                self._ensure_host_in_aggregate(ctxt, src)"},{"line_number":2304,"context_line":"            except exception.MigrationPreCheckError:"},{"line_number":2305,"context_line":"                block_migration \u003d True"},{"line_number":2306,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"df7087c5_5a80ad46","line":2303,"in_reply_to":"df7087c5_d6cee780","updated":"2018-03-14 02:20:45.000000000","message":"Will remove it in next patch, thanks, Matt.","commit_id":"c916833a6d63ee2495110aad90606feb151712a3"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a89ac8412f9581f296259bf9b160a43153e5eb99","unresolved":false,"context_lines":[{"line_number":2317,"context_line":"        \"\"\""},{"line_number":2318,"context_line":"        dest_check_data \u003d objects.XenapiLiveMigrateData()"},{"line_number":2319,"context_line":""},{"line_number":2320,"context_line":"        # Notes(eliqiao): if block_migration is None, we calculate it"},{"line_number":2321,"context_line":"        # by checking if src and dest node are in same aggregate"},{"line_number":2322,"context_line":"        src \u003d instance_ref[\u0027host\u0027]"},{"line_number":2323,"context_line":"        host_ref_set \u003d self._session.call_xenapi(\"host.get_by_name_label\","},{"line_number":2324,"context_line":"                                                 src)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_36cef559","line":2321,"range":{"start_line":2320,"start_character":8,"end_line":2321,"end_character":64},"updated":"2018-03-16 02:13:39.000000000","message":"Should keep the comments being before line-2330.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f310872ee21b494e6207abdc269284daab8ece1e","unresolved":false,"context_lines":[{"line_number":2317,"context_line":"        \"\"\""},{"line_number":2318,"context_line":"        dest_check_data \u003d objects.XenapiLiveMigrateData()"},{"line_number":2319,"context_line":""},{"line_number":2320,"context_line":"        # Notes(eliqiao): if block_migration is None, we calculate it"},{"line_number":2321,"context_line":"        # by checking if src and dest node are in same aggregate"},{"line_number":2322,"context_line":"        src \u003d instance_ref[\u0027host\u0027]"},{"line_number":2323,"context_line":"        host_ref_set \u003d self._session.call_xenapi(\"host.get_by_name_label\","},{"line_number":2324,"context_line":"                                                 src)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_4f58a8f8","line":2321,"range":{"start_line":2320,"start_character":8,"end_line":2321,"end_character":64},"in_reply_to":"df7087c5_36cef559","updated":"2018-03-16 05:36:03.000000000","message":"Will move it.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a89ac8412f9581f296259bf9b160a43153e5eb99","unresolved":false,"context_lines":[{"line_number":2323,"context_line":"        host_ref_set \u003d self._session.call_xenapi(\"host.get_by_name_label\","},{"line_number":2324,"context_line":"                                                 src)"},{"line_number":2325,"context_line":"        if len(host_ref_set) !\u003d 1:"},{"line_number":2326,"context_line":"            reason \u003d _(\u0027Destination host name %s is not uniqu.\u0027) % src"},{"line_number":2327,"context_line":"            msg \u003d _(\u0027Migration precheckError failed because: %s\u0027) % reason"},{"line_number":2328,"context_line":"            raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":2329,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_96f2616f","line":2326,"range":{"start_line":2326,"start_character":24,"end_line":2326,"end_character":45},"updated":"2018-03-16 02:13:39.000000000","message":"src is the source host name. isn\u0027t it?","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a89ac8412f9581f296259bf9b160a43153e5eb99","unresolved":false,"context_lines":[{"line_number":2323,"context_line":"        host_ref_set \u003d self._session.call_xenapi(\"host.get_by_name_label\","},{"line_number":2324,"context_line":"                                                 src)"},{"line_number":2325,"context_line":"        if len(host_ref_set) !\u003d 1:"},{"line_number":2326,"context_line":"            reason \u003d _(\u0027Destination host name %s is not uniqu.\u0027) % src"},{"line_number":2327,"context_line":"            msg \u003d _(\u0027Migration precheckError failed because: %s\u0027) % reason"},{"line_number":2328,"context_line":"            raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":2329,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_f6be3dac","line":2326,"range":{"start_line":2326,"start_character":56,"end_line":2326,"end_character":61},"updated":"2018-03-16 02:13:39.000000000","message":"unique\n\nAnd I\u0027d suggest saying something like: \"Multiple hosts have the same hostname: %s\"","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f310872ee21b494e6207abdc269284daab8ece1e","unresolved":false,"context_lines":[{"line_number":2323,"context_line":"        host_ref_set \u003d self._session.call_xenapi(\"host.get_by_name_label\","},{"line_number":2324,"context_line":"                                                 src)"},{"line_number":2325,"context_line":"        if len(host_ref_set) !\u003d 1:"},{"line_number":2326,"context_line":"            reason \u003d _(\u0027Destination host name %s is not uniqu.\u0027) % src"},{"line_number":2327,"context_line":"            msg \u003d _(\u0027Migration precheckError failed because: %s\u0027) % reason"},{"line_number":2328,"context_line":"            raise exception.MigrationPreCheckError(reason\u003dmsg)"},{"line_number":2329,"context_line":""}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_0f763071","line":2326,"range":{"start_line":2326,"start_character":56,"end_line":2326,"end_character":61},"in_reply_to":"df7087c5_f6be3dac","updated":"2018-03-16 05:36:03.000000000","message":"Will change it, thank you.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a89ac8412f9581f296259bf9b160a43153e5eb99","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                    self._generate_vdi_map("},{"line_number":2506,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2507,"context_line":"        vif_map \u003d {}"},{"line_number":2508,"context_line":"        if not vm_utils.is_same_pool_host(self._session,"},{"line_number":2509,"context_line":"                                          migrate_send_data.get(\u0027host\u0027)):"},{"line_number":2510,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2511,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_36259509","line":2508,"range":{"start_line":2508,"start_character":24,"end_line":2508,"end_character":41},"updated":"2018-03-16 02:13:39.000000000","message":"why only generate vif_uuid_map for hosts in same pool? What about the non-block live-migration?","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f310872ee21b494e6207abdc269284daab8ece1e","unresolved":false,"context_lines":[{"line_number":2505,"context_line":"                    self._generate_vdi_map("},{"line_number":2506,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2507,"context_line":"        vif_map \u003d {}"},{"line_number":2508,"context_line":"        if not vm_utils.is_same_pool_host(self._session,"},{"line_number":2509,"context_line":"                                          migrate_send_data.get(\u0027host\u0027)):"},{"line_number":2510,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2511,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_effbbcba","line":2508,"range":{"start_line":2508,"start_character":24,"end_line":2508,"end_character":41},"in_reply_to":"df7087c5_36259509","updated":"2018-03-16 05:36:03.000000000","message":"It only generated when they are not in the same pool. When using pooled migration we don\u0027t need it.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"a89ac8412f9581f296259bf9b160a43153e5eb99","unresolved":false,"context_lines":[{"line_number":2656,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2657,"context_line":"        for vif in network_info:"},{"line_number":2658,"context_line":"            try:"},{"line_number":2659,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2660,"context_line":"            except Exception:"},{"line_number":2661,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2662,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_d6745900","line":2659,"range":{"start_line":2659,"start_character":68,"end_line":2659,"end_character":77},"updated":"2018-03-16 02:13:39.000000000","message":"So is this a bug for the existing code regardless xapi pool? I\u0027d suggest fix it with a single bug.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"2033be5117efbd7f141313b63eb11ddeb6afe5e1","unresolved":false,"context_lines":[{"line_number":2656,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2657,"context_line":"        for vif in network_info:"},{"line_number":2658,"context_line":"            try:"},{"line_number":2659,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2660,"context_line":"            except Exception:"},{"line_number":2661,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2662,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_a02ab37b","line":2659,"range":{"start_line":2659,"start_character":68,"end_line":2659,"end_character":77},"in_reply_to":"df7087c5_d6745900","updated":"2018-03-16 07:30:42.000000000","message":"We add some unit tests to verify the code changes, one of which is related to this error, so it is better to keep it.\nnova.tests.unit.virt.xenapi.test_vmops.LiveMigrateHelperTestCase.test_delete_networks_and_bridges\nThat test would be failed.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"f310872ee21b494e6207abdc269284daab8ece1e","unresolved":false,"context_lines":[{"line_number":2656,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2657,"context_line":"        for vif in network_info:"},{"line_number":2658,"context_line":"            try:"},{"line_number":2659,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2660,"context_line":"            except Exception:"},{"line_number":2661,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2662,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":31,"id":"df7087c5_2f921458","line":2659,"range":{"start_line":2659,"start_character":68,"end_line":2659,"end_character":77},"in_reply_to":"df7087c5_d6745900","updated":"2018-03-16 05:36:03.000000000","message":"Will fix it in another bug.","commit_id":"d2078fdd61fbde9531d15e63722755e444b26304"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"cf8ed9ef8a0282aaf2a3a949472ced6716afb1ea","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2645,"context_line":"        for vif in network_info:"},{"line_number":2646,"context_line":"            try:"},{"line_number":2647,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2648,"context_line":"            except Exception:"},{"line_number":2649,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2650,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":34,"id":"df7087c5_f08db331","line":2647,"range":{"start_line":2647,"start_character":68,"end_line":2647,"end_character":77},"updated":"2018-03-19 08:33:23.000000000","message":"Per the definition of the function, I guess it should be vif instead of vif[\u0027id\u0027].\nhttps://git.openstack.org/cgit/openstack/nova/tree/nova/virt/xenapi/vif.py#n308","commit_id":"587c6981376a579181f8db952e95a1a4c7fc2bfa"},{"author":{"_account_id":17920,"name":"Jianghua Wang","email":"jianghua.wang@citrix.com","username":"wjhfresh"},"change_message_id":"9c68ce3af53a7ae7e5a2091d4f9bce7a58c44c30","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2645,"context_line":"        for vif in network_info:"},{"line_number":2646,"context_line":"            try:"},{"line_number":2647,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2648,"context_line":"            except Exception:"},{"line_number":2649,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2650,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":34,"id":"df7087c5_73468d24","line":2647,"range":{"start_line":2647,"start_character":68,"end_line":2647,"end_character":77},"in_reply_to":"df7087c5_b0b5fbcf","updated":"2018-03-19 09:00:06.000000000","message":"Ok. Thanks. So this is not to fix existing bug as commit message said; but this patch has updated the interface.","commit_id":"587c6981376a579181f8db952e95a1a4c7fc2bfa"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"dcab3734a84189ac45284e8e1def5113f08be821","unresolved":false,"context_lines":[{"line_number":2644,"context_line":"        # Unplug VIFs and delete networks"},{"line_number":2645,"context_line":"        for vif in network_info:"},{"line_number":2646,"context_line":"            try:"},{"line_number":2647,"context_line":"                self.vif_driver.delete_network_and_bridge(instance, vif[\u0027id\u0027])"},{"line_number":2648,"context_line":"            except Exception:"},{"line_number":2649,"context_line":"                LOG.exception(_(\u0027Failed to delete networks and bridges with \u0027"},{"line_number":2650,"context_line":"                                \u0027VIF %s\u0027), vif[\u0027id\u0027], instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":34,"id":"df7087c5_b0b5fbcf","line":2647,"range":{"start_line":2647,"start_character":68,"end_line":2647,"end_character":77},"in_reply_to":"df7087c5_f08db331","updated":"2018-03-19 08:35:45.000000000","message":"The new modification would directly use vif_id, not get id from vif structure.\nWe only need vif id in this function.","commit_id":"587c6981376a579181f8db952e95a1a4c7fc2bfa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ee0c267aae7948486714af19012b09634e85f5a5","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"                    self._generate_vdi_map("},{"line_number":2494,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2495,"context_line":"        vif_map \u003d {}"},{"line_number":2496,"context_line":"        if not vm_utils.host_in_this_pool(self._session,"},{"line_number":2497,"context_line":"                                          migrate_send_data.get(\u0027host\u0027)):"},{"line_number":2498,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2499,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_87f2be6e","line":2496,"updated":"2018-04-09 16:12:44.000000000","message":"A comment here might be useful. It looks like the logic is, if we\u0027re doing block migration to a host that\u0027s not in the same pool, then we need to pass along some networking information about the destination host?","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"},{"author":{"_account_id":25638,"name":"Naichuan Sun","email":"naichuan.sun@citrix.com","username":"naichuans"},"change_message_id":"3fa1df2ee20c432b60786c48375d00140033e8d7","unresolved":false,"context_lines":[{"line_number":2493,"context_line":"                    self._generate_vdi_map("},{"line_number":2494,"context_line":"                        sr_uuid_map[sr_uuid], vm_ref, sr_ref))"},{"line_number":2495,"context_line":"        vif_map \u003d {}"},{"line_number":2496,"context_line":"        if not vm_utils.host_in_this_pool(self._session,"},{"line_number":2497,"context_line":"                                          migrate_send_data.get(\u0027host\u0027)):"},{"line_number":2498,"context_line":"            vif_uuid_map \u003d None"},{"line_number":2499,"context_line":"            if \u0027vif_uuid_map\u0027 in migrate_data:"}],"source_content_type":"text/x-python","patch_set":37,"id":"bf659307_b0fdacb2","line":2496,"in_reply_to":"bf659307_87f2be6e","updated":"2018-04-10 01:34:18.000000000","message":"Yes, will add comments.","commit_id":"37fd55e44345d2f754a220bcc0bc0efa8944eae3"}]}
