)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     hartsocks \u003chartsocks@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-09-21 04:57:28 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fixes datastore selection bug 1227825"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the vmwareapi drivers will only select the first"},{"line_number":10,"context_line":"available datastore it finds, even when there are other"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAS3%2F%2FoGY%3D","line":7,"updated":"2013-09-23 19:11:46.000000000","message":"you do not need the bug no here - it is below\n\nit is helpful to prefix this header with VMware","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"d7fd4c69bfc1320817821ec25d02b6fad5280171","unresolved":false,"context_lines":[{"line_number":11,"context_line":"datastores with capacity, it will fill one datastore completely"},{"line_number":12,"context_line":"and then die."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"fixes bug: 1227825"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I24f85114ea3f014950c27c0c91a6be352990d263"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAS3%2F%2FsWo%3D","line":14,"updated":"2013-09-21 13:42:07.000000000","message":"btw, it would be good to start using the new bug syntax:\n\n    Closes-bug: #1227825\n\nmore info: https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"32668591a7d2455bb456177f397b6c2c25b76c79","unresolved":false,"context_lines":[{"line_number":11,"context_line":"datastores with capacity, it will fill one datastore completely"},{"line_number":12,"context_line":"and then die."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"fixes bug: 1227825"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I24f85114ea3f014950c27c0c91a6be352990d263"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"AAAAS3%2F%2FoZY%3D","line":14,"in_reply_to":"AAAAS3%2F%2FsWo%3D","updated":"2013-09-23 17:48:22.000000000","message":"Done","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b1a71d7eaec5017d8cb7185f89d05407dced2a76","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     hartsocks \u003chartsocks@vmware.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2013-09-23 13:09:36 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"fixes datastore selection bug 1227825"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently the vmwareapi drivers will only select the first"},{"line_number":10,"context_line":"available datastore it finds, even when there are other"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAS3%2F%2Flzc%3D","line":7,"updated":"2013-09-24 08:59:30.000000000","message":"Consider changing this to:\n\nVMware: fix datastore selection\n\nThe bug number is referenced below","commit_id":"6df1b94b01364acd129a3441b37ea0436fb2ec00"}],"nova/tests/virt/vmwareapi/test_vmwareapi_vm_util.py":[{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"3d79e00e134c749d689c156d94ce46a399a8a861","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        object \u003d ObjectContent(propSet\u003d["},{"line_number":290,"context_line":"                    DynamicProperty(name\u003d\u0027foo\u0027, val\u003d\"bar\")])"},{"line_number":291,"context_line":"        propset \u003d vm_util.propset_dict(object.propSet)"},{"line_number":292,"context_line":"        self.assertEqual(\"bar\", propset[\u0027foo\u0027])"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_propset_dict_complex(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FjDA%3D","line":291,"updated":"2013-09-24 21:09:08.000000000","message":"we are converting propset into a dict, so can we please rename the \"propset\" variable into something appropriate that denotes that it is a dict?","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        object \u003d ObjectContent(propSet\u003d["},{"line_number":290,"context_line":"                    DynamicProperty(name\u003d\u0027foo\u0027, val\u003d\"bar\")])"},{"line_number":291,"context_line":"        propset \u003d vm_util.propset_dict(object.propSet)"},{"line_number":292,"context_line":"        self.assertEqual(\"bar\", propset[\u0027foo\u0027])"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def test_propset_dict_complex(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgKI%3D","line":291,"in_reply_to":"AAAAS3%2F%2FjDA%3D","updated":"2013-09-25 16:22:11.000000000","message":"good point.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"3d79e00e134c749d689c156d94ce46a399a8a861","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                    val\u003dMoRef(value\u003d\u0027else\u0027)),"},{"line_number":303,"context_line":"                    DynamicProperty(name\u003d\u0027another.thing\u0027, val\u003d\u0027value\u0027)])"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        propset \u003d vm_util.propset_dict(object.propSet)"},{"line_number":306,"context_line":"        self.assertEqual(\"bar\", propset[\u0027foo\u0027])"},{"line_number":307,"context_line":"        self.assertTrue(hasattr(propset[\u0027some.thing\u0027], \u0027value\u0027))"},{"line_number":308,"context_line":"        self.assertEqual(\"else\", propset[\u0027some.thing\u0027].value)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FjC4%3D","line":305,"updated":"2013-09-24 21:09:08.000000000","message":"same as above","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":302,"context_line":"                                    val\u003dMoRef(value\u003d\u0027else\u0027)),"},{"line_number":303,"context_line":"                    DynamicProperty(name\u003d\u0027another.thing\u0027, val\u003d\u0027value\u0027)])"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"        propset \u003d vm_util.propset_dict(object.propSet)"},{"line_number":306,"context_line":"        self.assertEqual(\"bar\", propset[\u0027foo\u0027])"},{"line_number":307,"context_line":"        self.assertTrue(hasattr(propset[\u0027some.thing\u0027], \u0027value\u0027))"},{"line_number":308,"context_line":"        self.assertEqual(\"else\", propset[\u0027some.thing\u0027].value)"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgKE%3D","line":305,"in_reply_to":"AAAAS3%2F%2FjC4%3D","updated":"2013-09-25 16:22:11.000000000","message":"Done","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"}],"nova/tests/virt/vmwareapi/test_vmwareapi_vm_util_datastore_selection.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":122,"context_line":"        self.assertEqual(12346789000, rec[3],"},{"line_number":123,"context_line":"                         \"did not obtain correct freespace!\")"},{"line_number":124,"context_line":"        self.assertEqual(12346789, rec[3])"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoGQ%3D","line":125,"updated":"2013-09-23 19:11:46.000000000","message":"pep8 would fail with last line","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"6ac75898dc161ed6a5bcca50e6c2a9b9bade226a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.assertIsNone(rec[0])"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_filter_datastores_no_match(self):"},{"line_number":79,"context_line":"        name_list \u003d ["},{"line_number":80,"context_line":"            \u0027summary.type\u0027, \u0027summary.name\u0027, \u0027summary.accessible\u0027,"},{"line_number":81,"context_line":"            \u0027summary.capacity\u0027, \u0027summary.freeSpace\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fiuo%3D","line":79,"updated":"2013-09-24 22:36:33.000000000","message":"it would be nice if a helper function or a member variable was added so these 10 lines didn\u0027t have to be duplicated between several of these tests.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        self.assertIsNone(rec[0])"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_filter_datastores_no_match(self):"},{"line_number":79,"context_line":"        name_list \u003d ["},{"line_number":80,"context_line":"            \u0027summary.type\u0027, \u0027summary.name\u0027, \u0027summary.accessible\u0027,"},{"line_number":81,"context_line":"            \u0027summary.capacity\u0027, \u0027summary.freeSpace\u0027]"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgI4%3D","line":79,"in_reply_to":"AAAAS3%2F%2Fiuo%3D","updated":"2013-09-25 16:22:11.000000000","message":"good point.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"3d79e00e134c749d689c156d94ce46a399a8a861","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.assertEqual(\u0027some-name-good\u0027, rec[1])"},{"line_number":122,"context_line":"        self.assertEqual(12346789, rec[3],"},{"line_number":123,"context_line":"                         \"did not obtain correct freespace!\")"},{"line_number":124,"context_line":"        self.assertEqual(12346789, rec[3])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FjBw%3D","line":124,"updated":"2013-09-24 21:09:08.000000000","message":"seems like a dup of line 122?","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        self.assertEqual(\u0027some-name-good\u0027, rec[1])"},{"line_number":122,"context_line":"        self.assertEqual(12346789, rec[3],"},{"line_number":123,"context_line":"                         \"did not obtain correct freespace!\")"},{"line_number":124,"context_line":"        self.assertEqual(12346789, rec[3])"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgI8%3D","line":124,"in_reply_to":"AAAAS3%2F%2FjBw%3D","updated":"2013-09-25 16:22:11.000000000","message":"whoops.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"}],"nova/virt/vmwareapi/vm_util.py":[{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c7968cf0b74c5ea14204d608ff76bb1caa924c6","unresolved":false,"context_lines":[{"line_number":810,"context_line":"    if propset is None:"},{"line_number":811,"context_line":"        propset \u003d []"},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"    return dict([(prop.name, prop.val) for prop in propset])"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"def _get_datastore_ref_and_name(data_stores, datastore_regex\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FroQ%3D","line":813,"updated":"2013-09-22 07:14:28.000000000","message":"suggest to using {} rather than dict(), per the performance consideration, http://doughellmann.com/2012/11/the-performance-impact-of-using-dict-instead-of-in-cpython-2-7-2.html","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"32668591a7d2455bb456177f397b6c2c25b76c79","unresolved":false,"context_lines":[{"line_number":810,"context_line":"    if propset is None:"},{"line_number":811,"context_line":"        propset \u003d []"},{"line_number":812,"context_line":""},{"line_number":813,"context_line":"    return dict([(prop.name, prop.val) for prop in propset])"},{"line_number":814,"context_line":""},{"line_number":815,"context_line":""},{"line_number":816,"context_line":"def _get_datastore_ref_and_name(data_stores, datastore_regex\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoaI%3D","line":813,"in_reply_to":"AAAAS3%2F%2FroQ%3D","updated":"2013-09-23 17:48:22.000000000","message":"In Python 2.6 (still supported in JUnit tests) you have to use the dict constructor here. I could do this if we have dropped support for 2.6. Have we?","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c7968cf0b74c5ea14204d608ff76bb1caa924c6","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"def _get_datastore_ref_and_name(data_stores, datastore_regex\u003dNone):"},{"line_number":817,"context_line":"    # selects the datastore with the most freespace"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":820,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":821,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FroM%3D","line":818,"updated":"2013-09-22 07:14:28.000000000","message":"nit: this blank line wouldn\u0027t be necessary","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"32668591a7d2455bb456177f397b6c2c25b76c79","unresolved":false,"context_lines":[{"line_number":815,"context_line":""},{"line_number":816,"context_line":"def _get_datastore_ref_and_name(data_stores, datastore_regex\u003dNone):"},{"line_number":817,"context_line":"    # selects the datastore with the most freespace"},{"line_number":818,"context_line":""},{"line_number":819,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":820,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":821,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoYA%3D","line":818,"in_reply_to":"AAAAS3%2F%2FroM%3D","updated":"2013-09-23 17:48:22.000000000","message":"Done","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c7968cf0b74c5ea14204d608ff76bb1caa924c6","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":820,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    if not datastore_regex:"},{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FroE%3D","line":822,"updated":"2013-09-22 07:14:28.000000000","message":"this should be if datastore_regex is not None","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"32668591a7d2455bb456177f397b6c2c25b76c79","unresolved":false,"context_lines":[{"line_number":819,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":820,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    if not datastore_regex:"},{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoX4%3D","line":822,"in_reply_to":"AAAAS3%2F%2FroE%3D","updated":"2013-09-23 17:48:22.000000000","message":"Done","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    if not datastore_regex:"},{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    rec \u003d None"},{"line_number":827,"context_line":"    # datastores is actually a RetreiveResult object"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoFY%3D","line":824,"updated":"2013-09-23 19:11:46.000000000","message":"Why not set the datastore regex in https://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/driver.py#L411\nThis will save the if and the re.compile with each request. It will also make the code simpler and cleaner","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"5435ab863db2f038abd112189bd9d32a0970e534","unresolved":false,"context_lines":[{"line_number":821,"context_line":""},{"line_number":822,"context_line":"    if not datastore_regex:"},{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    rec \u003d None"},{"line_number":827,"context_line":"    # datastores is actually a RetreiveResult object"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fn5A%3D","line":824,"in_reply_to":"AAAAS3%2F%2FoFY%3D","updated":"2013-09-23 19:53:59.000000000","message":"This is a good point, but I was attempting to make the change in a single method. I would rather drop this completely.","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    rec \u003d None"},{"line_number":827,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":828,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":829,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoFA%3D","line":826,"updated":"2013-09-23 19:11:46.000000000","message":"why not have a DSRecord here with 0 values then you can just replace this with the best selected record","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"5435ab863db2f038abd112189bd9d32a0970e534","unresolved":false,"context_lines":[{"line_number":823,"context_line":"        # if no regex is specified, match anything"},{"line_number":824,"context_line":"        datastore_regex \u003d re.compile(\u0027.*\u0027)"},{"line_number":825,"context_line":""},{"line_number":826,"context_line":"    rec \u003d None"},{"line_number":827,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":828,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":829,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fn5w%3D","line":826,"in_reply_to":"AAAAS3%2F%2FoFA%3D","updated":"2013-09-23 19:53:59.000000000","message":"Because then I would return a 0 value when No datastore was found. Making no presumptions on how this method is used, Datastore None does not have size 0, it has size None.","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7040,"name":"GuoHui LIu","email":"liuguohui@gmail.com","username":"guohliu"},"change_message_id":"0c7968cf0b74c5ea14204d608ff76bb1caa924c6","unresolved":false,"context_lines":[{"line_number":830,"context_line":"        if not hasattr(obj_content, \u0027propSet\u0027):"},{"line_number":831,"context_line":"            continue"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        propset \u003d propset_dict(obj_content.propSet)"},{"line_number":834,"context_line":"        # Local storage identifier vSphere doesn\u0027t support CIFS or"},{"line_number":835,"context_line":"        # vfat for datastores, therefore filtered"},{"line_number":836,"context_line":"        ds_type \u003d propset[\u0027summary.type\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Frns%3D","line":833,"updated":"2013-09-22 07:14:28.000000000","message":"self.propset_dict(...)","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"32668591a7d2455bb456177f397b6c2c25b76c79","unresolved":false,"context_lines":[{"line_number":830,"context_line":"        if not hasattr(obj_content, \u0027propSet\u0027):"},{"line_number":831,"context_line":"            continue"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        propset \u003d propset_dict(obj_content.propSet)"},{"line_number":834,"context_line":"        # Local storage identifier vSphere doesn\u0027t support CIFS or"},{"line_number":835,"context_line":"        # vfat for datastores, therefore filtered"},{"line_number":836,"context_line":"        ds_type \u003d propset[\u0027summary.type\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FpKw%3D","line":833,"in_reply_to":"AAAAS3%2F%2Frns%3D","updated":"2013-09-23 17:48:22.000000000","message":"this is not an object (which is something I *want* to change eventually) this is a stand alone function so I have no self to hang onto. I can\u0027t do that.","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":844,"context_line":"                    capacity\u003dpropset[\u0027summary.capacity\u0027],"},{"line_number":845,"context_line":"                    freespace\u003dpropset[\u0027summary.freeSpace\u0027])"},{"line_number":846,"context_line":"                # find the largest freespace to return"},{"line_number":847,"context_line":"                if not rec or rec.freespace \u003c record.freespace:"},{"line_number":848,"context_line":"                    rec \u003d record"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    if rec:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoEI%3D","line":847,"updated":"2013-09-23 19:11:46.000000000","message":"you can do away with the if not rec if you do what was suggested above (line 826)","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"48626e2ff23a5df8c0e7d88d9e68a040a59e2347","unresolved":false,"context_lines":[{"line_number":846,"context_line":"                # find the largest freespace to return"},{"line_number":847,"context_line":"                if not rec or rec.freespace \u003c record.freespace:"},{"line_number":848,"context_line":"                    rec \u003d record"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    if rec:"},{"line_number":851,"context_line":"        #TODO(hartsocks): refactor callers to use DSRecord instead"},{"line_number":852,"context_line":"        #in an effort to keep this patch localized I\u0027ve not refactored"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2FoEU%3D","line":849,"updated":"2013-09-23 19:11:46.000000000","message":"if you do what was suggested in 826 then you can just return rec","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"5435ab863db2f038abd112189bd9d32a0970e534","unresolved":false,"context_lines":[{"line_number":846,"context_line":"                # find the largest freespace to return"},{"line_number":847,"context_line":"                if not rec or rec.freespace \u003c record.freespace:"},{"line_number":848,"context_line":"                    rec \u003d record"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    if rec:"},{"line_number":851,"context_line":"        #TODO(hartsocks): refactor callers to use DSRecord instead"},{"line_number":852,"context_line":"        #in an effort to keep this patch localized I\u0027ve not refactored"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAS3%2F%2Fn4U%3D","line":849,"in_reply_to":"AAAAS3%2F%2FoEU%3D","updated":"2013-09-23 19:53:59.000000000","message":"No you can\u0027t. Not without refactoring the calling methods. This is precisely what I\u0027m trying to avoid. I\u0027ve placed a TODO in the change set to reflect that I agree with you, and this should return \u0027rec\u0027 but I can\u0027t without making the change much bigger!","commit_id":"af77e2aa34c2dd84f24e147beaa672b8a6bbc86c"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"14c91d7a95f34a402893e89ab216176815b39e6b","unresolved":false,"context_lines":[{"line_number":839,"context_line":"        if ((ds_type \u003d\u003d \u0027VMFS\u0027 or ds_type \u003d\u003d \u0027NFS\u0027) and"},{"line_number":840,"context_line":"                propset_dict[\u0027summary.accessible\u0027]):"},{"line_number":841,"context_line":"            if not datastore_regex or datastore_regex.match(ds_name):"},{"line_number":842,"context_line":"                return (elem.obj,"},{"line_number":843,"context_line":"                        ds_name,"},{"line_number":844,"context_line":"                        propset_dict[\u0027summary.capacity\u0027],"},{"line_number":845,"context_line":"                        propset_dict[\u0027summary.freeSpace\u0027])"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2FjsQ%3D","side":"PARENT","line":842,"updated":"2013-09-24 17:54:58.000000000","message":"Notice return type is a list of values, all callers expect this list with position 0, 1, 2, 3 each indicating a special value.","commit_id":"d0a267cc06ead1026e98301eb539a2cb9811bdbc"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b1a71d7eaec5017d8cb7185f89d05407dced2a76","unresolved":false,"context_lines":[{"line_number":855,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":856,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":857,"context_line":""},{"line_number":858,"context_line":"    rec \u003d None"},{"line_number":859,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":860,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":861,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2Flw0%3D","line":858,"updated":"2013-09-24 08:59:30.000000000","message":"Consider:\n    rec \u003d DSRecord(datastore\u003dNone, name\u003d\u0027\u0027, capacity\u003d0, freespace\u003d0)","commit_id":"6df1b94b01364acd129a3441b37ea0436fb2ec00"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b1a71d7eaec5017d8cb7185f89d05407dced2a76","unresolved":false,"context_lines":[{"line_number":876,"context_line":"                    capacity\u003dpropset[\u0027summary.capacity\u0027],"},{"line_number":877,"context_line":"                    freespace\u003dpropset[\u0027summary.freeSpace\u0027])"},{"line_number":878,"context_line":"                # find the largest freespace to return"},{"line_number":879,"context_line":"                if rec is None or rec.freespace \u003c record.freespace:"},{"line_number":880,"context_line":"                    rec \u003d record"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"    if rec:"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2Flws%3D","line":879,"updated":"2013-09-24 08:59:30.000000000","message":"The you can have:\nif rec.freespace \u003c record.freespace:","commit_id":"6df1b94b01364acd129a3441b37ea0436fb2ec00"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"b1a71d7eaec5017d8cb7185f89d05407dced2a76","unresolved":false,"context_lines":[{"line_number":879,"context_line":"                if rec is None or rec.freespace \u003c record.freespace:"},{"line_number":880,"context_line":"                    rec \u003d record"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"    if rec:"},{"line_number":883,"context_line":"        #TODO(hartsocks): refactor callers to use DSRecord instead"},{"line_number":884,"context_line":"        #in an effort to keep this patch localized I\u0027ve not refactored"},{"line_number":885,"context_line":"        #the callers of this method."}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2Flwo%3D","line":882,"updated":"2013-09-24 08:59:30.000000000","message":"You do not need this code.\nYou can have:\nreturn rec","commit_id":"6df1b94b01364acd129a3441b37ea0436fb2ec00"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"14c91d7a95f34a402893e89ab216176815b39e6b","unresolved":false,"context_lines":[{"line_number":883,"context_line":"        #TODO(hartsocks): refactor callers to use DSRecord instead"},{"line_number":884,"context_line":"        #in an effort to keep this patch localized I\u0027ve not refactored"},{"line_number":885,"context_line":"        #the callers of this method."},{"line_number":886,"context_line":"        return rec.datastore, rec.name, rec.capacity, rec.freespace"},{"line_number":887,"context_line":""},{"line_number":888,"context_line":""},{"line_number":889,"context_line":"def get_datastore_ref_and_name(session, cluster\u003dNone, host\u003dNone,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAS3%2F%2Fjrw%3D","line":886,"updated":"2013-09-24 17:54:58.000000000","message":"By using this code, we unroll DSRecord so that it matches the return value the method previously returned. This prevents us from having to modify code throughout the driver. That allows us to make this behavioral change in just a few lines without refactoring 10 or more calling sites throughout the driver code base.\n\nI would like the rest of the code base to make these changes, but those changes can wait.","commit_id":"6df1b94b01364acd129a3441b37ea0436fb2ec00"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"1645f11a2559fabe362c4ae6a9c016706840ae41","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    :return: dictionary"},{"line_number":846,"context_line":"    \"\"\""},{"line_number":847,"context_line":"    if propset is None:"},{"line_number":848,"context_line":"        propset \u003d []"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    #TODO(hartsocks): once support for Python 2.6 is dropped"},{"line_number":851,"context_line":"    # change to {[(prop.name, prop.val) for prop in propset]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2FjFg%3D","line":848,"updated":"2013-09-24 20:41:15.000000000","message":"Need a to return a dictionary right? \n    propset \u003d {}","commit_id":"0acf207d5fdb0a828f169940b6804826fa836c1f"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"3670ec258f49a4c8dfdc591a2fea3a0fb2355e0b","unresolved":false,"context_lines":[{"line_number":845,"context_line":"    :return: dictionary"},{"line_number":846,"context_line":"    \"\"\""},{"line_number":847,"context_line":"    if propset is None:"},{"line_number":848,"context_line":"        propset \u003d []"},{"line_number":849,"context_line":""},{"line_number":850,"context_line":"    #TODO(hartsocks): once support for Python 2.6 is dropped"},{"line_number":851,"context_line":"    # change to {[(prop.name, prop.val) for prop in propset]}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAS3%2F%2FjEs%3D","line":848,"in_reply_to":"AAAAS3%2F%2FjFg%3D","updated":"2013-09-24 20:45:16.000000000","message":"well, not exactly that. I\u0027m priming the propset so the comprehension below still works. I should probably change this to:\n\n   return {}\n\nbecause that will be clearer.","commit_id":"0acf207d5fdb0a828f169940b6804826fa836c1f"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"79ec970b7ad2f0a02250f4d68f669806876a21ac","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        #com.vmware.wssdk.apiref.doc/"},{"line_number":842,"context_line":"            vmodl.query.PropertyCollector.ObjectContent.html"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param propset:"},{"line_number":845,"context_line":"    :return: dictionary"},{"line_number":846,"context_line":"    \"\"\""},{"line_number":847,"context_line":"    if propset is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FivE%3D","line":844,"updated":"2013-09-24 22:33:18.000000000","message":"Missing description here?","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        #com.vmware.wssdk.apiref.doc/"},{"line_number":842,"context_line":"            vmodl.query.PropertyCollector.ObjectContent.html"},{"line_number":843,"context_line":""},{"line_number":844,"context_line":"    :param propset:"},{"line_number":845,"context_line":"    :return: dictionary"},{"line_number":846,"context_line":"    \"\"\""},{"line_number":847,"context_line":"    if propset is None:"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgIw%3D","line":844,"in_reply_to":"AAAAS3%2F%2FivE%3D","updated":"2013-09-25 16:22:11.000000000","message":"Done","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"87efbfbda9d7e9580ab8b80450294d21333a00ad","unresolved":false,"context_lines":[{"line_number":857,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":858,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    rec \u003d DSRecord(datastore\u003dNone, name\u003dNone, capacity\u003dNone, freespace\u003d0)"},{"line_number":861,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":862,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":863,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fi1Y%3D","line":860,"updated":"2013-09-24 21:55:46.000000000","message":"Nit :- variable names rec \u0026 record a bit confusing.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"79ec970b7ad2f0a02250f4d68f669806876a21ac","unresolved":false,"context_lines":[{"line_number":857,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":858,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    rec \u003d DSRecord(datastore\u003dNone, name\u003dNone, capacity\u003dNone, freespace\u003d0)"},{"line_number":861,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":862,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":863,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fivg%3D","line":860,"in_reply_to":"AAAAS3%2F%2Fi1Y%3D","updated":"2013-09-24 22:33:18.000000000","message":"Agreed, this is really confusing otherwise.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":857,"context_line":"    DSRecord \u003d collections.namedtuple("},{"line_number":858,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    rec \u003d DSRecord(datastore\u003dNone, name\u003dNone, capacity\u003dNone, freespace\u003d0)"},{"line_number":861,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":862,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":863,"context_line":"        # the propset attribute \"need not be set\" by returning API"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgHc%3D","line":860,"in_reply_to":"AAAAS3%2F%2Fivg%3D","updated":"2013-09-25 16:22:11.000000000","message":"Done","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"79ec970b7ad2f0a02250f4d68f669806876a21ac","unresolved":false,"context_lines":[{"line_number":858,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    rec \u003d DSRecord(datastore\u003dNone, name\u003dNone, capacity\u003dNone, freespace\u003d0)"},{"line_number":861,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":862,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":863,"context_line":"        # the propset attribute \"need not be set\" by returning API"},{"line_number":864,"context_line":"        if not hasattr(obj_content, \u0027propSet\u0027):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fivs%3D","line":861,"updated":"2013-09-24 22:33:18.000000000","message":"\"Retrieve\" is misspelled","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":858,"context_line":"        \u0027DSRecord\u0027, [\u0027datastore\u0027, \u0027name\u0027, \u0027capacity\u0027, \u0027freespace\u0027])"},{"line_number":859,"context_line":""},{"line_number":860,"context_line":"    rec \u003d DSRecord(datastore\u003dNone, name\u003dNone, capacity\u003dNone, freespace\u003d0)"},{"line_number":861,"context_line":"    # datastores is actually a RetreiveResult object"},{"line_number":862,"context_line":"    for obj_content in data_stores.objects:"},{"line_number":863,"context_line":"        # the propset attribute \"need not be set\" by returning API"},{"line_number":864,"context_line":"        if not hasattr(obj_content, \u0027propSet\u0027):"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgHg%3D","line":861,"in_reply_to":"AAAAS3%2F%2Fivs%3D","updated":"2013-09-25 16:22:11.000000000","message":"Done","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"3d79e00e134c749d689c156d94ce46a399a8a861","unresolved":false,"context_lines":[{"line_number":878,"context_line":"                    capacity\u003dpropset[\u0027summary.capacity\u0027],"},{"line_number":879,"context_line":"                    freespace\u003dpropset[\u0027summary.freeSpace\u0027])"},{"line_number":880,"context_line":"                # find the largest freespace to return"},{"line_number":881,"context_line":"                if rec.freespace \u003c record.freespace:"},{"line_number":882,"context_line":"                    rec \u003d record"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"    #TODO(hartsocks): refactor driver to use DSRecord namedtuple"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fi%2FU%3D","line":881,"updated":"2013-09-24 21:09:08.000000000","message":"is this if condition more clear to read? (just a suggestion)\n\n    if record.freespace \u003e rec.freespace:\n        rec \u003d record","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":878,"context_line":"                    capacity\u003dpropset[\u0027summary.capacity\u0027],"},{"line_number":879,"context_line":"                    freespace\u003dpropset[\u0027summary.freeSpace\u0027])"},{"line_number":880,"context_line":"                # find the largest freespace to return"},{"line_number":881,"context_line":"                if rec.freespace \u003c record.freespace:"},{"line_number":882,"context_line":"                    rec \u003d record"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"    #TODO(hartsocks): refactor driver to use DSRecord namedtuple"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgGs%3D","line":881,"in_reply_to":"AAAAS3%2F%2Fi%2FU%3D","updated":"2013-09-25 16:22:11.000000000","message":"well, I don\u0027t feel strongly either way.","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7575,"name":"Sabari","email":"smurugesan@vmware.com","username":"sabari"},"change_message_id":"87efbfbda9d7e9580ab8b80450294d21333a00ad","unresolved":false,"context_lines":[{"line_number":884,"context_line":"    #TODO(hartsocks): refactor driver to use DSRecord namedtuple"},{"line_number":885,"context_line":"    # using DSRecord through out will help keep related information"},{"line_number":886,"context_line":"    # together and improve readability and organisation of the code."},{"line_number":887,"context_line":"    return rec.datastore, rec.name, rec.capacity, rec.freespace"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"def get_datastore_ref_and_name(session, cluster\u003dNone, host\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2Fi1U%3D","line":887,"updated":"2013-09-24 21:55:46.000000000","message":"You can as well check if rec[0] here and return rec only if it has been updated. This will avoid the change to L922","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"},{"author":{"_account_id":7629,"name":"Shawn Hartsock","email":"hartsock@acm.org","username":"hartsocks"},"change_message_id":"d7e6cbfa15eaeba29c805105aaa279aa6f395321","unresolved":false,"context_lines":[{"line_number":884,"context_line":"    #TODO(hartsocks): refactor driver to use DSRecord namedtuple"},{"line_number":885,"context_line":"    # using DSRecord through out will help keep related information"},{"line_number":886,"context_line":"    # together and improve readability and organisation of the code."},{"line_number":887,"context_line":"    return rec.datastore, rec.name, rec.capacity, rec.freespace"},{"line_number":888,"context_line":""},{"line_number":889,"context_line":""},{"line_number":890,"context_line":"def get_datastore_ref_and_name(session, cluster\u003dNone, host\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAS3%2F%2FgGY%3D","line":887,"in_reply_to":"AAAAS3%2F%2Fi1U%3D","updated":"2013-09-25 16:22:11.000000000","message":"This is a good idea, an earlier revision had it written this way. There was some back and forth on how these last two lines should read. I\u0027ll post a revision with the if statement in place and we can discuss which is better.\n\nif statement pro: you never edit caller method.\n\nno if statement pro: it\u0027s fewer lines","commit_id":"43119446d7b7d9a3e7d2e3bde90cecdfb877cc80"}]}
