)]}'
{"oslo/vmware/ds_selector.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"bf34e0bfa41dc12b814b97bd179c33f1597d2407","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                                     \"HostSystem\","},{"line_number":142,"context_line":"                                     MAX_OBJECTS)"},{"line_number":143,"context_line":"        vim_util.cancel_retrieval(session.vim, results)"},{"line_number":144,"context_line":"        host_mor \u003d results.objects[0].obj"},{"line_number":145,"context_line":"    else:"},{"line_number":146,"context_line":"        host_ret \u003d session.invoke_api(vim_util, \"get_object_properties\","},{"line_number":147,"context_line":"                                      session.vim,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_94c910af","line":144,"updated":"2014-08-25 13:34:33.000000000","message":"As Zhu Zhu pointed out, this function is really broken and we should remove it.","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"ba386c46170421fae8c49df0bf5224aaf8a3a1c2","unresolved":false,"context_lines":[{"line_number":141,"context_line":"                                     \"HostSystem\","},{"line_number":142,"context_line":"                                     MAX_OBJECTS)"},{"line_number":143,"context_line":"        vim_util.cancel_retrieval(session.vim, results)"},{"line_number":144,"context_line":"        host_mor \u003d results.objects[0].obj"},{"line_number":145,"context_line":"    else:"},{"line_number":146,"context_line":"        host_ret \u003d session.invoke_api(vim_util, \"get_object_properties\","},{"line_number":147,"context_line":"                                      session.vim,"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_94d030cb","line":144,"in_reply_to":"1abeadc6_94c910af","updated":"2014-08-25 13:56:07.000000000","message":"Done","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"bf34e0bfa41dc12b814b97bd179c33f1597d2407","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":234,"context_line":"                             host_mor\u003dNone,"},{"line_number":235,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":236,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":237,"context_line":"    if cluster_mor:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_f9079d1b","line":234,"updated":"2014-08-25 13:34:33.000000000","message":"please see ds_util.py in Nova, we don\u0027t use host_mor anymore","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"ba386c46170421fae8c49df0bf5224aaf8a3a1c2","unresolved":false,"context_lines":[{"line_number":231,"context_line":""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":234,"context_line":"                             host_mor\u003dNone,"},{"line_number":235,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":236,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":237,"context_line":"    if cluster_mor:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_d4d9c8f5","line":234,"in_reply_to":"1abeadc6_f9079d1b","updated":"2014-08-25 13:56:07.000000000","message":"Done","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"bf34e0bfa41dc12b814b97bd179c33f1597d2407","unresolved":false,"context_lines":[{"line_number":233,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":234,"context_line":"                             host_mor\u003dNone,"},{"line_number":235,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":236,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":237,"context_line":"    if cluster_mor:"},{"line_number":238,"context_line":"        mobj \u003d cluster_mor"},{"line_number":239,"context_line":"    elif host_mor:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_9943096c","line":236,"updated":"2014-08-25 13:34:33.000000000","message":"this docstring is wrong","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"ba386c46170421fae8c49df0bf5224aaf8a3a1c2","unresolved":false,"context_lines":[{"line_number":233,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":234,"context_line":"                             host_mor\u003dNone,"},{"line_number":235,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":236,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":237,"context_line":"    if cluster_mor:"},{"line_number":238,"context_line":"        mobj \u003d cluster_mor"},{"line_number":239,"context_line":"    elif host_mor:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_94e750ac","line":236,"in_reply_to":"1abeadc6_9943096c","updated":"2014-08-25 13:56:07.000000000","message":"Done","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":10327,"name":"Feng Xi Yan","email":"yanfengxi@cn.ibm.com","username":"yanfengxi"},"change_message_id":"42de7ad39cc23c8b33b1905f1f3c08e5f7c8dceb","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    \"\"\"Policy for randomly selection of a datastore to spawn.\"\"\""},{"line_number":61,"context_line":"    def choose(self, datastores):"},{"line_number":62,"context_line":"        if datastores:"},{"line_number":63,"context_line":"            random.choice(datastores)"},{"line_number":64,"context_line":"        return None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_5d4c41c8","line":63,"updated":"2014-08-29 08:38:49.000000000","message":"This policy will result in more possibilities of failure from insufficient datastore space. At least we should choose those datastores that has enough disk space.","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"e89c9678d27da2de1d090f104ca4996ccab12806","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    def choose(self, datastores):"},{"line_number":62,"context_line":"        if datastores:"},{"line_number":63,"context_line":"            random.choice(datastores)"},{"line_number":64,"context_line":"        return None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"def _propset_dict(propset):"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_1e3c1b93","line":64,"updated":"2014-08-26 08:19:14.000000000","message":"this is redundant, functions return None by default","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"8a73fc63f1631c7c7ac5dab9bd2fb53366902a20","unresolved":false,"context_lines":[{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        if not datastore_ret:"},{"line_number":201,"context_line":"            raise exceptions.DatastoreNotFound()"},{"line_number":202,"context_line":"        data_store_mors \u003d datastore_ret[0].propSet[0].val[0]"},{"line_number":203,"context_line":"        data_stores \u003d session.invoke_api("},{"line_number":204,"context_line":"            vim_util,"},{"line_number":205,"context_line":"            \"get_object_collection_properties\","}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_1ecc1b35","line":202,"updated":"2014-08-26 08:39:48.000000000","message":"With current ds_util.py. This will be using data_store_mors \u003d datastore_ret.ManagedObjectReference\n\nsession.invoke_api with session._call_method probably need to unify.","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"},{"author":{"_account_id":7148,"name":"Zhu Zhu","email":"bjzzu.zz@gmail.com","username":"zhuzhubj"},"change_message_id":"8a73fc63f1631c7c7ac5dab9bd2fb53366902a20","unresolved":false,"context_lines":[{"line_number":240,"context_line":"                            [\"datastore\"])"},{"line_number":241,"context_line":"    if not ds:"},{"line_number":242,"context_line":"        return []"},{"line_number":243,"context_line":"    data_store_mors \u003d ds[0].propSet[0].val[0]"},{"line_number":244,"context_line":"    # NOTE(garyk): use utility method to retrieve remote objects"},{"line_number":245,"context_line":"    data_stores \u003d session.invoke_api("},{"line_number":246,"context_line":"        vim_util,"}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_9eacab37","line":243,"updated":"2014-08-26 08:39:48.000000000","message":"data_store_mors \u003d ds.ManagedObjectReference?","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"}],"oslo/vmware/exceptions.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"e89c9678d27da2de1d090f104ca4996ccab12806","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"class DatastoreNotFound(VMwareDriverException):"},{"line_number":163,"context_line":"    msg_fmt \u003d _(\"Could not find the datastore reference(s) which the VM uses.\")"},{"line_number":164,"context_line":"    code \u003d 404"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_3edd5743","line":163,"updated":"2014-08-26 08:19:14.000000000","message":"this message is not accurate when we search for the most preferable datastore","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"e89c9678d27da2de1d090f104ca4996ccab12806","unresolved":false,"context_lines":[{"line_number":164,"context_line":"    code \u003d 404"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"class NoValidHost(VMwareDriverException):"},{"line_number":168,"context_line":"    msg_fmt \u003d _(\"No valid host was found. %(reason)s\")"},{"line_number":169,"context_line":"    code \u003d 404"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"1abeadc6_7e950f87","line":167,"updated":"2014-08-26 08:19:14.000000000","message":"we don\u0027t need this anymore","commit_id":"440707b8cc7fdd309e43b3a5412b78b45a9d2a6d"}],"oslo/vmware/objects/datastore.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"bf34e0bfa41dc12b814b97bd179c33f1597d2407","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                         self.path, query)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"def is_datastore_valid(propdict, datastore_regex):"},{"line_number":271,"context_line":"    \"\"\"Checks if a datastore is valid based on the following criteria."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    Criteria:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_74863467","line":270,"updated":"2014-08-25 13:34:33.000000000","message":"I don\u0027t really think this belongs here. This module should provide APIs for working with Datastore objects, not property dicts.","commit_id":"ab254db173a435897dae7c6b55126a0254339777"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"ba386c46170421fae8c49df0bf5224aaf8a3a1c2","unresolved":false,"context_lines":[{"line_number":267,"context_line":"                                         self.path, query)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"def is_datastore_valid(propdict, datastore_regex):"},{"line_number":271,"context_line":"    \"\"\"Checks if a datastore is valid based on the following criteria."},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"    Criteria:"}],"source_content_type":"text/x-python","patch_set":17,"id":"1abeadc6_54177854","line":270,"in_reply_to":"1abeadc6_74863467","updated":"2014-08-25 13:56:07.000000000","message":"Done","commit_id":"ab254db173a435897dae7c6b55126a0254339777"}],"oslo/vmware/selector.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"c88b3ca9e8928c189d83dc212b4d63e0fd73c7fd","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    return dict([(prop.name, prop.val) for prop in propset])"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"def _select_datastore(data_stores, best_match, datastore_regex\u003dNone):"},{"line_number":46,"context_line":"    \"\"\"Find the most preferable datastore in a given RetrieveResult object."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    :param data_stores: a RetrieveResult object from vSphere API call"}],"source_content_type":"text/x-python","patch_set":1,"id":"1abeadc6_4bf99b4c","line":45,"updated":"2014-08-18 08:57:37.000000000","message":"i am not really sure about this - it means that for each time we change a select algorithm we will need to bump nova to use a different oslo version.\n\nideally i think that we should look for a generic pluggable way in which we can enable the admin to define the way in which they would like to do their datastore selection, that is, they could have a number of differemt drivers etc.\n\nThis will also change for the PBM support - please see - https://review.openstack.org/#/c/68539/14/nova/virt/vmwareapi/vm_util.py","commit_id":"23d1b7aa7fd7cf9b7e41471177475ed4ec628cd5"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"e6dc83381f2c3361c5d45932a1b40d122c28ab91","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        MAX_OBJECTS,"},{"line_number":263,"context_line":"        data_store_mors,"},{"line_number":264,"context_line":"        [\"summary.type\", \"summary.name\","},{"line_number":265,"context_line":"         \"summary.accessible\"])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    allowed \u003d []"},{"line_number":268,"context_line":"    while data_stores:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_6d270f65","line":265,"updated":"2014-08-19 13:30:36.000000000","message":"I think there is a problem here.\n\nAssume that cluster_mor is None and host_mor is h1. If a datastore d1 is attached to hosts h1 and h2 where it is accessible only to h2 and not h1, summary.accessible will be True even though it is not accessible to h1. \n\nWe should use HostMountInfo.accessible in this case.","commit_id":"8fdf1ac66f11989fd8e7e480b3c16ab42d427462"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"788d3601034629837e86ccee939ea74b89cbf1fc","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        MAX_OBJECTS,"},{"line_number":263,"context_line":"        data_store_mors,"},{"line_number":264,"context_line":"        [\"summary.type\", \"summary.name\","},{"line_number":265,"context_line":"         \"summary.accessible\"])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    allowed \u003d []"},{"line_number":268,"context_line":"    while data_stores:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_5330329e","line":265,"in_reply_to":"1abeadc6_3032cc10","updated":"2014-08-19 14:11:57.000000000","message":"If this code is in Nova, then it looks like a bug there. Someone from Nova team can confirm.\n\nIf you want to fix it there first and patch here later, I\u0027m fine with that.","commit_id":"8fdf1ac66f11989fd8e7e480b3c16ab42d427462"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"39d0a0d6873195192b9f9f80e9f01ab225d03d3d","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        MAX_OBJECTS,"},{"line_number":263,"context_line":"        data_store_mors,"},{"line_number":264,"context_line":"        [\"summary.type\", \"summary.name\","},{"line_number":265,"context_line":"         \"summary.accessible\"])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    allowed \u003d []"},{"line_number":268,"context_line":"    while data_stores:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_13023a0b","line":265,"in_reply_to":"1abeadc6_5330329e","updated":"2014-08-19 14:20:00.000000000","message":"Vipin,\n\nplease see:\nhttps://github.com/openstack/nova/blob/master/nova/virt/vmwareapi/ds_util.py#L303\n\nCan you please remove your -1 here then? and i\u0027ll open a bug.\n\nthanks,\ndims","commit_id":"8fdf1ac66f11989fd8e7e480b3c16ab42d427462"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"2743904ac0ffb75b78614ddaaff5e16c7086a027","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        MAX_OBJECTS,"},{"line_number":263,"context_line":"        data_store_mors,"},{"line_number":264,"context_line":"        [\"summary.type\", \"summary.name\","},{"line_number":265,"context_line":"         \"summary.accessible\"])"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    allowed \u003d []"},{"line_number":268,"context_line":"    while data_stores:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1abeadc6_3032cc10","line":265,"in_reply_to":"1abeadc6_6d270f65","updated":"2014-08-19 14:00:03.000000000","message":"Vipin is this a \"bug\" in existing code in Nova? or am i introducing that here.","commit_id":"8fdf1ac66f11989fd8e7e480b3c16ab42d427462"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 IBM, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_ad80e3f7","line":1,"updated":"2014-08-21 16:36:07.000000000","message":"most of the code is borrowed from nova/ds_util.py, so I think it\u0027s fair to add VMware as well :)","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2014 IBM, Inc."},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_5367eeb6","line":1,"in_reply_to":"1abeadc6_ad80e3f7","updated":"2014-08-22 12:02:43.000000000","message":"Done","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"NAMESPACE \u003d \u0027oslo.vmware.selector.drivers\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"MAX_OBJECTS \u003d 100"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_4de02f96","line":29,"updated":"2014-08-21 16:36:07.000000000","message":"I suggest to rename the module to \u0027ds_selector.py\u0027 unless you intend to add  some other selection logic which is unrelated to datastores","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"NAMESPACE \u003d \u0027oslo.vmware.selector.drivers\u0027"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"MAX_OBJECTS \u003d 100"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_73078aca","line":29,"in_reply_to":"1abeadc6_4de02f96","updated":"2014-08-22 12:02:43.000000000","message":"Done","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class LargestDataSelectionPolicy(DataStoreSelectionPolicy):"},{"line_number":46,"context_line":"    \"\"\"Policy for selection largest freespace datastore to spawn.\"\"\""},{"line_number":47,"context_line":"    def choose(self, datastores):"},{"line_number":48,"context_line":"        if datastores:"},{"line_number":49,"context_line":"            for ds in datastores:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_0227e6ca","line":46,"updated":"2014-08-21 16:36:07.000000000","message":"nit: remove \"to spawn\"","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"class LargestDataSelectionPolicy(DataStoreSelectionPolicy):"},{"line_number":46,"context_line":"    \"\"\"Policy for selection largest freespace datastore to spawn.\"\"\""},{"line_number":47,"context_line":"    def choose(self, datastores):"},{"line_number":48,"context_line":"        if datastores:"},{"line_number":49,"context_line":"            for ds in datastores:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_310a4e26","line":46,"in_reply_to":"1abeadc6_0227e6ca","updated":"2014-08-22 12:02:43.000000000","message":"Done","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def choose(self, datastores):"},{"line_number":59,"context_line":"        if datastores:"},{"line_number":60,"context_line":"            index \u003d random.randint(0, len(datastores) - 1)"},{"line_number":61,"context_line":"            return datastores[index]"},{"line_number":62,"context_line":"        return None"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_ed973b8e","line":61,"updated":"2014-08-21 16:36:07.000000000","message":"return random.choice(datastores)","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    def choose(self, datastores):"},{"line_number":59,"context_line":"        if datastores:"},{"line_number":60,"context_line":"            index \u003d random.randint(0, len(datastores) - 1)"},{"line_number":61,"context_line":"            return datastores[index]"},{"line_number":62,"context_line":"        return None"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_8c022908","line":61,"in_reply_to":"1abeadc6_ed973b8e","updated":"2014-08-22 12:02:43.000000000","message":"Done","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                      datastore_regex\u003dNone):"},{"line_number":89,"context_line":"    \"\"\"Find the most preferable datastore in a given RetrieveResult object."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    :param data_stores: a RetrieveResult object from vSphere API call"},{"line_number":92,"context_line":"    :param best_match: the current best match for datastore"},{"line_number":93,"context_line":"    :param datastore_regex: an optional regular expression to match names"},{"line_number":94,"context_line":"    :return: datastore_ref, datastore_name, capacity, freespace"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_2d493360","line":91,"updated":"2014-08-21 16:36:07.000000000","message":"this docstring is wrong -- it doesn\u0027t match the function signature","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                      datastore_regex\u003dNone):"},{"line_number":89,"context_line":"    \"\"\"Find the most preferable datastore in a given RetrieveResult object."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    :param data_stores: a RetrieveResult object from vSphere API call"},{"line_number":92,"context_line":"    :param best_match: the current best match for datastore"},{"line_number":93,"context_line":"    :param datastore_regex: an optional regular expression to match names"},{"line_number":94,"context_line":"    :return: datastore_ref, datastore_name, capacity, freespace"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_732eaa44","line":91,"in_reply_to":"1abeadc6_2d493360","updated":"2014-08-22 12:02:43.000000000","message":"Done","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return allowed"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def _get_host_ref(session, cluster\u003dNone):"},{"line_number":143,"context_line":"    \"\"\"Get reference to a host within the cluster specified.\"\"\""},{"line_number":144,"context_line":"    if cluster is None:"},{"line_number":145,"context_line":"        results \u003d session.invoke_api(vim_util,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_6dbecb66","line":142,"updated":"2014-08-21 16:36:07.000000000","message":"this doesn\u0027t really belong here and we don\u0027t need it after the deprecation of the ESX driver","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    return allowed"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"def _get_host_ref(session, cluster\u003dNone):"},{"line_number":143,"context_line":"    \"\"\"Get reference to a host within the cluster specified.\"\"\""},{"line_number":144,"context_line":"    if cluster is None:"},{"line_number":145,"context_line":"        results \u003d session.invoke_api(vim_util,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_9a57c925","line":142,"in_reply_to":"1abeadc6_6dbecb66","updated":"2014-08-22 12:02:43.000000000","message":"I\u0027ll add a NOTE to revisit it if we don\u0027t need it.","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    return LargestDataSelectionPolicy()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"def get_datastore(session, cluster_mor\u003dNone, host_mor\u003dNone,"},{"line_number":180,"context_line":"                  datastore_regex\u003dNone, policy\u003d\u0027largest\u0027):"},{"line_number":181,"context_line":"    \"\"\"Get the datastore list and choose the most preferable one.\"\"\""},{"line_number":182,"context_line":"    _DATASTORE_PROPERTIES \u003d [\"summary.type\", \"summary.name\","}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_48d65df2","line":179,"updated":"2014-08-21 16:36:07.000000000","message":"this is basically doing two things: 1) get the available datastores 2) select the best one. We already have a function below which is doing 1), so I suggest to rename this to select_datastore() and do only 2)","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":176,"context_line":"    return LargestDataSelectionPolicy()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"def get_datastore(session, cluster_mor\u003dNone, host_mor\u003dNone,"},{"line_number":180,"context_line":"                  datastore_regex\u003dNone, policy\u003d\u0027largest\u0027):"},{"line_number":181,"context_line":"    \"\"\"Get the datastore list and choose the most preferable one.\"\"\""},{"line_number":182,"context_line":"    _DATASTORE_PROPERTIES \u003d [\"summary.type\", \"summary.name\","}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_0ce0d927","line":179,"in_reply_to":"1abeadc6_48d65df2","updated":"2014-08-22 12:02:43.000000000","message":"Let me check the use cases and revisit this after. probably wait for others to chime in as well.","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":240,"context_line":"                             host_mor\u003dNone,"},{"line_number":241,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":242,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":243,"context_line":"    if cluster_mor:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_a85531fb","line":240,"updated":"2014-08-21 16:36:07.000000000","message":"I don\u0027t think there is an usecase for getting host datastores after the deprecation of the ESX driver","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":237,"context_line":""},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"def get_available_datastores(session, cluster_mor\u003dNone,"},{"line_number":240,"context_line":"                             host_mor\u003dNone,"},{"line_number":241,"context_line":"                             datastore_regex\u003dNone):"},{"line_number":242,"context_line":"    \"\"\"Get the datastore list and choose the first local storage.\"\"\""},{"line_number":243,"context_line":"    if cluster_mor:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_5a61b103","line":240,"in_reply_to":"1abeadc6_a85531fb","updated":"2014-08-22 12:02:43.000000000","message":"please see vmops.VMwareVMOps.manage_image_cache","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"3adee5adb620c817b96368f5042642d77fabc778","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                         \"continue_retrieval\","},{"line_number":273,"context_line":"                                         session.vim,"},{"line_number":274,"context_line":"                                         data_stores)"},{"line_number":275,"context_line":"    return allowed"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_086705ea","line":275,"updated":"2014-08-21 16:36:07.000000000","message":"I\u0027d prefer to return Datastore objects here instead of property sets","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"26fdacb1c20f6cc2c3221b9965f94b423278ebb5","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                                         \"continue_retrieval\","},{"line_number":273,"context_line":"                                         session.vim,"},{"line_number":274,"context_line":"                                         data_stores)"},{"line_number":275,"context_line":"    return allowed"}],"source_content_type":"text/x-python","patch_set":16,"id":"1abeadc6_6c8a2d65","line":275,"in_reply_to":"1abeadc6_086705ea","updated":"2014-08-22 12:02:43.000000000","message":"I believe i am already doing that _get_allowed_datastores returns a datastore_object.Datastore","commit_id":"f0ce6409861c3a004e1a205a72db1f841c0c7987"}]}
