)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"500bf8299b88e9461ecfe5f13ab4ae62359828c0","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jin Hui \u003cjinhuihh@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-11-18 14:33:41 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get the host by vm reference"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"in order to attach iscis disk to a VM, firstly need to get iscsi information such as hba and iscsi topology from that host where the VM resides. get_host_ref_for_vm should be used instead of get_host_ref which simply returns the first host in the managed cluster."},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_d61d6810","line":7,"updated":"2014-11-18 12:51:31.000000000","message":"please prefix this by VMware:","commit_id":"849a0c80c521a829cd1205ffb23154ad147c7150"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"500bf8299b88e9461ecfe5f13ab4ae62359828c0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get the host by vm reference"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"in order to attach iscis disk to a VM, firstly need to get iscsi information such as hba and iscsi topology from that host where the VM resides. get_host_ref_for_vm should be used instead of get_host_ref which simply returns the first host in the managed cluster."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"},{"line_number":12,"context_line":"Closes-Bug: 1386975"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_161450e7","line":9,"updated":"2014-11-18 12:51:31.000000000","message":"Please see https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"849a0c80c521a829cd1205ffb23154ad147c7150"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d84b9aac174d7078ded00044f6c68dba09bf061a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jin Hui \u003cjinhuihh@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2014-12-24 17:31:15 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get the host by vm reference"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_f0595136","line":7,"updated":"2015-01-12 13:37:15.000000000","message":"please prefix with VMware:","commit_id":"b157d94469b678b94fef969c360d58b0cfd4f5d6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d84b9aac174d7078ded00044f6c68dba09bf061a","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an isntance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"},{"line_number":13,"context_line":"get_host_ref which simply returns the first host in"},{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"3a961159_70456142","line":11,"range":{"start_line":11,"start_character":43,"end_line":11,"end_character":52},"updated":"2015-01-12 13:37:15.000000000","message":"isntance \u003d\u003e instance","commit_id":"b157d94469b678b94fef969c360d58b0cfd4f5d6"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"65f5fe585e13e0eee0c27b9c02aa6e5434ac3a0a","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"VMware: Get the host by vm reference"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an instance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a961159_4b396ff1","line":9,"updated":"2015-01-13 14:22:06.000000000","message":"typo: iscis -\u003e iscsi","commit_id":"b527b35cde046cf07e89efcc6769ec10c30cd4a5"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"bfae9e3435060d3e33108ed18e9e37085da48c8e","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an isntance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"},{"line_number":13,"context_line":"get_host_ref which simply returns the first host in"},{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"da86d52c_7f061322","line":11,"updated":"2015-02-02 09:20:13.000000000","message":"s/isntance/instance/","commit_id":"e21d6bb64cc1c0265575424ff3f19f4a5326a5e6"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jin Hui \u003cjinhuihh@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-09 14:22:38 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Get the host by vm reference"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"da86d52c_7694108b","line":7,"updated":"2015-02-11 09:30:44.000000000","message":"I think the title needs further rewriting like :\n\u0027Fix how VolumeOps is getting host information\u0027","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscis disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an isntance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"},{"line_number":13,"context_line":"get_host_ref which simply returns the first host in"},{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"da86d52c_965fc40e","line":11,"updated":"2015-02-11 09:30:44.000000000","message":"nit: s/isntance/instance","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"},{"line_number":15,"context_line":"first host in the cluster if no instance is specified."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Also change some unit tests to adopt the changes."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"},{"line_number":20,"context_line":"Closes-Bug: #1386975"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"da86d52c_56c54c8c","line":17,"updated":"2015-02-11 09:30:44.000000000","message":"That\u0027s implicit, you don\u0027t need to mention it","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e5678c2164d2003e91929b19b72a278364787fd1","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jin Hui \u003cjinhuihh@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-15 19:06:20 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix how VolumeOps is getting host information"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscsi disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"da86d52c_366d6a05","line":7,"updated":"2015-02-17 04:23:50.000000000","message":"prefix this with \"vmware:\", that\u0027s standard practice when working on virt-driver specific changes.","commit_id":"a30c3870040f2bd94a001fbcdd7201123035d363"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"f7c54c1fd9624e148c65fee1366d7ca3e4dcb87f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Jin Hui \u003cjinhuihh@cn.ibm.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-02-15 19:06:20 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix how VolumeOps is getting host information"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscsi disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":14,"id":"9a80dd14_7316b04d","line":7,"in_reply_to":"da86d52c_366d6a05","updated":"2015-03-09 10:28:27.000000000","message":"Done","commit_id":"a30c3870040f2bd94a001fbcdd7201123035d363"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"},{"line_number":15,"context_line":"first host in the cluster if no instance is specified."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"},{"line_number":20,"context_line":"Closes-Bug: #1386975"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a80dd14_aacc0b36","line":17,"updated":"2015-03-16 08:03:25.000000000","message":"Please explain why the DocImpact: for exampple motion will not work.\n\nPlease list all of the possible limitations and issues that can be encountered with this as discussed on the review","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":14,"context_line":"the managed cluster. get_host_ref is still used to get the"},{"line_number":15,"context_line":"first host in the cluster if no instance is specified."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"},{"line_number":20,"context_line":"Closes-Bug: #1386975"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":18,"id":"9a80dd14_84bf3bcf","line":17,"in_reply_to":"9a80dd14_aacc0b36","updated":"2015-03-16 09:25:07.000000000","message":"Done","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"345b0f36058bbbaabcedcd193f44db8a2754de52","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Vmware:Fix how VolumeOps is getting host information"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscsi disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an instance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"da9b358b_ad68a8bb","line":9,"updated":"2015-03-28 10:08:10.000000000","message":"first, it needs to*","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"7ca2d39db4fc62c0b35ba8628899b9e144a05cd3","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Vmware:Fix how VolumeOps is getting host information"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In order to attach iscsi disk to a VM, firstly need to"},{"line_number":10,"context_line":"get iscsi information such as hba and iscsi topology from"},{"line_number":11,"context_line":"that host where the VM resides. So when an instance is"},{"line_number":12,"context_line":"specified, use get_host_ref_for_vm instead of"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"da9b358b_4dc11c2e","line":9,"in_reply_to":"da9b358b_ad68a8bb","updated":"2015-03-28 10:58:42.000000000","message":"Done","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"345b0f36058bbbaabcedcd193f44db8a2754de52","unresolved":false,"context_lines":[{"line_number":20,"context_line":"1. you wouldn\u0027t be able to vMotion it."},{"line_number":21,"context_line":"2. you wouldn\u0027t be able to take the corresponding host down for"},{"line_number":22,"context_line":"maintenance without shutting down all instances running on it."},{"line_number":23,"context_line":"3. you wouldn\u0027t be able to migrate the instance util you detached"},{"line_number":24,"context_line":"all iscsi devices."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"da9b358b_6d62a0da","line":23,"updated":"2015-03-28 10:08:10.000000000","message":"until*","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"7ca2d39db4fc62c0b35ba8628899b9e144a05cd3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"1. you wouldn\u0027t be able to vMotion it."},{"line_number":21,"context_line":"2. you wouldn\u0027t be able to take the corresponding host down for"},{"line_number":22,"context_line":"maintenance without shutting down all instances running on it."},{"line_number":23,"context_line":"3. you wouldn\u0027t be able to migrate the instance util you detached"},{"line_number":24,"context_line":"all iscsi devices."},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Change-Id: I8e2b9725b9e99931731a9b1e52d799dca43bae74"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"da9b358b_2dddb814","line":23,"in_reply_to":"da9b358b_6d62a0da","updated":"2015-03-28 10:58:42.000000000","message":"Done","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"}],"nova/tests/unit/virt/vmwareapi/test_driver_api.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":1929,"context_line":"                self.instance, device, destroy_disk\u003dTrue)"},{"line_number":1930,"context_line":"        self.mox.ReplayAll()"},{"line_number":1931,"context_line":"        self.conn.detach_volume(connection_info, self.instance, mount_point,"},{"line_number":1932,"context_line":"                                encryption\u003dNone)"},{"line_number":1933,"context_line":""},{"line_number":1934,"context_line":"    def test_connection_info_get(self):"},{"line_number":1935,"context_line":"        self._create_vm()"}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_166cb4cf","line":1932,"updated":"2015-02-11 09:30:44.000000000","message":"you need to cover the case where instance arg is set to None","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"4a70890291978306dd22d0e2b8fe8a7fb1752ef3","unresolved":false,"context_lines":[{"line_number":1856,"context_line":"                                 \u0027_iscsi_get_target\u0027)"},{"line_number":1857,"context_line":"        # simulate target not found"},{"line_number":1858,"context_line":"        volumeops.VMwareVolumeOps._iscsi_get_target("},{"line_number":1859,"context_line":"            connection_info[\u0027data\u0027], self.instance).AndReturn((None, None))"},{"line_number":1860,"context_line":"        self.mox.StubOutWithMock(volumeops.VMwareVolumeOps,"},{"line_number":1861,"context_line":"                                 \u0027_iscsi_add_send_target_host\u0027)"},{"line_number":1862,"context_line":"        # rescan gets called with target portal"}],"source_content_type":"text/x-python","patch_set":11,"id":"da86d52c_7d71dfa7","line":1859,"updated":"2015-02-13 10:15:05.000000000","message":"You\u0027re missing some tests where the instance arg is set to None like you\u0027re doing in L313 here https://review.openstack.org/#/c/135182/11/nova/virt/vmwareapi/volumeops.py,cm\n\nAlso, I would prefer to see some specific tests for the new method that you\u0027re adding","commit_id":"5551524918598c98c33c0f06432210eb334b6fdc"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ab0006347434f3c6e54e8a36dee23bf354c26abf","unresolved":false,"context_lines":[{"line_number":1856,"context_line":"                                 \u0027_iscsi_get_target\u0027)"},{"line_number":1857,"context_line":"        # simulate target not found"},{"line_number":1858,"context_line":"        volumeops.VMwareVolumeOps._iscsi_get_target("},{"line_number":1859,"context_line":"            connection_info[\u0027data\u0027], self.instance).AndReturn((None, None))"},{"line_number":1860,"context_line":"        self.mox.StubOutWithMock(volumeops.VMwareVolumeOps,"},{"line_number":1861,"context_line":"                                 \u0027_iscsi_add_send_target_host\u0027)"},{"line_number":1862,"context_line":"        # rescan gets called with target portal"}],"source_content_type":"text/x-python","patch_set":11,"id":"9a80dd14_f302a008","line":1859,"in_reply_to":"da86d52c_7d71dfa7","updated":"2015-03-09 10:28:06.000000000","message":"Done","commit_id":"5551524918598c98c33c0f06432210eb334b6fdc"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"345b0f36058bbbaabcedcd193f44db8a2754de52","unresolved":false,"context_lines":[{"line_number":1779,"context_line":"                                encryption\u003dNone)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"    def test_attach_iscsi_disk_to_vm(self):"},{"line_number":1782,"context_line":"        self._create_vm(node \u003d self.node_name2)"},{"line_number":1783,"context_line":"        connection_info \u003d self._test_vmdk_connection_info(\u0027iscsi\u0027)"},{"line_number":1784,"context_line":"        connection_info[\u0027data\u0027][\u0027target_portal\u0027] \u003d \u0027fake_target_host:port\u0027"},{"line_number":1785,"context_line":"        connection_info[\u0027data\u0027][\u0027target_iqn\u0027] \u003d \u0027fake_target_iqn\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"da9b358b_2d9b78cb","line":1782,"updated":"2015-03-28 10:08:10.000000000","message":"there shouldn\u0027t be any spaces around the \u0027\u003d\u0027 at key-value arguments. use instead:\n\n    node\u003dself.node_name2","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"7ca2d39db4fc62c0b35ba8628899b9e144a05cd3","unresolved":false,"context_lines":[{"line_number":1779,"context_line":"                                encryption\u003dNone)"},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"    def test_attach_iscsi_disk_to_vm(self):"},{"line_number":1782,"context_line":"        self._create_vm(node \u003d self.node_name2)"},{"line_number":1783,"context_line":"        connection_info \u003d self._test_vmdk_connection_info(\u0027iscsi\u0027)"},{"line_number":1784,"context_line":"        connection_info[\u0027data\u0027][\u0027target_portal\u0027] \u003d \u0027fake_target_host:port\u0027"},{"line_number":1785,"context_line":"        connection_info[\u0027data\u0027][\u0027target_iqn\u0027] \u003d \u0027fake_target_iqn\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"da9b358b_0de2f4d5","line":1782,"in_reply_to":"da9b358b_2d9b78cb","updated":"2015-03-28 10:58:42.000000000","message":"Done","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"54f5712e460fe8b3f25627f3be9a539e0bc6d175","unresolved":false,"context_lines":[{"line_number":1789,"context_line":"                                 \u0027_iscsi_get_target\u0027)"},{"line_number":1790,"context_line":"        # simulate target not found"},{"line_number":1791,"context_line":"        volumeops.VMwareVolumeOps._iscsi_get_target("},{"line_number":1792,"context_line":"            connection_info[\u0027data\u0027], self.instance).AndReturn((None, None))"},{"line_number":1793,"context_line":"        self.mox.StubOutWithMock(volumeops.VMwareVolumeOps,"},{"line_number":1794,"context_line":"                                 \u0027_iscsi_add_send_target_host\u0027)"},{"line_number":1795,"context_line":"        # rescan gets called with target portal"}],"source_content_type":"text/x-python","patch_set":25,"id":"dac4157f_6d4b7888","line":1792,"updated":"2015-04-21 11:55:08.000000000","message":"IMHO we should just mock the new private method","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"}],"nova/tests/unit/virt/vmwareapi/test_volumeops.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                             constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":252,"context_line":"                             constants.ADAPTER_TYPE_PARAVIRTUAL):"},{"line_number":253,"context_line":"            self._test_attach_volume_iscsi(adapter_type)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_get_host_by_instance(self):"},{"line_number":256,"context_line":"        fake_host_ref \u003d \u0027fake-host-ref\u0027"},{"line_number":257,"context_line":"        fake_first_host_ref \u003d \u0027fake-first-host-ref\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_4ae38fa3","line":254,"updated":"2015-03-16 08:03:25.000000000","message":"@mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,\n                   return_value\u003d\u0027fake-host_ref\u0027)","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":251,"context_line":"                             constants.ADAPTER_TYPE_LSILOGICSAS,"},{"line_number":252,"context_line":"                             constants.ADAPTER_TYPE_PARAVIRTUAL):"},{"line_number":253,"context_line":"            self._test_attach_volume_iscsi(adapter_type)"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":"    def test_get_host_by_instance(self):"},{"line_number":256,"context_line":"        fake_host_ref \u003d \u0027fake-host-ref\u0027"},{"line_number":257,"context_line":"        fake_first_host_ref \u003d \u0027fake-first-host-ref\u0027"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_c4b5b3ed","line":254,"in_reply_to":"9a80dd14_4ae38fa3","updated":"2015-03-16 09:25:07.000000000","message":"Done","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        fake_host_ref \u003d \u0027fake-host-ref\u0027"},{"line_number":257,"context_line":"        fake_first_host_ref \u003d \u0027fake-first-host-ref\u0027"},{"line_number":258,"context_line":"        with contextlib.nested("},{"line_number":259,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,"},{"line_number":260,"context_line":"                              return_value\u003dfake_host_ref),"},{"line_number":261,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027,"},{"line_number":262,"context_line":"                              return_value\u003dfake_first_host_ref)):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_6ade93db","line":259,"updated":"2015-03-16 08:03:25.000000000","message":"this can be a decorator of the method and we can save line 255.","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":256,"context_line":"        fake_host_ref \u003d \u0027fake-host-ref\u0027"},{"line_number":257,"context_line":"        fake_first_host_ref \u003d \u0027fake-first-host-ref\u0027"},{"line_number":258,"context_line":"        with contextlib.nested("},{"line_number":259,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,"},{"line_number":260,"context_line":"                              return_value\u003dfake_host_ref),"},{"line_number":261,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027,"},{"line_number":262,"context_line":"                              return_value\u003dfake_first_host_ref)):"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_24c68f68","line":259,"in_reply_to":"9a80dd14_6ade93db","updated":"2015-03-16 09:25:07.000000000","message":"Done","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        with contextlib.nested("},{"line_number":259,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,"},{"line_number":260,"context_line":"                              return_value\u003dfake_host_ref),"},{"line_number":261,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027,"},{"line_number":262,"context_line":"                              return_value\u003dfake_first_host_ref)):"},{"line_number":263,"context_line":"            host_ref \u003d self._volumeops._get_host_by_instance(self._instance)"},{"line_number":264,"context_line":"            first_host_ref \u003d self._volumeops._get_host_by_instance()"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_8af02768","line":261,"updated":"2015-03-16 08:03:25.000000000","message":"ditto","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        with contextlib.nested("},{"line_number":259,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,"},{"line_number":260,"context_line":"                              return_value\u003dfake_host_ref),"},{"line_number":261,"context_line":"            mock.patch.object(vm_util, \u0027get_host_ref\u0027,"},{"line_number":262,"context_line":"                              return_value\u003dfake_first_host_ref)):"},{"line_number":263,"context_line":"            host_ref \u003d self._volumeops._get_host_by_instance(self._instance)"},{"line_number":264,"context_line":"            first_host_ref \u003d self._volumeops._get_host_by_instance()"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_64a327b2","line":261,"in_reply_to":"9a80dd14_8af02768","updated":"2015-03-16 09:25:07.000000000","message":"Done","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def test_get_volume_connector_with_none_instance(self):"},{"line_number":269,"context_line":"        with contextlib.nested("},{"line_number":270,"context_line":"            mock.patch.object(vm_util, \u0027get_vm_ref\u0027),"},{"line_number":271,"context_line":"            mock.patch.object(self._volumeops, \u0027_iscsi_get_host_iqn\u0027)"},{"line_number":272,"context_line":"        ) as (get_vm_ref, iscsi_get_host_iqn):"},{"line_number":273,"context_line":"            get_vm_ref.side_effect \u003d exception.InstanceNotFound(\u0027Not Found\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_6af5b34f","line":270,"updated":"2015-03-16 08:03:25.000000000","message":"these can be decorators","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":267,"context_line":""},{"line_number":268,"context_line":"    def test_get_volume_connector_with_none_instance(self):"},{"line_number":269,"context_line":"        with contextlib.nested("},{"line_number":270,"context_line":"            mock.patch.object(vm_util, \u0027get_vm_ref\u0027),"},{"line_number":271,"context_line":"            mock.patch.object(self._volumeops, \u0027_iscsi_get_host_iqn\u0027)"},{"line_number":272,"context_line":"        ) as (get_vm_ref, iscsi_get_host_iqn):"},{"line_number":273,"context_line":"            get_vm_ref.side_effect \u003d exception.InstanceNotFound(\u0027Not Found\u0027)"}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_84a65bbf","line":270,"in_reply_to":"9a80dd14_6af5b34f","updated":"2015-03-16 09:25:07.000000000","message":"Done","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"b13cc79a9a80ccb823018084af07821da8700937","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    @mock.patch.object(volumeops.VMwareVolumeOps,"},{"line_number":260,"context_line":"                       \u0027_get_vmdk_base_volume_device\u0027)"},{"line_number":261,"context_line":"    @mock.patch.object(volumeops.VMwareVolumeOps, \u0027_relocate_vmdk_volume\u0027)"},{"line_number":262,"context_line":"    def test_consolidate_vmdk_volume_with_no_relocate("},{"line_number":263,"context_line":"            self, relocate_vmdk_volume, get_vmdk_base_volume_device):"},{"line_number":264,"context_line":"        file_name \u003d mock.sentinel.file_name"},{"line_number":265,"context_line":"        backing \u003d mock.Mock(fileName\u003dfile_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5aa745d1_1ef32e0c","side":"PARENT","line":262,"updated":"2015-04-16 13:05:58.000000000","message":"why is this method being removed? the method _consolidate_vmdk_volume still exists.","commit_id":"feef80c1f88cc28f8625b19ebf43b190fae0ca08"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"2fefb16a72dabbdd147daa8e2b9414c1350d0797","unresolved":false,"context_lines":[{"line_number":259,"context_line":"    @mock.patch.object(volumeops.VMwareVolumeOps,"},{"line_number":260,"context_line":"                       \u0027_get_vmdk_base_volume_device\u0027)"},{"line_number":261,"context_line":"    @mock.patch.object(volumeops.VMwareVolumeOps, \u0027_relocate_vmdk_volume\u0027)"},{"line_number":262,"context_line":"    def test_consolidate_vmdk_volume_with_no_relocate("},{"line_number":263,"context_line":"            self, relocate_vmdk_volume, get_vmdk_base_volume_device):"},{"line_number":264,"context_line":"        file_name \u003d mock.sentinel.file_name"},{"line_number":265,"context_line":"        backing \u003d mock.Mock(fileName\u003dfile_name)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5aa745d1_076bde1f","side":"PARENT","line":262,"in_reply_to":"5aa745d1_1ef32e0c","updated":"2015-04-16 14:24:45.000000000","message":"Done","commit_id":"feef80c1f88cc28f8625b19ebf43b190fae0ca08"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"b13cc79a9a80ccb823018084af07821da8700937","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        host_ref \u003d self._volumeops._get_host_by_instance(self._instance)"},{"line_number":311,"context_line":"        first_host_ref \u003d self._volumeops._get_host_by_instance()"},{"line_number":312,"context_line":"        self.assertEqual(fake_host_ref, host_ref)"},{"line_number":313,"context_line":"        self.assertEqual(fake_first_host_ref, first_host_ref)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027)"},{"line_number":316,"context_line":"    def test_get_volume_connector_with_none_instance(self, get_vm_ref):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5aa745d1_9e4bbe59","line":313,"updated":"2015-04-16 13:05:58.000000000","message":"this looks like it could be 2 separate unit tests.","commit_id":"05288fefa917aa84788b508758fb36df4169937e"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"2fefb16a72dabbdd147daa8e2b9414c1350d0797","unresolved":false,"context_lines":[{"line_number":310,"context_line":"        host_ref \u003d self._volumeops._get_host_by_instance(self._instance)"},{"line_number":311,"context_line":"        first_host_ref \u003d self._volumeops._get_host_by_instance()"},{"line_number":312,"context_line":"        self.assertEqual(fake_host_ref, host_ref)"},{"line_number":313,"context_line":"        self.assertEqual(fake_first_host_ref, first_host_ref)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027)"},{"line_number":316,"context_line":"    def test_get_volume_connector_with_none_instance(self, get_vm_ref):"}],"source_content_type":"text/x-python","patch_set":23,"id":"5aa745d1_276eda2f","line":313,"in_reply_to":"5aa745d1_9e4bbe59","updated":"2015-04-16 14:24:45.000000000","message":"Done","commit_id":"05288fefa917aa84788b508758fb36df4169937e"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"23867d4f9616479132f3c93099b1d6f83dff54a0","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            get_vm_ref.assert_called_once_with(self._volumeops._session,"},{"line_number":235,"context_line":"                                               self._instance)"},{"line_number":236,"context_line":"            iscsi_discover_target.assert_called_once_with("},{"line_number":237,"context_line":"                connection_info[\u0027data\u0027])"},{"line_number":238,"context_line":"            if adapter_type is None:"},{"line_number":239,"context_line":"                self.assertTrue(get_scsi_adapter_type.called)"}],"source_content_type":"text/x-python","patch_set":24,"id":"fabf19d9_0ebafbe1","line":236,"updated":"2015-04-18 12:39:31.000000000","message":"you added a new argument (instance) to _iscsi_discover_target, which is the cause of your unit test failure. This method is called w/ an instance argument.","commit_id":"6f2a8f03a25851ac0e3d1ff28a77c21bd154deb1"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"318838e533aef5a7003163ed60e45e016c03a17c","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"            get_vm_ref.assert_called_once_with(self._volumeops._session,"},{"line_number":235,"context_line":"                                               self._instance)"},{"line_number":236,"context_line":"            iscsi_discover_target.assert_called_once_with("},{"line_number":237,"context_line":"                connection_info[\u0027data\u0027])"},{"line_number":238,"context_line":"            if adapter_type is None:"},{"line_number":239,"context_line":"                self.assertTrue(get_scsi_adapter_type.called)"}],"source_content_type":"text/x-python","patch_set":24,"id":"dac4157f_42c4483f","line":236,"in_reply_to":"fabf19d9_0ebafbe1","updated":"2015-04-19 02:07:55.000000000","message":"Done","commit_id":"6f2a8f03a25851ac0e3d1ff28a77c21bd154deb1"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3367226a0707237d18f0a0228aeeeefa301fdbb3","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            volume_ref, instance, adapter_type, disk_type,"},{"line_number":322,"context_line":"            vmdk_path\u003dnew_file_name)"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"    @mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027)"},{"line_number":325,"context_line":"    def test_get_host_by_instance(self, host_ref_for_vm):"},{"line_number":326,"context_line":"        fake_host_ref \u003d \u0027fake-host-ref\u0027"},{"line_number":327,"context_line":"        host_ref_for_vm.return_value \u003d fake_host_ref"}],"source_content_type":"text/x-python","patch_set":25,"id":"bab921fb_a4cb2072","line":324,"updated":"2015-04-23 06:10:28.000000000","message":"@mock.patch.object(vm_util, \u0027get_host_ref_for_vm\u0027,\n                       return_value\u003d\u0027fake-host-ref\u0027)\n    def test_get_host_by_instance(self, host_ref_for_vm):\n        host_ref \u003d self._volumeops._get_host_by_instance(self._instance)\n        self.assertEqual(\u0027fake-host-ref\u0027, host_ref)","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3367226a0707237d18f0a0228aeeeefa301fdbb3","unresolved":false,"context_lines":[{"line_number":328,"context_line":"        host_ref \u003d self._volumeops._get_host_by_instance(self._instance)"},{"line_number":329,"context_line":"        self.assertEqual(fake_host_ref, host_ref)"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"    @mock.patch.object(vm_util, \u0027get_host_ref\u0027)"},{"line_number":332,"context_line":"    def test_get_host_by_non_instance(self, host_ref):"},{"line_number":333,"context_line":"        fake_first_host_ref \u003d \u0027fake-first-host-ref\u0027"},{"line_number":334,"context_line":"        host_ref.return_value \u003d fake_first_host_ref"}],"source_content_type":"text/x-python","patch_set":25,"id":"bab921fb_84c81c76","line":331,"updated":"2015-04-23 06:10:28.000000000","message":"same here","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"54f5712e460fe8b3f25627f3be9a539e0bc6d175","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        self.assertEqual(fake_first_host_ref, first_host_ref)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027)"},{"line_number":339,"context_line":"    def test_get_volume_connector_with_none_instance(self, get_vm_ref):"},{"line_number":340,"context_line":"        with contextlib.nested("},{"line_number":341,"context_line":"            mock.patch.object(self._volumeops, \u0027_iscsi_get_host_iqn\u0027)"},{"line_number":342,"context_line":"        ) as iscsi_get_host_iqn:"}],"source_content_type":"text/x-python","patch_set":25,"id":"dac4157f_4d4e7497","line":339,"updated":"2015-04-21 11:55:08.000000000","message":"that\u0027s really nice to add this test, but there is no other unittest for the same method, could you please add the others ?","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"54f5712e460fe8b3f25627f3be9a539e0bc6d175","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @mock.patch.object(vm_util, \u0027get_vm_ref\u0027)"},{"line_number":339,"context_line":"    def test_get_volume_connector_with_none_instance(self, get_vm_ref):"},{"line_number":340,"context_line":"        with contextlib.nested("},{"line_number":341,"context_line":"            mock.patch.object(self._volumeops, \u0027_iscsi_get_host_iqn\u0027)"},{"line_number":342,"context_line":"        ) as iscsi_get_host_iqn:"},{"line_number":343,"context_line":"            get_vm_ref.side_effect \u003d exception.InstanceNotFound(\u0027Not Found\u0027)"}],"source_content_type":"text/x-python","patch_set":25,"id":"dac4157f_2d45806f","line":340,"updated":"2015-04-21 11:55:08.000000000","message":"hit: contextlib.nested is no longer needed since py2.7, you can remove it","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"}],"nova/virt/vmwareapi/volumeops.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"500bf8299b88e9461ecfe5f13ab4ae62359828c0","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            #should use instance to get the real host."},{"line_number":127,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"},{"line_number":128,"context_line":"        else:"},{"line_number":129,"context_line":"            #should not be here"},{"line_number":130,"context_line":"            host_mor \u003d vm_util.get_host_ref(self._session, self._cluster)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        lst_properties \u003d [\"config.storageDevice.hostBusAdapter\","}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_96b680f7","line":129,"updated":"2014-11-18 12:51:31.000000000","message":"i do not understand the comment\n\nwe should raise an exception here if the code should never get to this flow","commit_id":"849a0c80c521a829cd1205ffb23154ad147c7150"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"500bf8299b88e9461ecfe5f13ab4ae62359828c0","unresolved":false,"context_lines":[{"line_number":212,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"},{"line_number":213,"context_line":"        else:"},{"line_number":214,"context_line":"            #should not be here"},{"line_number":215,"context_line":"            host_mor \u003d vm_util.get_host_ref(self._session, self._cluster)"},{"line_number":216,"context_line":"        storage_system_mor \u003d self._session._call_method("},{"line_number":217,"context_line":"            vim_util, \"get_dynamic_property\","},{"line_number":218,"context_line":"            host_mor, \"HostSystem\","}],"source_content_type":"text/x-python","patch_set":1,"id":"5a890539_56a7b8bc","line":215,"updated":"2014-11-18 12:51:31.000000000","message":"same comments as above","commit_id":"849a0c80c521a829cd1205ffb23154ad147c7150"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"bfae9e3435060d3e33108ed18e9e37085da48c8e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                  {\u0027instance_name\u0027: instance_name, \u0027disk_key\u0027: disk_key},"},{"line_number":120,"context_line":"                  instance\u003dinstance)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _iscsi_get_target(self, data, instance \u003d None):"},{"line_number":123,"context_line":"        \"\"\"Return the iSCSI Target given a volume info. If instance is None,"},{"line_number":124,"context_line":"           will return the iscsi target on the first host of the cluster."},{"line_number":125,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_9f9027ee","line":122,"updated":"2015-02-02 09:20:13.000000000","message":"Please remove the blank around equal sign, keep consistency with other interfaces.","commit_id":"e21d6bb64cc1c0265575424ff3f19f4a5326a5e6"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"bfae9e3435060d3e33108ed18e9e37085da48c8e","unresolved":false,"context_lines":[{"line_number":207,"context_line":"            self._session.vim, \"AddInternetScsiSendTargets\","},{"line_number":208,"context_line":"            storage_system_mor, iScsiHbaDevice\u003dhba_device, targets\u003d[send_tgt])"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _iscsi_rescan_hba(self, target_portal, instance \u003d None):"},{"line_number":211,"context_line":"        \"\"\"Rescan the iSCSI HBA to discover iSCSI targets. If the instance is None,"},{"line_number":212,"context_line":"           will scan the hba on the first host of the cluster"},{"line_number":213,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_9fa7474f","line":210,"updated":"2015-02-02 09:20:13.000000000","message":"ditto.","commit_id":"e21d6bb64cc1c0265575424ff3f19f4a5326a5e6"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"bfae9e3435060d3e33108ed18e9e37085da48c8e","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            \"RescanHba\", storage_system_mor, hbaDevice\u003dhba_device)"},{"line_number":251,"context_line":"        LOG.debug(\"Rescanned HBA %s \", hba_device)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _iscsi_discover_target(self, data, instance \u003d None):"},{"line_number":254,"context_line":"        \"\"\"Get iSCSI target, rescanning the HBA if necessary.\"\"\""},{"line_number":255,"context_line":"        target_portal \u003d data[\u0027target_portal\u0027]"},{"line_number":256,"context_line":"        target_iqn \u003d data[\u0027target_iqn\u0027]"}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_bf632b19","line":253,"updated":"2015-02-02 09:20:13.000000000","message":"ditto.","commit_id":"e21d6bb64cc1c0265575424ff3f19f4a5326a5e6"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"bfae9e3435060d3e33108ed18e9e37085da48c8e","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                       \u0027target_portal\u0027: target_portal})"},{"line_number":280,"context_line":"        return (device_name, uuid)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def _iscsi_get_host_iqn(self, instance \u003d None):"},{"line_number":283,"context_line":"        \"\"\"Return the host iSCSI IQN. If instance is None, the iqn of the"},{"line_number":284,"context_line":"           first host of the cluster will be returned."},{"line_number":285,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da86d52c_ff6da305","line":282,"updated":"2015-02-02 09:20:13.000000000","message":"ditto.","commit_id":"e21d6bb64cc1c0265575424ff3f19f4a5326a5e6"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"db650619872e89a436f93fed930abe3ffe1027a7","unresolved":false,"context_lines":[{"line_number":129,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"},{"line_number":130,"context_line":"        else:"},{"line_number":131,"context_line":"            # use the first host of the cluster"},{"line_number":132,"context_line":"            host_mor \u003d vm_util.get_host_ref(self._session, self._cluster)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"        lst_properties \u003d [\"config.storageDevice.hostBusAdapter\","},{"line_number":135,"context_line":"                          \"config.storageDevice.scsiTopology\","}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_9a2227a1","line":132,"updated":"2015-02-06 12:08:44.000000000","message":"It seems like this chunk should be a method. That\u0027s what should be calculated in advance and passed to these functions, not the whole instance.","commit_id":"13c256d9cec646753e4d4e578155e70e6291e0e8"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"816ab8af7596b145b8522f3d9906421970f7f50f","unresolved":false,"context_lines":[{"line_number":308,"context_line":"            vm_ref \u003d vm_util.get_vm_ref(self._session, instance)"},{"line_number":309,"context_line":"        except exception.InstanceNotFound:"},{"line_number":310,"context_line":"            vm_ref \u003d None"},{"line_number":311,"context_line":"        iqn \u003d self._iscsi_get_host_iqn(instance if vm_ref else None)"},{"line_number":312,"context_line":"        connector \u003d {\u0027ip\u0027: CONF.vmware.host_ip,"},{"line_number":313,"context_line":"                     \u0027initiator\u0027: iqn,"},{"line_number":314,"context_line":"                     \u0027host\u0027: CONF.vmware.host_ip}"}],"source_content_type":"text/x-python","patch_set":8,"id":"da86d52c_b553d5e0","line":311,"updated":"2015-02-04 15:02:23.000000000","message":"This might be outside the scope of this patch, but if the instance is not found why is this returning data here?","commit_id":"13c256d9cec646753e4d4e578155e70e6291e0e8"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":214,"context_line":"        if instance:"},{"line_number":215,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"},{"line_number":216,"context_line":"        else:"},{"line_number":217,"context_line":"            host_mor \u003d vm_util.get_host_ref(self._session, self._cluster)"},{"line_number":218,"context_line":"        storage_system_mor \u003d self._session._call_method("},{"line_number":219,"context_line":"            vim_util, \"get_dynamic_property\","},{"line_number":220,"context_line":"            host_mor, \"HostSystem\","}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_165674ce","line":217,"updated":"2015-02-11 09:30:44.000000000","message":"I liked your comment on L131, you could maybe factorize all your conditionals into one single helper method for getting the host value so that you could be explicit on your else statement","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"304d305f05835d5873ceb6c9f73c8dd5c494cdef","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        if instance:"},{"line_number":287,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"},{"line_number":288,"context_line":"        else:"},{"line_number":289,"context_line":"            host_mor \u003d vm_util.get_host_ref(self._session, self._cluster)"},{"line_number":290,"context_line":"        hbas_ret \u003d self._session._call_method("},{"line_number":291,"context_line":"            vim_util, \"get_dynamic_property\","},{"line_number":292,"context_line":"            host_mor, \"HostSystem\","}],"source_content_type":"text/x-python","patch_set":9,"id":"da86d52c_1624b45e","line":289,"updated":"2015-02-11 09:30:44.000000000","message":"yeah, I think you need to factorize...","commit_id":"48fa6ff2623103120dc7f0cb6ae2a871cf38cde3"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ac992a6cc8bdde44ef39bdda3f54fde99d20f416","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                  {\u0027instance_name\u0027: instance_name, \u0027disk_key\u0027: disk_key},"},{"line_number":120,"context_line":"                  instance\u003dinstance)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _get_host_by_instance(self, instance\u003dNone):"},{"line_number":123,"context_line":"        \"\"\"If the instance is not None, return the host mor in which the"},{"line_number":124,"context_line":"           instance resides. If the instance is None, return the first host of"},{"line_number":125,"context_line":"           the cluster."}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_aac16be5","line":122,"updated":"2015-03-16 08:03:25.000000000","message":"can we please have a specific unit test for this method?","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"ac4485805880abe770f2ad6390ad12c0e1432241","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                  {\u0027instance_name\u0027: instance_name, \u0027disk_key\u0027: disk_key},"},{"line_number":120,"context_line":"                  instance\u003dinstance)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _get_host_by_instance(self, instance\u003dNone):"},{"line_number":123,"context_line":"        \"\"\"If the instance is not None, return the host mor in which the"},{"line_number":124,"context_line":"           instance resides. If the instance is None, return the first host of"},{"line_number":125,"context_line":"           the cluster."}],"source_content_type":"text/x-python","patch_set":18,"id":"9a80dd14_c49a1361","line":122,"in_reply_to":"9a80dd14_aac16be5","updated":"2015-03-16 09:25:07.000000000","message":"already add a unit test for it at line 257 in nova/tests/unit/virt/vmwareapi/test_volumeops.py","commit_id":"cde2d3ea3c1616d51fb9711fe18fb08d3ac79e4c"},{"author":{"_account_id":8213,"name":"Claudiu Belu","email":"cbelu@cloudbasesolutions.com","username":"claudiub"},"change_message_id":"345b0f36058bbbaabcedcd193f44db8a2754de52","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def _get_host_by_instance(self, instance\u003dNone):"},{"line_number":117,"context_line":"        \"\"\"If the instance is not None, return the host mor in which the"},{"line_number":118,"context_line":"           instance resides. If the instance is None, return the first host of"},{"line_number":119,"context_line":"           the cluster."},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        if instance:"},{"line_number":122,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"}],"source_content_type":"text/x-python","patch_set":20,"id":"da9b358b_6d906096","line":119,"updated":"2015-03-28 10:08:10.000000000","message":"Question: what would be the effects of always returning the 1st host of the cluster? Can it happen that it will have a much larger workload because of this?\n\nAlso, wouldn\u0027t returning a random host be a better solution?","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":12927,"name":"Lan Qi song","email":"lqs933@foxmail.com","username":"lqisong"},"change_message_id":"7ca2d39db4fc62c0b35ba8628899b9e144a05cd3","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    def _get_host_by_instance(self, instance\u003dNone):"},{"line_number":117,"context_line":"        \"\"\"If the instance is not None, return the host mor in which the"},{"line_number":118,"context_line":"           instance resides. If the instance is None, return the first host of"},{"line_number":119,"context_line":"           the cluster."},{"line_number":120,"context_line":"        \"\"\""},{"line_number":121,"context_line":"        if instance:"},{"line_number":122,"context_line":"            host_mor \u003d vm_util.get_host_ref_for_vm(self._session, instance)"}],"source_content_type":"text/x-python","patch_set":20,"id":"da9b358b_8dc72445","line":119,"in_reply_to":"da9b358b_6d906096","updated":"2015-03-28 10:58:42.000000000","message":"Actually, only the line at 307(method get_volume_connector) would pass the (instance\u003dNone) to this method, and this condition, return the first host  and return a random one has the same effect, It won\u0027t cause a larger workload to the first host.","commit_id":"a89d9fb5c25e9b58638e4fda2b7b4abba78e7fcd"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3367226a0707237d18f0a0228aeeeefa301fdbb3","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                  instance\u003dinstance)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _get_host_by_instance(self, instance\u003dNone):"},{"line_number":117,"context_line":"        \"\"\"If the instance is not None, return the host mor in which the"},{"line_number":118,"context_line":"           instance resides. If the instance is None, return the first host of"},{"line_number":119,"context_line":"           the cluster."},{"line_number":120,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":25,"id":"bab921fb_a4920056","line":117,"updated":"2015-04-23 06:10:28.000000000","message":"mor \u003d\u003e moref","commit_id":"e2c586d0af27a59b4d6b54b71968524f99efa63d"}]}
