)]}'
{"nova/compute/claims.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    WARNING: This claim is now a verbatim copy of the code from"},{"line_number":78,"context_line":"    scheduler/claims."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __init__(self, context, instance, tracker, resources, overhead\u003dNone,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_b8a7edbb","line":80,"updated":"2016-03-03 10:54:31.000000000","message":"So, that\u0027s a bit risky to duplicate code first and do the factoring of both Claim classes after, because if the latter can\u0027t ship in time or has any problem, then you can have a certain amount of time where other contributors could modify this class without impacting the other.\n\nI\u0027m not super happy with that, and that also means that you have to carry a bunch of UTs for the specific Scheduler Claims that you wouldn\u0027t need if you were abstracting the Claim interface first.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e3bd0a96a9e133486fcc3f8d72c49f85f1b8539e","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    WARNING: This claim is now a verbatim copy of the code from"},{"line_number":78,"context_line":"    scheduler/claims."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __init__(self, context, instance, tracker, resources, overhead\u003dNone,"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_b9efec85","line":80,"in_reply_to":"7af24918_b8a7edbb","updated":"2016-03-03 12:19:40.000000000","message":"TBH I can\u0027t remember why it was done this way in the first place. We have both posted so changing it around would not be a matter of squashing the patches.\n\nSplitting that work out again might be tricker.\n\nI\u0027m in favor of merging posted stuff as is because making people do work that ultimately has no value to mitigate some risk of a few copy pasted lines moving on is not worth it, but I\u0027m in the people-over-process minority here...\n\nThere are other problems with this patch anyway ...","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    WARNING: This claim is now a verbatim copy of the code from"},{"line_number":78,"context_line":"    scheduler/claims."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":81,"context_line":"    \"\"\""},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def __init__(self, context, instance, tracker, resources, overhead\u003dNone,"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_1e151a48","line":80,"in_reply_to":"7af24918_b9efec85","updated":"2016-05-11 03:22:41.000000000","message":"No duplicate code now.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"}],"nova/scheduler/claims.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0ae3ab55ec40310942390e463057609bac2a51ad","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class Claim(claims.Claim):"},{"line_number":33,"context_line":"    \"\"\"A declaration that a host state operation will require free resources."},{"line_number":34,"context_line":"    Claims serve as marker objects that resources are being checked before the"},{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, spec_obj, host_state, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_347db0b1","line":36,"range":{"start_line":33,"start_character":7,"end_line":36,"end_character":10},"updated":"2016-01-13 12:03:51.000000000","message":"I would maybe put a big notice here that this is now a verbatim copy of the code from compute/ (and add anotice there as well) in case the next patch does not soon land but this one does - so that they have less chance of diverging","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0dda8e3c8ecc992e348f71817f81fbb5b77651a8","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class Claim(claims.Claim):"},{"line_number":33,"context_line":"    \"\"\"A declaration that a host state operation will require free resources."},{"line_number":34,"context_line":"    Claims serve as marker objects that resources are being checked before the"},{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, spec_obj, host_state, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_5f19ca20","line":36,"range":{"start_line":33,"start_character":7,"end_line":36,"end_character":10},"in_reply_to":"da6ed579_347db0b1","updated":"2016-01-15 14:01:15.000000000","message":"+1 for that idea.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class Claim(claims.Claim):"},{"line_number":33,"context_line":"    \"\"\"A declaration that a host state operation will require free resources."},{"line_number":34,"context_line":"    Claims serve as marker objects that resources are being checked before the"},{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, spec_obj, host_state, limits\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_7d278612","line":36,"range":{"start_line":33,"start_character":7,"end_line":36,"end_character":10},"in_reply_to":"da6ed579_5f19ca20","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fb7bf642c641c5729365be681bdc7b5c7c0386f4","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, spec_obj, host_state, limits\u003dNone):"},{"line_number":40,"context_line":"        # Stash a copy of the request at the current point of time"},{"line_number":41,"context_line":"        self.spec_obj \u003d spec_obj.obj_clone()"},{"line_number":42,"context_line":"        self.host_state \u003d host_state"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_93d286ff","line":39,"updated":"2016-01-19 16:44:18.000000000","message":"Not a big deal, but you might want to make it clear why super isn\u0027t called.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":"    \"\"\""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def __init__(self, spec_obj, host_state, limits\u003dNone):"},{"line_number":40,"context_line":"        # Stash a copy of the request at the current point of time"},{"line_number":41,"context_line":"        self.spec_obj \u003d spec_obj.obj_clone()"},{"line_number":42,"context_line":"        self.host_state \u003d host_state"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_3de6eeb4","line":39,"in_reply_to":"ba63e191_93d286ff","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67158e02375c1062d5ed07d13f73c5eb62e14957","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        vcpus_limit \u003d limits.get(\u0027vcpu\u0027)"},{"line_number":97,"context_line":"        numa_topology_limit \u003d limits.get(\u0027numa_topology\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        LOG.info(_LI(\"Attempting claim: memory %(memory_mb)d MB, \""},{"line_number":100,"context_line":"                     \"disk %(disk_gb)d GB, vcpus %(vcpus)d CPU\"),"},{"line_number":101,"context_line":"                 {\u0027memory_mb\u0027: self.memory_mb, \u0027disk_gb\u0027: self.disk_gb,"},{"line_number":102,"context_line":"                  \u0027vcpus\u0027: self.vcpus})"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_eaf195ce","line":99,"range":{"start_line":99,"start_character":12,"end_line":99,"end_character":16},"updated":"2016-01-19 13:33:24.000000000","message":"not sure about nova rules about logging, but I usually see anything ending with \"-ing\" to be logged as debug()","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"        vcpus_limit \u003d limits.get(\u0027vcpu\u0027)"},{"line_number":97,"context_line":"        numa_topology_limit \u003d limits.get(\u0027numa_topology\u0027)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        LOG.info(_LI(\"Attempting claim: memory %(memory_mb)d MB, \""},{"line_number":100,"context_line":"                     \"disk %(disk_gb)d GB, vcpus %(vcpus)d CPU\"),"},{"line_number":101,"context_line":"                 {\u0027memory_mb\u0027: self.memory_mb, \u0027disk_gb\u0027: self.disk_gb,"},{"line_number":102,"context_line":"                  \u0027vcpus\u0027: self.vcpus})"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_dd3eb2d9","line":99,"range":{"start_line":99,"start_character":12,"end_line":99,"end_character":16},"in_reply_to":"ba63e191_eaf195ce","updated":"2016-01-20 04:58:19.000000000","message":"The logs are not going to be modified here in this patch, because this patch aims to let scheduler have the identical claim behavior in compute/.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67158e02375c1062d5ed07d13f73c5eb62e14957","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            raise exception.ComputeResourcesUnavailable(reason\u003d"},{"line_number":113,"context_line":"                    \"; \".join(reasons))"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        LOG.info(_LI(\u0027Claim successful\u0027))"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _test_memory(self, resources, limit):"},{"line_number":118,"context_line":"        type_ \u003d _(\"memory\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_0ac66967","line":115,"range":{"start_line":115,"start_character":22,"end_line":115,"end_character":38},"updated":"2016-01-19 13:33:24.000000000","message":"could you please include the same information into logging as on line #99?","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"589ba225f16901938fac514ddd088374a78bcca8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    WARNING: This claim is now a verbatim copy of the code from compute/claims."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":41,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_078678da","line":38,"updated":"2016-03-03 12:05:51.000000000","message":"so its not, its a cut and paste of random bits... I am finding this very, very hard to review. This is my third attempt now :(","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"e3bd0a96a9e133486fcc3f8d72c49f85f1b8539e","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    WARNING: This claim is now a verbatim copy of the code from compute/claims."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":41,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_998e702c","line":38,"in_reply_to":"7af24918_078678da","updated":"2016-03-03 12:19:40.000000000","message":"Yeah agreed this really should be a verbatim copy not a subclass of Claim, if there are bits that need to be changed to make this work as a copy, it should be done in a preceding patch","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    consume_from_request process runs to do a full reconciliation of resource"},{"line_number":36,"context_line":"    usage."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    WARNING: This claim is now a verbatim copy of the code from compute/claims."},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    TODO(Yingxin): Refactor claim code to eliminate replication."},{"line_number":41,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_99180477","line":38,"in_reply_to":"7af24918_998e702c","updated":"2016-05-11 03:22:41.000000000","message":"Yes, it\u0027s not now. And it can reuse a large amount of code from compute claim. Done with reusing more code.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"589ba225f16901938fac514ddd088374a78bcca8","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        raise NotImplemented(\"There is no need to abort a claim in\""},{"line_number":84,"context_line":"                             \" host state.\")"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _claim_test(self, resources, limits\u003dNone):"},{"line_number":87,"context_line":"        \"\"\"Test if this claim can be satisfied given available resources and"},{"line_number":88,"context_line":"        optional oversubscription limits"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_4776c0d7","line":86,"updated":"2016-03-03 12:05:51.000000000","message":"why is this cut and paste here, I really don\u0027t understand...","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        raise NotImplemented(\"There is no need to abort a claim in\""},{"line_number":84,"context_line":"                             \" host state.\")"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    def _claim_test(self, resources, limits\u003dNone):"},{"line_number":87,"context_line":"        \"\"\"Test if this claim can be satisfied given available resources and"},{"line_number":88,"context_line":"        optional oversubscription limits"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_39cf582a","line":86,"in_reply_to":"7af24918_4776c0d7","updated":"2016-05-11 03:22:41.000000000","message":"Reused code.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"589ba225f16901938fac514ddd088374a78bcca8","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        LOG.info(_LI(\"Attempting claim: memory %(memory_mb)d MB, \""},{"line_number":107,"context_line":"                     \"disk %(disk_gb)d GB, vcpus %(vcpus)d CPU\"),"},{"line_number":108,"context_line":"                 {\u0027memory_mb\u0027: self.memory_mb, \u0027disk_gb\u0027: self.disk_gb,"},{"line_number":109,"context_line":"                  \u0027vcpus\u0027: self.vcpus})"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        reasons \u003d [self._test_memory(resources, memory_mb_limit),"},{"line_number":112,"context_line":"                   self._test_disk(resources, disk_gb_limit),"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_d922b8a2","line":109,"updated":"2016-03-03 12:05:51.000000000","message":"OK, this is missing self.instance, I guess...","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        LOG.info(_LI(\"Attempting claim: memory %(memory_mb)d MB, \""},{"line_number":107,"context_line":"                     \"disk %(disk_gb)d GB, vcpus %(vcpus)d CPU\"),"},{"line_number":108,"context_line":"                 {\u0027memory_mb\u0027: self.memory_mb, \u0027disk_gb\u0027: self.disk_gb,"},{"line_number":109,"context_line":"                  \u0027vcpus\u0027: self.vcpus})"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        reasons \u003d [self._test_memory(resources, memory_mb_limit),"},{"line_number":112,"context_line":"                   self._test_disk(resources, disk_gb_limit),"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_793c40c8","line":109,"in_reply_to":"7af24918_d922b8a2","updated":"2016-05-11 03:22:41.000000000","message":"Right, the code is reused now.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"0ae3ab55ec40310942390e463057609bac2a51ad","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _select_host(self, spec_obj, weighed_hosts):"},{"line_number":143,"context_line":"        \"\"\"Choose the appropriate host according to weighed hosts.\"\"\""},{"line_number":144,"context_line":"        scheduler_host_subset_size \u003d max(1, CONF.scheduler_host_subset_size)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        while len(weighed_hosts) \u003e 0:"},{"line_number":147,"context_line":"            if scheduler_host_subset_size \u003c len(weighed_hosts):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_6d0bffd6","line":144,"range":{"start_line":144,"start_character":44,"end_line":144,"end_character":75},"updated":"2016-01-13 12:03:51.000000000","message":"We might want to deprecate this now as it is not as useful after these changes - but nothing that has to be done as part of this series","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _select_host(self, spec_obj, weighed_hosts):"},{"line_number":143,"context_line":"        \"\"\"Choose the appropriate host according to weighed hosts.\"\"\""},{"line_number":144,"context_line":"        scheduler_host_subset_size \u003d max(1, CONF.scheduler_host_subset_size)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        while len(weighed_hosts) \u003e 0:"},{"line_number":147,"context_line":"            if scheduler_host_subset_size \u003c len(weighed_hosts):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_9d083a2f","line":144,"range":{"start_line":144,"start_character":44,"end_line":144,"end_character":75},"in_reply_to":"da6ed579_3fa736be","updated":"2016-01-20 04:58:19.000000000","message":"+1 for multiple schedulers.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0dda8e3c8ecc992e348f71817f81fbb5b77651a8","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def _select_host(self, spec_obj, weighed_hosts):"},{"line_number":143,"context_line":"        \"\"\"Choose the appropriate host according to weighed hosts.\"\"\""},{"line_number":144,"context_line":"        scheduler_host_subset_size \u003d max(1, CONF.scheduler_host_subset_size)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        while len(weighed_hosts) \u003e 0:"},{"line_number":147,"context_line":"            if scheduler_host_subset_size \u003c len(weighed_hosts):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_3fa736be","line":144,"range":{"start_line":144,"start_character":44,"end_line":144,"end_character":75},"in_reply_to":"fa69d971_6d0bffd6","updated":"2016-01-15 14:01:15.000000000","message":"It might still be useful with multiple schedulers (although, thats a crazy thing to do).\n\nActually, I suspect we will still have some races around the updates on the actual usage from the host being slower than the refresh on this in memory catch of the host state.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0dda8e3c8ecc992e348f71817f81fbb5b77651a8","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            # Now consume the resources so the filter/weights"},{"line_number":154,"context_line":"            # will change for the next instance."},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                chosen_host.obj.consume_from_request(spec_obj)"},{"line_number":157,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":158,"context_line":"                LOG.debug(\"Remove host: %(host)s because of consumption\""},{"line_number":159,"context_line":"                        \"failure %(failure)s.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_9a8af062","line":156,"updated":"2016-01-15 14:01:15.000000000","message":"For the numa stuff, we probably want to make sure this claim choice gets back to the compute node (and ideally make then persistent). But that is a more long term thing. This is a good step in that direction.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            # Now consume the resources so the filter/weights"},{"line_number":154,"context_line":"            # will change for the next instance."},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                chosen_host.obj.consume_from_request(spec_obj)"},{"line_number":157,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":158,"context_line":"                LOG.debug(\"Remove host: %(host)s because of consumption\""},{"line_number":159,"context_line":"                        \"failure %(failure)s.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_98e36805","line":156,"in_reply_to":"ba63e191_1690c442","updated":"2016-01-20 04:58:19.000000000","message":"I\u0027m working on a PoC that will send the scheduler claims to host. Its ultimate goal is to make incremental updates to scheduler HostState caches, so that the cache could be updated ASAP under the least overhead.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"fb438aa7624919e15e260a33351f0ca2bf977fde","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            # Now consume the resources so the filter/weights"},{"line_number":154,"context_line":"            # will change for the next instance."},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                chosen_host.obj.consume_from_request(spec_obj)"},{"line_number":157,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":158,"context_line":"                LOG.debug(\"Remove host: %(host)s because of consumption\""},{"line_number":159,"context_line":"                        \"failure %(failure)s.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_729ef357","line":156,"in_reply_to":"ba63e191_98e36805","updated":"2016-01-21 11:53:23.000000000","message":"@Nikola its the re-ordering of requests between the scheduler and hitting the compute, that worries me. I mean, its very edge case, it just seems more \"correct\".\n\nI think we spoke about at the summit, more about the idea of claims being owned by the scheduler, and \"checked\" by the compute nodes, long term. Hence the passing of the claim back to the compute node. But anyways, thats future stuff, and we probably want it to be a little different to that.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"07a591ab4ad2602b7d187a6d5a1bf567d3480bb7","unresolved":false,"context_lines":[{"line_number":153,"context_line":"            # Now consume the resources so the filter/weights"},{"line_number":154,"context_line":"            # will change for the next instance."},{"line_number":155,"context_line":"            try:"},{"line_number":156,"context_line":"                chosen_host.obj.consume_from_request(spec_obj)"},{"line_number":157,"context_line":"            except exception.ComputeResourcesUnavailable as e:"},{"line_number":158,"context_line":"                LOG.debug(\"Remove host: %(host)s because of consumption\""},{"line_number":159,"context_line":"                        \"failure %(failure)s.\","}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_1690c442","line":156,"in_reply_to":"da6ed579_9a8af062","updated":"2016-01-19 16:46:56.000000000","message":"Well we can\u0027t really do that until we actually start commiting the claim on the scheduler. That would only really save us recalculating it on the host, but we have to do it as the request that was first to pass the claim may not be the first that makes it to the host where the actual \"commit\" happens.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67158e02375c1062d5ed07d13f73c5eb62e14957","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                        {\u0027host\u0027: chosen_host, \u0027failure\u0027: e})"},{"line_number":161,"context_line":"                weighed_hosts.remove(chosen_host)"},{"line_number":162,"context_line":"            else:"},{"line_number":163,"context_line":"                LOG.debug(\"Selected host: %(host)s\", {\u0027host\u0027: chosen_host})"},{"line_number":164,"context_line":"                return chosen_host"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        LOG.debug(\"No host available from request %s!\", spec_obj)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_6a0cc594","line":163,"range":{"start_line":163,"start_character":16,"end_line":163,"end_character":75},"updated":"2016-01-19 13:33:24.000000000","message":"I realize it\u0027s just a copy-paste, but shouldn\u0027t it be INFO level and contain spec_obj?","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                        {\u0027host\u0027: chosen_host, \u0027failure\u0027: e})"},{"line_number":161,"context_line":"                weighed_hosts.remove(chosen_host)"},{"line_number":162,"context_line":"            else:"},{"line_number":163,"context_line":"                LOG.debug(\"Selected host: %(host)s\", {\u0027host\u0027: chosen_host})"},{"line_number":164,"context_line":"                return chosen_host"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        LOG.debug(\"No host available from request %s!\", spec_obj)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_9336e9e5","line":163,"range":{"start_line":163,"start_character":16,"end_line":163,"end_character":75},"in_reply_to":"ba63e191_6a0cc594","updated":"2016-01-20 04:58:19.000000000","message":"+1 to add INFO log to record the final result of scheduling, but I prefer not here.\n\nIt\u0027s better to add at the end of select_destinations().","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fb7bf642c641c5729365be681bdc7b5c7c0386f4","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                LOG.debug(\"Selected host: %(host)s\", {\u0027host\u0027: chosen_host})"},{"line_number":164,"context_line":"                return chosen_host"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        LOG.debug(\"No host available from request %s!\", spec_obj)"},{"line_number":167,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_362aa87f","line":166,"updated":"2016-01-19 16:44:18.000000000","message":"Should it be s/from/for/ ? Or \"No host available to match request %s!\"\n\nDmitry: it\u0027s not an error for no hosts to be found, it\u0027s just  there weren\u0027t any that matched.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"67158e02375c1062d5ed07d13f73c5eb62e14957","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                LOG.debug(\"Selected host: %(host)s\", {\u0027host\u0027: chosen_host})"},{"line_number":164,"context_line":"                return chosen_host"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        LOG.debug(\"No host available from request %s!\", spec_obj)"},{"line_number":167,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_4af6a190","line":166,"range":{"start_line":166,"start_character":12,"end_line":166,"end_character":17},"updated":"2016-01-19 13:33:24.000000000","message":"shouldn\u0027t it be error()?","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                LOG.debug(\"Selected host: %(host)s\", {\u0027host\u0027: chosen_host})"},{"line_number":164,"context_line":"                return chosen_host"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        LOG.debug(\"No host available from request %s!\", spec_obj)"},{"line_number":167,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_78279412","line":166,"in_reply_to":"ba63e191_362aa87f","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"23fbf78398f5d6f8ddfaa1181011bfce49d67c23","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        scheduler_host_subset_size \u003d max(1, CONF.scheduler_host_subset_size)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        while len(weighed_hosts) \u003e 0:"},{"line_number":147,"context_line":"            if scheduler_host_subset_size \u003c len(weighed_hosts):"},{"line_number":148,"context_line":"                chosen_host \u003d random.choice("},{"line_number":149,"context_line":"                        weighed_hosts[0:scheduler_host_subset_size])"},{"line_number":150,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_954a6bab","line":147,"updated":"2016-01-28 14:23:44.000000000","message":"My first instinct was to point out that this could be moved outside of the loop, until I realised that it does need to be applied each time to ensure lower weight hosts get pulled in after a removal. Is it worth a comment explaining this to prevent future \u0027optimisations\u0027?","commit_id":"dedd174ba944b40f53db7e497da84cfb75cee0f1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"2dea06e2e783bf015633263350e586c0ec03d1c8","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        scheduler_host_subset_size \u003d max(1, CONF.scheduler_host_subset_size)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        while len(weighed_hosts) \u003e 0:"},{"line_number":147,"context_line":"            if scheduler_host_subset_size \u003c len(weighed_hosts):"},{"line_number":148,"context_line":"                chosen_host \u003d random.choice("},{"line_number":149,"context_line":"                        weighed_hosts[0:scheduler_host_subset_size])"},{"line_number":150,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_b39871c1","line":147,"in_reply_to":"7a5de9d1_954a6bab","updated":"2016-02-06 08:15:26.000000000","message":"Done","commit_id":"dedd174ba944b40f53db7e497da84cfb75cee0f1"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7399b7a62e7f581cc481ed349f2e4f702f5389b4","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        return _locked(self, spec_obj)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _locked_consume_from_request(self, spec_obj):"},{"line_number":260,"context_line":"        disk_mb \u003d (spec_obj.root_gb +"},{"line_number":261,"context_line":"                   spec_obj.ephemeral_gb) * 1024"},{"line_number":262,"context_line":"        ram_mb \u003d spec_obj.memory_mb"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_9f33d9f5","side":"PARENT","line":259,"updated":"2016-01-06 14:18:07.000000000","message":"I think it is worth documenting, either with docstring or comment that this method could raise an exception if the Claim initialization fails to complete the claim.","commit_id":"733b4fa20ac65c36679711aea386492524d0b5c5"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"7ca0899089bf78c33dcf65786a27de437cbbf4ba","unresolved":false,"context_lines":[{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        return _locked(self, spec_obj)"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"    def _locked_consume_from_request(self, spec_obj):"},{"line_number":260,"context_line":"        disk_mb \u003d (spec_obj.root_gb +"},{"line_number":261,"context_line":"                   spec_obj.ephemeral_gb) * 1024"},{"line_number":262,"context_line":"        ram_mb \u003d spec_obj.memory_mb"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_afd348d4","side":"PARENT","line":259,"in_reply_to":"fa69d971_9f33d9f5","updated":"2016-01-11 15:03:30.000000000","message":"Done","commit_id":"733b4fa20ac65c36679711aea386492524d0b5c5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"fb7bf642c641c5729365be681bdc7b5c7c0386f4","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def consume_from_request(self, spec_obj):"},{"line_number":221,"context_line":"        \"\"\"Incrementally update host state from an RequestSpec object, raise"},{"line_number":222,"context_line":"        exception ComputeResourcesUnavailable if consumption failed."},{"line_number":223,"context_line":"        \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        @utils.synchronized(self._lock_name)"},{"line_number":226,"context_line":"        def _locked(self, spec_obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_56e87c10","line":223,"updated":"2016-01-19 16:44:18.000000000","message":"I\u0027d make this two separate paragraphs:\n\n...object.\\n\\nRaise exception...\n\nAlso if you\u0027re in there anyway may as well fix \"from an\" to \"from a\".","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":220,"context_line":"    def consume_from_request(self, spec_obj):"},{"line_number":221,"context_line":"        \"\"\"Incrementally update host state from an RequestSpec object, raise"},{"line_number":222,"context_line":"        exception ComputeResourcesUnavailable if consumption failed."},{"line_number":223,"context_line":"        \"\"\""},{"line_number":224,"context_line":""},{"line_number":225,"context_line":"        @utils.synchronized(self._lock_name)"},{"line_number":226,"context_line":"        def _locked(self, spec_obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_33913d9a","line":223,"in_reply_to":"ba63e191_56e87c10","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0dda8e3c8ecc992e348f71817f81fbb5b77651a8","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # message will be dispatched in it\u0027s own green thread. So the"},{"line_number":229,"context_line":"            # shared host state should be consumed in a consistent way to make"},{"line_number":230,"context_line":"            # sure its data is valid under concurrent write operations."},{"line_number":231,"context_line":"            ret \u003d self._locked_consume_from_request(spec_obj)"},{"line_number":232,"context_line":"            now \u003d timeutils.utcnow()"},{"line_number":233,"context_line":"            # NOTE(sbauza): Objects are UTC tz-aware by default"},{"line_number":234,"context_line":"            self.updated \u003d now.replace(tzinfo\u003diso8601.iso8601.Utc())"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_9f050247","line":231,"updated":"2016-01-15 14:01:15.000000000","message":"Nit: if this is a claim, it would be nice to call it a claim.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"            # message will be dispatched in it\u0027s own green thread. So the"},{"line_number":229,"context_line":"            # shared host state should be consumed in a consistent way to make"},{"line_number":230,"context_line":"            # sure its data is valid under concurrent write operations."},{"line_number":231,"context_line":"            ret \u003d self._locked_consume_from_request(spec_obj)"},{"line_number":232,"context_line":"            now \u003d timeutils.utcnow()"},{"line_number":233,"context_line":"            # NOTE(sbauza): Objects are UTC tz-aware by default"},{"line_number":234,"context_line":"            self.updated \u003d now.replace(tzinfo\u003diso8601.iso8601.Utc())"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_13ed1925","line":231,"in_reply_to":"da6ed579_9f050247","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            self.updated \u003d now.replace(tzinfo\u003diso8601.iso8601.Utc())"},{"line_number":98,"context_line":"        return return_value"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    return decorated_function"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class HostState(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_1839c1f2","side":"PARENT","line":100,"updated":"2016-03-03 10:54:31.000000000","message":"You should have explained in the commit msg why you feel that becoming unnecessary (I can understand tho, and that looks good to me)","commit_id":"dd03245bf12a512ecb7d8f5b479950288ef3beac"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":97,"context_line":"            self.updated \u003d now.replace(tzinfo\u003diso8601.iso8601.Utc())"},{"line_number":98,"context_line":"        return return_value"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    return decorated_function"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"class HostState(object):"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_59397cd6","side":"PARENT","line":100,"in_reply_to":"7af24918_1839c1f2","updated":"2016-05-11 03:22:41.000000000","message":"Done","commit_id":"dd03245bf12a512ecb7d8f5b479950288ef3beac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        return _locked(self, spec_obj)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def _locked_consume_from_request(self, spec_obj):"},{"line_number":241,"context_line":"        \"\"\"Raise exception ComputeResourcesUnavailable if consumption failed."},{"line_number":242,"context_line":"        \"\"\""},{"line_number":243,"context_line":"        claim \u003d claims.Claim(spec_obj, self, self.limits)"},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_9b602bd1","line":241,"range":{"start_line":241,"start_character":27,"end_line":241,"end_character":54},"updated":"2016-03-03 10:54:31.000000000","message":"well, nit, but that\u0027s actually HostStateResourcesUnavailable I guess","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        return _locked(self, spec_obj)"},{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def _locked_consume_from_request(self, spec_obj):"},{"line_number":241,"context_line":"        \"\"\"Raise exception ComputeResourcesUnavailable if consumption failed."},{"line_number":242,"context_line":"        \"\"\""},{"line_number":243,"context_line":"        claim \u003d claims.Claim(spec_obj, self, self.limits)"},{"line_number":244,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_995004d6","line":241,"range":{"start_line":241,"start_character":27,"end_line":241,"end_character":54},"in_reply_to":"7af24918_9b602bd1","updated":"2016-05-11 03:22:41.000000000","message":"Maybe the exception can be renamed to ResourceUnavailable I guess.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"}],"nova/tests/unit/scheduler/test_claims.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0dda8e3c8ecc992e348f71817f81fbb5b77651a8","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova.tests import uuidsentinel"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ClaimTestCase(test.NoDBTestCase):"},{"line_number":34,"context_line":"    \"\"\"Test case for Claim class.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def test_claim_failed_with_simple_resources(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da6ed579_1fbfd261","line":33,"updated":"2016-01-15 14:01:15.000000000","message":"Would be good to note this is a cut and paste too.","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0365c27142724e430b3e6de439fcd3e338b1108d","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova.tests import uuidsentinel"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ClaimTestCase(test.NoDBTestCase):"},{"line_number":34,"context_line":"    \"\"\"Test case for Claim class.\"\"\""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def test_claim_failed_with_simple_resources(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba63e191_134e7996","line":33,"in_reply_to":"da6ed579_1fbfd261","updated":"2016-01-20 04:58:19.000000000","message":"Done","commit_id":"a7c5755297e07e7e102d186648e89fd15d76c654"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_f885f5ce","line":1,"updated":"2016-03-03 10:54:31.000000000","message":"nit: You don\u0027t need to give copyright to the Foundation if you don\u0027t want to give a specific copyright to your company.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation"},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_390d98e8","line":1,"in_reply_to":"7af24918_f885f5ce","updated":"2016-05-11 03:22:41.000000000","message":":)","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova.tests import uuidsentinel"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ClaimTestCase(test.NoDBTestCase):"},{"line_number":34,"context_line":"    \"\"\"Test case for scheduler Claim class."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    NOTE(Yingxin): Claim related tests are moved from test_host_manager."}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_b8508d33","line":33,"updated":"2016-03-03 10:54:31.000000000","message":"See, that\u0027s becoming a duplicate code here too, that requires my eyes to be verifying each line of this to make sure all looks good.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":30,"context_line":"from nova.tests import uuidsentinel"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class ClaimTestCase(test.NoDBTestCase):"},{"line_number":34,"context_line":"    \"\"\"Test case for scheduler Claim class."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    NOTE(Yingxin): Claim related tests are moved from test_host_manager."}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_797e001a","line":33,"in_reply_to":"7af24918_b8508d33","updated":"2016-05-11 03:22:41.000000000","message":"It\u0027s not duplicated to compute/test_claim.py. It\u0027s the new tests for the scheduler claim. Its logics have some differences compared with the compute claim, so I need to write tests for it.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"a1656a6b927fd00ab1e13182181f1e939afb8805","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        disk_ratio \u003d 1"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        # Prepare compute node record"},{"line_number":46,"context_line":"        stats \u003d {"},{"line_number":47,"context_line":"            \u0027num_instances\u0027: \u00275\u0027,"},{"line_number":48,"context_line":"            \u0027num_proj_12345\u0027: \u00273\u0027,"},{"line_number":49,"context_line":"            \u0027num_proj_23456\u0027: \u00271\u0027,"},{"line_number":50,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.BUILDING: \u00272\u0027,"},{"line_number":51,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.SUSPENDED: \u00271\u0027,"},{"line_number":52,"context_line":"            \u0027num_task_%s\u0027 % task_states.RESIZE_MIGRATING: \u00271\u0027,"},{"line_number":53,"context_line":"            \u0027num_task_%s\u0027 % task_states.MIGRATING: \u00272\u0027,"},{"line_number":54,"context_line":"            \u0027num_os_type_linux\u0027: \u00274\u0027,"},{"line_number":55,"context_line":"            \u0027num_os_type_windoze\u0027: \u00271\u0027,"},{"line_number":56,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":57,"context_line":"        }"},{"line_number":58,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":59,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":60,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_644f596b","line":57,"range":{"start_line":46,"start_character":8,"end_line":57,"end_character":9},"updated":"2016-05-17 12:52:19.000000000","message":"could you extract this to a setUp(self) method? Like\n\ndef setUp(self):\n    self.stats \u003d ...\n\nthen you can use self.stats instead in the this and the next test case.","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"1c2cde928fe251867526613fa1024d0f9968f924","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        disk_ratio \u003d 1"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        # Prepare compute node record"},{"line_number":46,"context_line":"        stats \u003d {"},{"line_number":47,"context_line":"            \u0027num_instances\u0027: \u00275\u0027,"},{"line_number":48,"context_line":"            \u0027num_proj_12345\u0027: \u00273\u0027,"},{"line_number":49,"context_line":"            \u0027num_proj_23456\u0027: \u00271\u0027,"},{"line_number":50,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.BUILDING: \u00272\u0027,"},{"line_number":51,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.SUSPENDED: \u00271\u0027,"},{"line_number":52,"context_line":"            \u0027num_task_%s\u0027 % task_states.RESIZE_MIGRATING: \u00271\u0027,"},{"line_number":53,"context_line":"            \u0027num_task_%s\u0027 % task_states.MIGRATING: \u00272\u0027,"},{"line_number":54,"context_line":"            \u0027num_os_type_linux\u0027: \u00274\u0027,"},{"line_number":55,"context_line":"            \u0027num_os_type_windoze\u0027: \u00271\u0027,"},{"line_number":56,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":57,"context_line":"        }"},{"line_number":58,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":59,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":60,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_c4b8d377","line":57,"range":{"start_line":46,"start_character":8,"end_line":57,"end_character":9},"in_reply_to":"dab17558_644f596b","updated":"2016-05-23 02:27:43.000000000","message":"Done","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"a1656a6b927fd00ab1e13182181f1e939afb8805","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":57,"context_line":"        }"},{"line_number":58,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":59,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":60,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"},{"line_number":61,"context_line":"            local_gb_used\u003d1, free_ram_mb\u003d0, vcpus\u003dvcpus, vcpus_used\u003d0,"},{"line_number":62,"context_line":"            disk_available_least\u003dNone,"},{"line_number":63,"context_line":"            updated_at\u003dNone, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":64,"context_line":"            hypervisor_type\u003d\u0027htype\u0027,"},{"line_number":65,"context_line":"            hypervisor_hostname\u003d\u0027hostname\u0027, cpu_info\u003d\u0027cpu_info\u0027,"},{"line_number":66,"context_line":"            supported_hv_specs\u003d[],"},{"line_number":67,"context_line":"            hypervisor_version\u003dhyper_ver_int, numa_topology\u003dNone,"},{"line_number":68,"context_line":"            pci_device_pools\u003dNone, metrics\u003dNone,"},{"line_number":69,"context_line":"            cpu_allocation_ratio\u003dcpu_ratio, ram_allocation_ratio\u003dram_ratio,"},{"line_number":70,"context_line":"            disk_allocation_ratio\u003ddisk_ratio)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Prepare HostState object"},{"line_number":73,"context_line":"        host \u003d host_manager.HostState(\"fakehost\", \"fakenode\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_c4da8577","line":70,"range":{"start_line":59,"start_character":8,"end_line":70,"end_character":45},"updated":"2016-05-17 12:52:19.000000000","message":"I\u0027d prefer if something like a _get_compute_node method would be used with the varying parameters in this and the next test case, since there are many common values.","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"1c2cde928fe251867526613fa1024d0f9968f924","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":57,"context_line":"        }"},{"line_number":58,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":59,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":60,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"},{"line_number":61,"context_line":"            local_gb_used\u003d1, free_ram_mb\u003d0, vcpus\u003dvcpus, vcpus_used\u003d0,"},{"line_number":62,"context_line":"            disk_available_least\u003dNone,"},{"line_number":63,"context_line":"            updated_at\u003dNone, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":64,"context_line":"            hypervisor_type\u003d\u0027htype\u0027,"},{"line_number":65,"context_line":"            hypervisor_hostname\u003d\u0027hostname\u0027, cpu_info\u003d\u0027cpu_info\u0027,"},{"line_number":66,"context_line":"            supported_hv_specs\u003d[],"},{"line_number":67,"context_line":"            hypervisor_version\u003dhyper_ver_int, numa_topology\u003dNone,"},{"line_number":68,"context_line":"            pci_device_pools\u003dNone, metrics\u003dNone,"},{"line_number":69,"context_line":"            cpu_allocation_ratio\u003dcpu_ratio, ram_allocation_ratio\u003dram_ratio,"},{"line_number":70,"context_line":"            disk_allocation_ratio\u003ddisk_ratio)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        # Prepare HostState object"},{"line_number":73,"context_line":"        host \u003d host_manager.HostState(\"fakehost\", \"fakenode\")"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_24b43f7e","line":70,"range":{"start_line":59,"start_character":8,"end_line":70,"end_character":45},"in_reply_to":"dab17558_c4da8577","updated":"2016-05-23 02:27:43.000000000","message":"Done","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"}],"nova/tests/unit/scheduler/test_filter_scheduler.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7399b7a62e7f581cc481ed349f2e4f702f5389b4","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                                              mock_cn_get_all,"},{"line_number":261,"context_line":"                                              mock_get_by_binary,"},{"line_number":262,"context_line":"                                              mock_get_inst_info):"},{"line_number":263,"context_line":"        \"\"\"Make sure that scheduler will choose the appropriate host even if"},{"line_number":264,"context_line":"        the claim of the best one failed."},{"line_number":265,"context_line":"        \"\"\""},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_ff38d5d4","line":263,"updated":"2016-01-06 14:18:07.000000000","message":"s/the/an/ ?","commit_id":"d03b3dafd7af8e3c22a1e62d5249463fabc630cb"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"7ca0899089bf78c33dcf65786a27de437cbbf4ba","unresolved":false,"context_lines":[{"line_number":260,"context_line":"                                              mock_cn_get_all,"},{"line_number":261,"context_line":"                                              mock_get_by_binary,"},{"line_number":262,"context_line":"                                              mock_get_inst_info):"},{"line_number":263,"context_line":"        \"\"\"Make sure that scheduler will choose the appropriate host even if"},{"line_number":264,"context_line":"        the claim of the best one failed."},{"line_number":265,"context_line":"        \"\"\""},{"line_number":266,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa69d971_4fddecde","line":263,"in_reply_to":"fa69d971_ff38d5d4","updated":"2016-01-11 15:03:30.000000000","message":"Done","commit_id":"d03b3dafd7af8e3c22a1e62d5249463fabc630cb"}],"nova/tests/unit/scheduler/test_host_manager.py":[{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"9de13ebcc9f2b68b95da5eb17e3557040c0d090c","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def test_get_filtered_hosts(self):"},{"line_number":212,"context_line":"        fake_properties \u003d objects.RequestSpec("},{"line_number":213,"context_line":"                ignore_hosts\u003d[],"},{"line_number":214,"context_line":"                instance_uuid\u003duuidsentinel.fake_spec,"},{"line_number":215,"context_line":"                force_hosts\u003d[],"},{"line_number":216,"context_line":"                force_nodes\u003d[])"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7a5de9d1_de55891d","line":214,"range":{"start_line":214,"start_character":30,"end_line":214,"end_character":52},"updated":"2016-01-27 20:47:22.000000000","message":"It seems that these changes are not related to the rest of the patchset, and should be done in a separate patch that this depends on.","commit_id":"dedd174ba944b40f53db7e497da84cfb75cee0f1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"2dea06e2e783bf015633263350e586c0ec03d1c8","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def test_get_filtered_hosts(self):"},{"line_number":212,"context_line":"        fake_properties \u003d objects.RequestSpec("},{"line_number":213,"context_line":"                ignore_hosts\u003d[],"},{"line_number":214,"context_line":"                instance_uuid\u003duuidsentinel.fake_spec,"},{"line_number":215,"context_line":"                force_hosts\u003d[],"},{"line_number":216,"context_line":"                force_nodes\u003d[])"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_d395ed86","line":214,"range":{"start_line":214,"start_character":30,"end_line":214,"end_character":52},"in_reply_to":"5a5ae5dd_1578aef1","updated":"2016-02-06 08:15:26.000000000","message":"Yes, another low hanging fruit","commit_id":"dedd174ba944b40f53db7e497da84cfb75cee0f1"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"c10e86ced605e1d2f93cecedbd2676ca71d6b720","unresolved":false,"context_lines":[{"line_number":211,"context_line":"    def test_get_filtered_hosts(self):"},{"line_number":212,"context_line":"        fake_properties \u003d objects.RequestSpec("},{"line_number":213,"context_line":"                ignore_hosts\u003d[],"},{"line_number":214,"context_line":"                instance_uuid\u003duuidsentinel.fake_spec,"},{"line_number":215,"context_line":"                force_hosts\u003d[],"},{"line_number":216,"context_line":"                force_nodes\u003d[])"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_1578aef1","line":214,"range":{"start_line":214,"start_character":30,"end_line":214,"end_character":52},"in_reply_to":"7a5de9d1_de55891d","updated":"2016-02-04 10:43:48.000000000","message":"Yes this does not seem related - it would be good to have it in a separate change.","commit_id":"dedd174ba944b40f53db7e497da84cfb75cee0f1"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"a1656a6b927fd00ab1e13182181f1e939afb8805","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        cpu_ratio \u003d 1.5"},{"line_number":1006,"context_line":"        disk_gb \u003d 4"},{"line_number":1007,"context_line":"        disk_ratio \u003d 2"},{"line_number":1008,"context_line":""},{"line_number":1009,"context_line":"        stats \u003d {"},{"line_number":1010,"context_line":"            \u0027num_instances\u0027: \u00275\u0027,"},{"line_number":1011,"context_line":"            \u0027num_proj_12345\u0027: \u00273\u0027,"},{"line_number":1012,"context_line":"            \u0027num_proj_23456\u0027: \u00271\u0027,"},{"line_number":1013,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.BUILDING: \u00272\u0027,"},{"line_number":1014,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.SUSPENDED: \u00271\u0027,"},{"line_number":1015,"context_line":"            \u0027num_task_%s\u0027 % task_states.RESIZE_MIGRATING: \u00271\u0027,"},{"line_number":1016,"context_line":"            \u0027num_task_%s\u0027 % task_states.MIGRATING: \u00272\u0027,"},{"line_number":1017,"context_line":"            \u0027num_os_type_linux\u0027: \u00274\u0027,"},{"line_number":1018,"context_line":"            \u0027num_os_type_windoze\u0027: \u00271\u0027,"},{"line_number":1019,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":1020,"context_line":"        }"},{"line_number":1021,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":1022,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":1023,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"},{"line_number":1024,"context_line":"            local_gb_used\u003d1, free_ram_mb\u003d1024, vcpus\u003dvcpus, vcpus_used\u003d0,"},{"line_number":1025,"context_line":"            disk_available_least\u003dNone,"},{"line_number":1026,"context_line":"            updated_at\u003dNone, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":1027,"context_line":"            hypervisor_type\u003d\u0027htype\u0027,"},{"line_number":1028,"context_line":"            hypervisor_hostname\u003d\u0027hostname\u0027, cpu_info\u003d\u0027cpu_info\u0027,"},{"line_number":1029,"context_line":"            supported_hv_specs\u003d[],"},{"line_number":1030,"context_line":"            hypervisor_version\u003dhyper_ver_int, numa_topology\u003dNone,"},{"line_number":1031,"context_line":"            pci_device_pools\u003dNone, metrics\u003dNone,"},{"line_number":1032,"context_line":"            cpu_allocation_ratio\u003dcpu_ratio, ram_allocation_ratio\u003dram_ratio,"},{"line_number":1033,"context_line":"            disk_allocation_ratio\u003ddisk_ratio)"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"        host \u003d host_manager.HostState(\"fakehost\", \"fakenode\")"},{"line_number":1036,"context_line":"        host.update(compute\u003dcompute)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dab17558_c4e4450e","line":1033,"range":{"start_line":1008,"start_character":0,"end_line":1033,"end_character":45},"updated":"2016-05-17 12:52:19.000000000","message":"Same as with test_claims.py.","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"},{"author":{"_account_id":20873,"name":"Laszlo Hegedus","email":"hegedues.laszlo@gmail.com","username":"laszloh"},"change_message_id":"a059d79760ec1d1518d35ee209d2618f06aa9e1d","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        cpu_ratio \u003d 1.5"},{"line_number":1006,"context_line":"        disk_gb \u003d 4"},{"line_number":1007,"context_line":"        disk_ratio \u003d 2"},{"line_number":1008,"context_line":""},{"line_number":1009,"context_line":"        stats \u003d {"},{"line_number":1010,"context_line":"            \u0027num_instances\u0027: \u00275\u0027,"},{"line_number":1011,"context_line":"            \u0027num_proj_12345\u0027: \u00273\u0027,"},{"line_number":1012,"context_line":"            \u0027num_proj_23456\u0027: \u00271\u0027,"},{"line_number":1013,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.BUILDING: \u00272\u0027,"},{"line_number":1014,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.SUSPENDED: \u00271\u0027,"},{"line_number":1015,"context_line":"            \u0027num_task_%s\u0027 % task_states.RESIZE_MIGRATING: \u00271\u0027,"},{"line_number":1016,"context_line":"            \u0027num_task_%s\u0027 % task_states.MIGRATING: \u00272\u0027,"},{"line_number":1017,"context_line":"            \u0027num_os_type_linux\u0027: \u00274\u0027,"},{"line_number":1018,"context_line":"            \u0027num_os_type_windoze\u0027: \u00271\u0027,"},{"line_number":1019,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":1020,"context_line":"        }"},{"line_number":1021,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":1022,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":1023,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"},{"line_number":1024,"context_line":"            local_gb_used\u003d1, free_ram_mb\u003d1024, vcpus\u003dvcpus, vcpus_used\u003d0,"},{"line_number":1025,"context_line":"            disk_available_least\u003dNone,"},{"line_number":1026,"context_line":"            updated_at\u003dNone, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":1027,"context_line":"            hypervisor_type\u003d\u0027htype\u0027,"},{"line_number":1028,"context_line":"            hypervisor_hostname\u003d\u0027hostname\u0027, cpu_info\u003d\u0027cpu_info\u0027,"},{"line_number":1029,"context_line":"            supported_hv_specs\u003d[],"},{"line_number":1030,"context_line":"            hypervisor_version\u003dhyper_ver_int, numa_topology\u003dNone,"},{"line_number":1031,"context_line":"            pci_device_pools\u003dNone, metrics\u003dNone,"},{"line_number":1032,"context_line":"            cpu_allocation_ratio\u003dcpu_ratio, ram_allocation_ratio\u003dram_ratio,"},{"line_number":1033,"context_line":"            disk_allocation_ratio\u003ddisk_ratio)"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"        host \u003d host_manager.HostState(\"fakehost\", \"fakenode\")"},{"line_number":1036,"context_line":"        host.update(compute\u003dcompute)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_9eae132c","line":1033,"range":{"start_line":1008,"start_character":0,"end_line":1033,"end_character":45},"in_reply_to":"bab6814e_8469abfb","updated":"2016-05-23 06:54:54.000000000","message":"Alright. If they would stand out from the other tests, then I\u0027m okay with leaving them like this.","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"1c2cde928fe251867526613fa1024d0f9968f924","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"        cpu_ratio \u003d 1.5"},{"line_number":1006,"context_line":"        disk_gb \u003d 4"},{"line_number":1007,"context_line":"        disk_ratio \u003d 2"},{"line_number":1008,"context_line":""},{"line_number":1009,"context_line":"        stats \u003d {"},{"line_number":1010,"context_line":"            \u0027num_instances\u0027: \u00275\u0027,"},{"line_number":1011,"context_line":"            \u0027num_proj_12345\u0027: \u00273\u0027,"},{"line_number":1012,"context_line":"            \u0027num_proj_23456\u0027: \u00271\u0027,"},{"line_number":1013,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.BUILDING: \u00272\u0027,"},{"line_number":1014,"context_line":"            \u0027num_vm_%s\u0027 % vm_states.SUSPENDED: \u00271\u0027,"},{"line_number":1015,"context_line":"            \u0027num_task_%s\u0027 % task_states.RESIZE_MIGRATING: \u00271\u0027,"},{"line_number":1016,"context_line":"            \u0027num_task_%s\u0027 % task_states.MIGRATING: \u00272\u0027,"},{"line_number":1017,"context_line":"            \u0027num_os_type_linux\u0027: \u00274\u0027,"},{"line_number":1018,"context_line":"            \u0027num_os_type_windoze\u0027: \u00271\u0027,"},{"line_number":1019,"context_line":"            \u0027io_workload\u0027: \u002742\u0027,"},{"line_number":1020,"context_line":"        }"},{"line_number":1021,"context_line":"        hyper_ver_int \u003d versionutils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":1022,"context_line":"        compute \u003d objects.ComputeNode("},{"line_number":1023,"context_line":"            stats\u003dstats, memory_mb\u003dmemory_mb, free_disk_gb\u003d0, local_gb\u003ddisk_gb,"},{"line_number":1024,"context_line":"            local_gb_used\u003d1, free_ram_mb\u003d1024, vcpus\u003dvcpus, vcpus_used\u003d0,"},{"line_number":1025,"context_line":"            disk_available_least\u003dNone,"},{"line_number":1026,"context_line":"            updated_at\u003dNone, host_ip\u003d\u0027127.0.0.1\u0027,"},{"line_number":1027,"context_line":"            hypervisor_type\u003d\u0027htype\u0027,"},{"line_number":1028,"context_line":"            hypervisor_hostname\u003d\u0027hostname\u0027, cpu_info\u003d\u0027cpu_info\u0027,"},{"line_number":1029,"context_line":"            supported_hv_specs\u003d[],"},{"line_number":1030,"context_line":"            hypervisor_version\u003dhyper_ver_int, numa_topology\u003dNone,"},{"line_number":1031,"context_line":"            pci_device_pools\u003dNone, metrics\u003dNone,"},{"line_number":1032,"context_line":"            cpu_allocation_ratio\u003dcpu_ratio, ram_allocation_ratio\u003dram_ratio,"},{"line_number":1033,"context_line":"            disk_allocation_ratio\u003ddisk_ratio)"},{"line_number":1034,"context_line":""},{"line_number":1035,"context_line":"        host \u003d host_manager.HostState(\"fakehost\", \"fakenode\")"},{"line_number":1036,"context_line":"        host.update(compute\u003dcompute)"}],"source_content_type":"text/x-python","patch_set":9,"id":"bab6814e_8469abfb","line":1033,"range":{"start_line":1008,"start_character":0,"end_line":1033,"end_character":45},"in_reply_to":"dab17558_c4e4450e","updated":"2016-05-23 02:27:43.000000000","message":"This follows the same style with other tests in this test suite, and should be refactored in a separate patch.","commit_id":"5b6fcb4f7cf2d069faed3b9e8f9c427b2bfcf2e3"}],"nova/virt/hardware.py":[{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"7f5f5dfe4260d107f0f82ae6860198473717282d","unresolved":false,"context_lines":[{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1324,"context_line":"def instance_topology_from_instance(instance):"},{"line_number":1325,"context_line":"    \"\"\"Convenience method for getting the numa_topology out of instances or"},{"line_number":1326,"context_line":"    request_spec"},{"line_number":1327,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_23e20dd6","line":1324,"range":{"start_line":1324,"start_character":36,"end_line":1324,"end_character":44},"updated":"2016-02-19 20:43:10.000000000","message":"Would be good to rename the argument maybe?","commit_id":"a880c16f7a7fd92ce7210e36ce4b66b7f9e022be"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0a60d938cb3d9256da48d7d56895bbed9838bfac","unresolved":false,"context_lines":[{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1324,"context_line":"def instance_topology_from_instance(instance):"},{"line_number":1325,"context_line":"    \"\"\"Convenience method for getting the numa_topology out of instances or"},{"line_number":1326,"context_line":"    request_spec"},{"line_number":1327,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"bae84128_77edb624","line":1324,"range":{"start_line":1324,"start_character":36,"end_line":1324,"end_character":44},"in_reply_to":"bae84128_23e20dd6","updated":"2016-02-22 08:22:45.000000000","message":"Done","commit_id":"a880c16f7a7fd92ce7210e36ce4b66b7f9e022be"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1324,"context_line":"def instance_topology_from_object(obj):"},{"line_number":1325,"context_line":"    \"\"\"Convenience method for getting the numa_topology out of instances or"},{"line_number":1326,"context_line":"    request_spec"},{"line_number":1327,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_d8b759d6","line":1324,"updated":"2016-03-03 10:54:31.000000000","message":"I would have appreciated if you were splitting that and providing that change in a dependent patch, that would have reduced the risks of making review mistakes or misses.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"589ba225f16901938fac514ddd088374a78bcca8","unresolved":false,"context_lines":[{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1324,"context_line":"def instance_topology_from_object(obj):"},{"line_number":1325,"context_line":"    \"\"\"Convenience method for getting the numa_topology out of instances or"},{"line_number":1326,"context_line":"    request_spec"},{"line_number":1327,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_e7754c98","line":1324,"in_reply_to":"7af24918_d8b759d6","updated":"2016-03-03 12:05:51.000000000","message":"+1 on that split.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"6a8fe11e5781e356e33d1e331d99a6f9b3cb9f39","unresolved":false,"context_lines":[{"line_number":1321,"context_line":""},{"line_number":1322,"context_line":""},{"line_number":1323,"context_line":"# TODO(ndipanov): Remove when all code paths are using objects"},{"line_number":1324,"context_line":"def instance_topology_from_object(obj):"},{"line_number":1325,"context_line":"    \"\"\"Convenience method for getting the numa_topology out of instances or"},{"line_number":1326,"context_line":"    request_spec"},{"line_number":1327,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"dab17558_199c145c","line":1324,"in_reply_to":"7af24918_e7754c98","updated":"2016-05-11 03:22:41.000000000","message":"Done","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"a1998000e587521e8bf7ac934670b0f63073fe26","unresolved":false,"context_lines":[{"line_number":1332,"context_line":"    if isinstance(obj, obj_instance.Instance):"},{"line_number":1333,"context_line":"        # NOTE (ndipanov): This may cause a lazy-load of the attribute"},{"line_number":1334,"context_line":"        instance_numa_topology \u003d obj.numa_topology"},{"line_number":1335,"context_line":"    elif isinstance(obj, objects.RequestSpec):"},{"line_number":1336,"context_line":"        instance_numa_topology \u003d obj.numa_topology"},{"line_number":1337,"context_line":"    else:"},{"line_number":1338,"context_line":"        if \u0027numa_topology\u0027 in obj:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7af24918_d805997a","line":1335,"updated":"2016-03-03 10:54:31.000000000","message":"well, you could have made a if (A or B), that would have reduced the duplication.","commit_id":"0133d32dd3563ef4cccabc2c38ad0ec5fffdeae1"}]}
