)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"67d4498cf76ac058363938b8a3a5a44b8aa2c888","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is a step on the path toward all resources being represented"},{"line_number":15,"context_line":"generically."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I00eab47edf1150788777300680e853a872c1db40"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f4e5783_fb42a5aa","line":16,"updated":"2017-10-16 14:48:36.000000000","message":"Don\"t we have a spec related to that change?","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c47a5b6d7285711a7b08697721e44af10a5b5be3","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is a step on the path toward all resources being represented"},{"line_number":15,"context_line":"generically."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I00eab47edf1150788777300680e853a872c1db40"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"5f4e5783_9566d5c0","line":16,"in_reply_to":"5f4e5783_fb42a5aa","updated":"2017-10-16 21:54:18.000000000","message":"As discussed [1] this doesn\u0027t require a spec.  I\u0027ve expanded the commit message to provide more detail.\n\n[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2017-10-16.log.html#t2017-10-16T14:58:21","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"235fd2c05f2009bd0fbcd967923f692ee104e4d2","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds a new \u0027allocations\u0027 kwarg to the"},{"line_number":10,"context_line":"nova.virt.driver.ComputeDriver.spawn method and its overrides.  The"},{"line_number":11,"context_line":"value is the dict returned from GET /allocations/{instance_uuid},"},{"line_number":12,"context_line":"representing the resources allocated to the instance from the scheduler"},{"line_number":13,"context_line":"via placement."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f4e5783_4be54b37","line":11,"updated":"2017-10-17 13:30:43.000000000","message":"\"is\" or \"has the structure of\"?\n\n\"is\". I figured it out further in.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"235fd2c05f2009bd0fbcd967923f692ee104e4d2","unresolved":false,"context_lines":[{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"},{"line_number":24,"context_line":"allows such allocations to be represented generically; this change"},{"line_number":25,"context_line":"is how virt is made aware of the same."},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"Change-Id: I00eab47edf1150788777300680e853a872c1db40"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"5f4e5783_0becf327","line":25,"updated":"2017-10-17 13:30:43.000000000","message":"Thanks for expanding the commit message like this.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"63848f2fd8c85e29a4ac721a40c17c851ea12258","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f4e5783_74c46340","line":20,"updated":"2017-10-17 16:54:00.000000000","message":"Is there any visibility how this is going to work if the allocation is not coming from the current compute host? How we are going to obtain the connection info for the allocation in that case?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d33d24170663e8dc22c6a27312b2e5a61e3daec","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f4b6375_4eaac485","line":20,"in_reply_to":"3f4b6375_ad494561","updated":"2017-10-18 12:00:55.000000000","message":"Gotcha.\n\nThe new param isn\u0027t supposed to replace *everything*.  It\u0027s only giving you stuff that placement knows about, so details like specific IP addresses won\u0027t be in there.  (Presumably that\u0027ll be in network_info, which there are no plans to get rid of AFAIK.)","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"be355adf589efd31f2a03ef77415435ee3022aa4","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f4e5783_940b5f28","line":20,"in_reply_to":"5f4e5783_74c46340","updated":"2017-10-17 17:04:07.000000000","message":"Can you elaborate? I\u0027m not sure what you mean.  We don\u0027t need \"connection info\" to fetch the allocation, and if we\u0027re doing spawn(), we should have an allocation on the current compute node already.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3df910a42c610f40a9b533b25c384b9b95ca714c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f4e5783_8a7454d0","line":20,"in_reply_to":"5f4e5783_8a71f478","updated":"2017-10-17 18:06:29.000000000","message":"Right, and it\u0027s entirely possible that a virt driver needs to know about the other resources anyway.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"87aa8c72ac2ba88d45f2b2a6fcf404b6e1dedc04","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"3f4b6375_ad494561","line":20,"in_reply_to":"5f4e5783_8a71f478","updated":"2017-10-18 07:36:58.000000000","message":"Thanks, Eric, this is exactly what I meant. However, I still don\u0027t get how this is going to work. If the instance has to be created on a shared NFS store, how spawn() is going to do this without knowing the IP address of the NFS? I am thinking from the perspective of the VMware driver, maybe this problem doesn\u0027t stand with other driver.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":17,"context_line":"providers.  Previously, virt drivers would process the flavor to glean"},{"line_number":18,"context_line":"this information.  This works fine as long as there\u0027s one monolithic"},{"line_number":19,"context_line":"resource provider - the compute host - providing all the inventory in"},{"line_number":20,"context_line":"a known fashion.  However, as we expand to using nested and shared"},{"line_number":21,"context_line":"resource providers, it becomes necessary for the virt driver to know"},{"line_number":22,"context_line":"that e.g. CPU inventory has been allocated from a specific NUMA node; or"},{"line_number":23,"context_line":"e.g. an SR-IOV VF has been allocated from a specific PF.  Placement"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5f4e5783_8a71f478","line":20,"in_reply_to":"5f4e5783_940b5f28","updated":"2017-10-17 17:45:38.000000000","message":"I took it to mean, \"...if the allocations include resources that don\u0027t belong to the compute host,\" e.g. disk from a shared storage provider, or a network resource owned by the neutron agent.\n\nIf that\u0027s what you meant, this works fine.  The allocations are separated by resource provider, so spawn can pay attention to whichever resources fall under this compute host\u0027s RP and ignore the rest.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"}],"nova/compute/manager.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b8b683eccb3ec8a77a53148b215d45fcca1547d7","unresolved":false,"context_lines":[{"line_number":2165,"context_line":"                          instance\u003dinstance)"},{"line_number":2166,"context_line":"            # Make sure the async call finishes"},{"line_number":2167,"context_line":"            if network_info is not None:"},{"line_number":2168,"context_line":"                network_info.wait(do_raise\u003dFalse)"},{"line_number":2169,"context_line":"            msg \u003d _(\u0027Failure prepping block device.\u0027)"},{"line_number":2170,"context_line":"            raise exception.BuildAbortException(instance_uuid\u003dinstance.uuid,"},{"line_number":2171,"context_line":"                    reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_f70c23a6","line":2168,"updated":"2017-10-13 19:29:47.000000000","message":"All of these exit paths wait for the async network allocation to complete.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b8b683eccb3ec8a77a53148b215d45fcca1547d7","unresolved":false,"context_lines":[{"line_number":2177,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"},{"line_number":2178,"context_line":"                          instance\u003dinstance)"},{"line_number":2179,"context_line":"            msg \u003d _(\u0027Failure retrieving placement allocations\u0027)"},{"line_number":2180,"context_line":"            raise exception.BuildAbortException(instance_uuid\u003dinstance.uuid,"},{"line_number":2181,"context_line":"                                                reason\u003dmsg)"},{"line_number":2182,"context_line":""},{"line_number":2183,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_b7022b6e","line":2180,"updated":"2017-10-13 19:29:47.000000000","message":"Presumably we need to do the same here before we explode?","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4d68d94e6f7651eae02c98ee57299b8400b9cb73","unresolved":false,"context_lines":[{"line_number":2177,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"},{"line_number":2178,"context_line":"                          instance\u003dinstance)"},{"line_number":2179,"context_line":"            msg \u003d _(\u0027Failure retrieving placement allocations\u0027)"},{"line_number":2180,"context_line":"            raise exception.BuildAbortException(instance_uuid\u003dinstance.uuid,"},{"line_number":2181,"context_line":"                                                reason\u003dmsg)"},{"line_number":2182,"context_line":""},{"line_number":2183,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_720041ac","line":2180,"in_reply_to":"5f4e5783_b7022b6e","updated":"2017-10-13 20:01:44.000000000","message":"Cool, will do.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"57384a45c313fd4b2451d30e5e9cbdef3a8485fd","unresolved":false,"context_lines":[{"line_number":2170,"context_line":"                    reason\u003dmsg)"},{"line_number":2171,"context_line":""},{"line_number":2172,"context_line":"        try:"},{"line_number":2173,"context_line":"            resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":2174,"context_line":"            resources[\u0027allocations\u0027] \u003d resp.json() if resp else {}"},{"line_number":2175,"context_line":"        except Exception:"},{"line_number":2176,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_51061e22","line":2173,"updated":"2017-10-17 14:04:53.000000000","message":"This should be reportclient.get_allocations_for_consumer()","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1f1c31b3dbb4a0ef484aae924a67622d3ff05555","unresolved":false,"context_lines":[{"line_number":2170,"context_line":"                    reason\u003dmsg)"},{"line_number":2171,"context_line":""},{"line_number":2172,"context_line":"        try:"},{"line_number":2173,"context_line":"            resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":2174,"context_line":"            resources[\u0027allocations\u0027] \u003d resp.json() if resp else {}"},{"line_number":2175,"context_line":"        except Exception:"},{"line_number":2176,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_3fbec9fe","line":2173,"in_reply_to":"5f4e5783_51061e22","updated":"2017-10-17 14:37:07.000000000","message":"Done","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"235fd2c05f2009bd0fbcd967923f692ee104e4d2","unresolved":false,"context_lines":[{"line_number":2171,"context_line":""},{"line_number":2172,"context_line":"        try:"},{"line_number":2173,"context_line":"            resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":2174,"context_line":"            resources[\u0027allocations\u0027] \u003d resp.json() if resp else {}"},{"line_number":2175,"context_line":"        except Exception:"},{"line_number":2176,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"},{"line_number":2177,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_6be4870d","line":2174,"updated":"2017-10-17 13:30:43.000000000","message":"This results in the allocation info being structed as:\n\nresources[\u0027allocations\u0027][\u0027allocations\u0027][$RP_UUID][\u0027resources\u0027][$RESOURCE_CLASS] \u003d\u003d $USED\n\nIs that the desired form? (just confirming)","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1f1c31b3dbb4a0ef484aae924a67622d3ff05555","unresolved":false,"context_lines":[{"line_number":2171,"context_line":""},{"line_number":2172,"context_line":"        try:"},{"line_number":2173,"context_line":"            resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":2174,"context_line":"            resources[\u0027allocations\u0027] \u003d resp.json() if resp else {}"},{"line_number":2175,"context_line":"        except Exception:"},{"line_number":2176,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"},{"line_number":2177,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_7fdfa168","line":2174,"in_reply_to":"5f4e5783_142bf482","updated":"2017-10-17 14:37:07.000000000","message":"[Later] Now that I\u0027m using get_allocations_for_consumer, the intervening [\u0027allocations\u0027] is stripped out.  I believe I updated all the appropriate docstrings etc. accordingly.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d48733d27a8f190d5cdf9349c56d388825a1640","unresolved":false,"context_lines":[{"line_number":2171,"context_line":""},{"line_number":2172,"context_line":"        try:"},{"line_number":2173,"context_line":"            resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":2174,"context_line":"            resources[\u0027allocations\u0027] \u003d resp.json() if resp else {}"},{"line_number":2175,"context_line":"        except Exception:"},{"line_number":2176,"context_line":"            LOG.exception(\u0027Failure retrieving placement allocations\u0027,"},{"line_number":2177,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_142bf482","line":2174,"in_reply_to":"5f4e5783_6be4870d","updated":"2017-10-17 14:15:58.000000000","message":"Yes.\n\nI originally made it an object (inherited from dict) that bypassed that second [\u0027allocations\u0027] and provided convenience methods to get at the data.  But Dan convinced me to leave it in its raw form and provide those convenience methods as utils, which I\u0027ll do in a followon at some point.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"235fd2c05f2009bd0fbcd967923f692ee104e4d2","unresolved":false,"context_lines":[{"line_number":2177,"context_line":"                          instance\u003dinstance)"},{"line_number":2178,"context_line":"            # Make sure the async call finishes"},{"line_number":2179,"context_line":"            if network_info is not None:"},{"line_number":2180,"context_line":"                network_info.wait(do_raise\u003dFalse)"},{"line_number":2181,"context_line":"            msg \u003d _(\u0027Failure retrieving placement allocations\u0027)"},{"line_number":2182,"context_line":"            raise exception.BuildAbortException(instance_uuid\u003dinstance.uuid,"},{"line_number":2183,"context_line":"                                                reason\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_2bd44fe8","line":2180,"updated":"2017-10-17 13:30:43.000000000","message":"This sent me looking at NetworkInfoAsyncWrapper. Oh my.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"57384a45c313fd4b2451d30e5e9cbdef3a8485fd","unresolved":false,"context_lines":[{"line_number":4638,"context_line":"        rt \u003d self._get_resource_tracker()"},{"line_number":4639,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":4642,"context_line":"        allocations \u003d resp.json() if resp else {}"},{"line_number":4643,"context_line":""},{"line_number":4644,"context_line":"        shelved_image_ref \u003d instance.image_ref"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_f404d816","line":4641,"updated":"2017-10-17 14:04:53.000000000","message":"As above.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"235fd2c05f2009bd0fbcd967923f692ee104e4d2","unresolved":false,"context_lines":[{"line_number":4639,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":4642,"context_line":"        allocations \u003d resp.json() if resp else {}"},{"line_number":4643,"context_line":""},{"line_number":4644,"context_line":"        shelved_image_ref \u003d instance.image_ref"},{"line_number":4645,"context_line":"        if image:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_cb0c9b95","line":4642,"updated":"2017-10-17 13:30:43.000000000","message":"third time\u0027s a charm, worth making a method?","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"57384a45c313fd4b2451d30e5e9cbdef3a8485fd","unresolved":false,"context_lines":[{"line_number":4639,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":4642,"context_line":"        allocations \u003d resp.json() if resp else {}"},{"line_number":4643,"context_line":""},{"line_number":4644,"context_line":"        shelved_image_ref \u003d instance.image_ref"},{"line_number":4645,"context_line":"        if image:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_b40ae01c","line":4642,"in_reply_to":"5f4e5783_cb0c9b95","updated":"2017-10-17 14:04:53.000000000","message":"It already is a method :)","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"9d48733d27a8f190d5cdf9349c56d388825a1640","unresolved":false,"context_lines":[{"line_number":4639,"context_line":"        limits \u003d filter_properties.get(\u0027limits\u0027, {})"},{"line_number":4640,"context_line":""},{"line_number":4641,"context_line":"        resp \u003d self.reportclient.get(\u0027/allocations/\u0027 + instance.uuid)"},{"line_number":4642,"context_line":"        allocations \u003d resp.json() if resp else {}"},{"line_number":4643,"context_line":""},{"line_number":4644,"context_line":"        shelved_image_ref \u003d instance.image_ref"},{"line_number":4645,"context_line":"        if image:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f4e5783_b47f8064","line":4642,"in_reply_to":"5f4e5783_cb0c9b95","updated":"2017-10-17 14:15:58.000000000","message":"Yeah, it is.  History (as much for my own notes as for your edification):\n\nI originally looked at creating a method in report.py called get_allocations_for_instance.  I got stymied by the fact that such a method already exists - but doesn\u0027t get the allocations for the instance!  Started playing with other names (I\u0027ll probably land on get_allocations_for_consumer) but then decided to inline it at the time because a) it was only two lines, and b) it was only in one place.  Then I got hit by the rebuild and unshelve code paths, and... just didn\u0027t bother to factor it out.\n\n[Later] Oh, neat, Dan made the method.  Will rebase \u0026 use it accordingly.","commit_id":"3c9839f9c02279f4ec8dbc80ea2bd228022b37db"}],"nova/tests/fixtures.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1b154a3996f17ce7336986a76a1a5dd18aeccb8b","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"        self.mock \u003d self.useFixture(fixtures.MockPatch("},{"line_number":1613,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":1614,"context_line":"            \u0027get_allocations_for_consumer\u0027,"},{"line_number":1615,"context_line":"            new\u003dmock.Mock(return_value\u003dself.allocations))).mock"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f4e5783_8d3eaeb5","line":1615,"updated":"2017-10-17 18:09:31.000000000","message":"This isn\u0027t what I meant, and probably isn\u0027t what we want, since it will always return the same allocation for any instance that asks.\n\nI was just suggesting you use fixtures.MonkeyPatch() in the test itself to return the thing you need. That would be three lines where this is ... a bunch.","commit_id":"cc363d66e147d3ae5fd99de32d73d882c6354910"}],"nova/tests/unit/compute/test_compute.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1511467153c92671600575377a12a858dd408f07","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":1441,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":1442,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":1443,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    def test_wrap_instance_fault(self):"},{"line_number":1446,"context_line":"        inst \u003d {\"uuid\": uuids.instance}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_bf5879f9","line":1443,"updated":"2017-10-17 14:46:02.000000000","message":"This should be a monkeypatch fixture. Also, any reason not to put this in BaseTestCase so you don\u0027t have to repeat yourself below?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3df910a42c610f40a9b533b25c384b9b95ca714c","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":1441,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":1442,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":1443,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    def test_wrap_instance_fault(self):"},{"line_number":1446,"context_line":"        inst \u003d {\"uuid\": uuids.instance}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_8a5d7448","line":1443,"in_reply_to":"5f4e5783_854d6c3f","updated":"2017-10-17 18:06:29.000000000","message":"Because fixtures are \"the new way\" and they\u0027re harder to forget to clean up.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"08b6803f8dd3837ca937e0a5eaf860cc67609c13","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":1441,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":1442,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":1443,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    def test_wrap_instance_fault(self):"},{"line_number":1446,"context_line":"        inst \u003d {\"uuid\": uuids.instance}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_681b6072","line":1443,"in_reply_to":"5f4e5783_8a5d7448","updated":"2017-10-17 18:34:03.000000000","message":"Rightright, I get the benefit of using the fixtures library, but it offers MockPatch as well as MonkeyPatch, and I\u0027m curious why I\u0027m seeing the latter rather than the former used around Nova.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":1441,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":1442,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":1443,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":1444,"context_line":""},{"line_number":1445,"context_line":"    def test_wrap_instance_fault(self):"},{"line_number":1446,"context_line":"        inst \u003d {\"uuid\": uuids.instance}"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_854d6c3f","line":1443,"in_reply_to":"5f4e5783_bf5879f9","updated":"2017-10-17 17:45:38.000000000","message":"Made it a general-purpose fixture.\n\nI\u0027m curious: why is MonkeyPatch used in preference to MockPatch?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2380a5beadd515f12c0f6aa3090b58272d3878e8","unresolved":false,"context_lines":[{"line_number":12013,"context_line":"                       fake_get_compute_info)"},{"line_number":12014,"context_line":"        self.useFixture(fixtures.SpawnIsSynchronousFixture())"},{"line_number":12015,"context_line":""},{"line_number":12016,"context_line":"        rcget_p \u003d mock.patch("},{"line_number":12017,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":12018,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":12019,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":12020,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":12021,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":12022,"context_line":""},{"line_number":12023,"context_line":"    def tearDown(self):"},{"line_number":12024,"context_line":"        db.instance_destroy(self.context, self.inst.uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_1fc30d59","line":12021,"range":{"start_line":12016,"start_character":0,"end_line":12021,"end_character":36},"updated":"2017-10-17 14:44:13.000000000","message":"This is repeated multple times. Can we make a fixture out of this?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":12013,"context_line":"                       fake_get_compute_info)"},{"line_number":12014,"context_line":"        self.useFixture(fixtures.SpawnIsSynchronousFixture())"},{"line_number":12015,"context_line":""},{"line_number":12016,"context_line":"        rcget_p \u003d mock.patch("},{"line_number":12017,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":12018,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":12019,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":12020,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":12021,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":12022,"context_line":""},{"line_number":12023,"context_line":"    def tearDown(self):"},{"line_number":12024,"context_line":"        db.instance_destroy(self.context, self.inst.uuid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_65715076","line":12021,"range":{"start_line":12016,"start_character":0,"end_line":12021,"end_character":36},"in_reply_to":"5f4e5783_1fc30d59","updated":"2017-10-17 17:45:38.000000000","message":"Done","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1511467153c92671600575377a12a858dd408f07","unresolved":false,"context_lines":[{"line_number":12225,"context_line":"            test.MatchType(context.RequestContext),"},{"line_number":12226,"context_line":"            test.MatchType(objects.Instance),"},{"line_number":12227,"context_line":"            test.MatchType(objects.ImageMeta),"},{"line_number":12228,"context_line":"            mock.ANY, \u0027newpass\u0027, mock.ANY,"},{"line_number":12229,"context_line":"            network_info\u003dmock.ANY,"},{"line_number":12230,"context_line":"            block_device_info\u003dmock.ANY)"},{"line_number":12231,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_1ffc2db3","line":12228,"range":{"start_line":12228,"start_character":32,"end_line":12228,"end_character":41},"updated":"2017-10-17 14:46:02.000000000","message":"Where are you actually validating that we\u0027re passing the right thing?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":12225,"context_line":"            test.MatchType(context.RequestContext),"},{"line_number":12226,"context_line":"            test.MatchType(objects.Instance),"},{"line_number":12227,"context_line":"            test.MatchType(objects.ImageMeta),"},{"line_number":12228,"context_line":"            mock.ANY, \u0027newpass\u0027, mock.ANY,"},{"line_number":12229,"context_line":"            network_info\u003dmock.ANY,"},{"line_number":12230,"context_line":"            block_device_info\u003dmock.ANY)"},{"line_number":12231,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_25deb8d9","line":12228,"range":{"start_line":12228,"start_character":32,"end_line":12228,"end_character":41},"in_reply_to":"5f4e5783_1ffc2db3","updated":"2017-10-17 17:45:38.000000000","message":"This didn\u0027t seem like the right place to do it.  But I\u0027ll go make sure there\u0027s at least one explicit check somewhere.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"00dcbfa554c2f2b2648d797fbc1f87f60c47af76","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        self.rt \u003d self.compute._get_resource_tracker()"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"        self.mock_get_allocs \u003d self.useFixture("},{"line_number":262,"context_line":"            fixtures.AllocationsForConsumerFixture()).mock"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def tearDown(self):"},{"line_number":265,"context_line":"        ctxt \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f4e5783_ad760a6f","line":262,"updated":"2017-10-17 18:13:34.000000000","message":"I was suggesting this:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/unit/virt/test_virt_drivers.py#L96\n\nNot a full new fixture to mock and return one thing.","commit_id":"cc363d66e147d3ae5fd99de32d73d882c6354910"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"758f29ea96b9e945f1c91bb0b6f1d10d10810609","unresolved":false,"context_lines":[{"line_number":12005,"context_line":"                       fake_get_compute_info)"},{"line_number":12006,"context_line":"        self.useFixture(fixtures.SpawnIsSynchronousFixture())"},{"line_number":12007,"context_line":""},{"line_number":12008,"context_line":"        rcget_p \u003d mock.patch("},{"line_number":12009,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":12010,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":12011,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":12012,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":12013,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":12014,"context_line":""},{"line_number":12015,"context_line":"    def tearDown(self):"},{"line_number":12016,"context_line":"        db.instance_destroy(self.context, self.inst.uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4b6375_2dff9568","line":12013,"range":{"start_line":12008,"start_character":0,"end_line":12013,"end_character":36},"updated":"2017-10-18 08:05:46.000000000","message":"You don\u0027t need this any more as you mocked the same thing in the base class already.","commit_id":"c20e112afe5d3cbb96b0219a1b8c301e68a27fe1"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cc22237e081573c81a9b87f8da914aa15e3c87e6","unresolved":false,"context_lines":[{"line_number":12005,"context_line":"                       fake_get_compute_info)"},{"line_number":12006,"context_line":"        self.useFixture(fixtures.SpawnIsSynchronousFixture())"},{"line_number":12007,"context_line":""},{"line_number":12008,"context_line":"        rcget_p \u003d mock.patch("},{"line_number":12009,"context_line":"            \u0027nova.scheduler.client.report.SchedulerReportClient.\u0027"},{"line_number":12010,"context_line":"            \u0027get_allocations_for_consumer\u0027)"},{"line_number":12011,"context_line":"        self.addCleanup(rcget_p.stop)"},{"line_number":12012,"context_line":"        mock_rcget \u003d rcget_p.start()"},{"line_number":12013,"context_line":"        mock_rcget.return_value \u003d {}"},{"line_number":12014,"context_line":""},{"line_number":12015,"context_line":"    def tearDown(self):"},{"line_number":12016,"context_line":"        db.instance_destroy(self.context, self.inst.uuid)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3f4b6375_6b67b227","line":12013,"range":{"start_line":12008,"start_character":0,"end_line":12013,"end_character":36},"in_reply_to":"3f4b6375_2dff9568","updated":"2017-10-18 11:46:06.000000000","message":"D\u0027oh, good catch, thanks gibi.","commit_id":"c20e112afe5d3cbb96b0219a1b8c301e68a27fe1"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"280f19972be6f5cdd7f78cec3e6f958ca688474f","unresolved":false,"context_lines":[{"line_number":5126,"context_line":"                    self.security_groups, self.image,"},{"line_number":5127,"context_line":"                    self.block_device_mapping):"},{"line_number":5128,"context_line":"                pass"},{"line_number":5129,"context_line":"        except Exception as e:"},{"line_number":5130,"context_line":"            self.assertIsInstance(e, exception.BuildAbortException)"},{"line_number":5131,"context_line":""},{"line_number":5132,"context_line":"        rcget.assert_called_once_with(\u0027/allocations/\u0027 + self.instance.uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_088b1a6e","line":5129,"updated":"2017-10-13 21:02:07.000000000","message":"This should be self.assertRaises right? Wrap the above in a closure and run the closure through assertRaises so you can get your nested context manager in there.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c4ccc967777768178c145cd0d6e73ba21c1b3826","unresolved":false,"context_lines":[{"line_number":5126,"context_line":"                    self.security_groups, self.image,"},{"line_number":5127,"context_line":"                    self.block_device_mapping):"},{"line_number":5128,"context_line":"                pass"},{"line_number":5129,"context_line":"        except Exception as e:"},{"line_number":5130,"context_line":"            self.assertIsInstance(e, exception.BuildAbortException)"},{"line_number":5131,"context_line":""},{"line_number":5132,"context_line":"        rcget.assert_called_once_with(\u0027/allocations/\u0027 + self.instance.uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_287b76f5","line":5129,"in_reply_to":"5f4e5783_088b1a6e","updated":"2017-10-13 21:29:28.000000000","message":"I was following the pattern from other test cases (like the one just above), but am happy either way.  Would you prefer assertRaises or \"consistency\"?","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1511467153c92671600575377a12a858dd408f07","unresolved":false,"context_lines":[{"line_number":4081,"context_line":"                    self.compute.driver)"},{"line_number":4082,"context_line":"        self.compute._resource_tracker \u003d fake_rt"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"        self.compute.reportclient \u003d mock.Mock()"},{"line_number":4085,"context_line":"        self.allocations \u003d {}"},{"line_number":4086,"context_line":"        self.compute.reportclient.get_allocations_for_consumer.return_value \u003d ("},{"line_number":4087,"context_line":"            self.allocations)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_3f1a4916","line":4084,"updated":"2017-10-17 14:46:02.000000000","message":"Should be a proper mock?","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":4081,"context_line":"                    self.compute.driver)"},{"line_number":4082,"context_line":"        self.compute._resource_tracker \u003d fake_rt"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"        self.compute.reportclient \u003d mock.Mock()"},{"line_number":4085,"context_line":"        self.allocations \u003d {}"},{"line_number":4086,"context_line":"        self.compute.reportclient.get_allocations_for_consumer.return_value \u003d ("},{"line_number":4087,"context_line":"            self.allocations)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_f75a9580","line":4084,"in_reply_to":"5f4e5783_3f1a4916","updated":"2017-10-17 17:45:38.000000000","message":"Done","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"1511467153c92671600575377a12a858dd408f07","unresolved":false,"context_lines":[{"line_number":4082,"context_line":"        self.compute._resource_tracker \u003d fake_rt"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"        self.compute.reportclient \u003d mock.Mock()"},{"line_number":4085,"context_line":"        self.allocations \u003d {}"},{"line_number":4086,"context_line":"        self.compute.reportclient.get_allocations_for_consumer.return_value \u003d ("},{"line_number":4087,"context_line":"            self.allocations)"},{"line_number":4088,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_3fefe9e9","line":4085,"updated":"2017-10-17 14:46:02.000000000","message":"This should probably have some meat into it so we\u0027re confirming that we\u0027re not off-by-one in a sea of empty dict and list arguments in the call assertions later in these tests.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":4082,"context_line":"        self.compute._resource_tracker \u003d fake_rt"},{"line_number":4083,"context_line":""},{"line_number":4084,"context_line":"        self.compute.reportclient \u003d mock.Mock()"},{"line_number":4085,"context_line":"        self.allocations \u003d {}"},{"line_number":4086,"context_line":"        self.compute.reportclient.get_allocations_for_consumer.return_value \u003d ("},{"line_number":4087,"context_line":"            self.allocations)"},{"line_number":4088,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_9753616b","line":4085,"in_reply_to":"5f4e5783_3fefe9e9","updated":"2017-10-17 17:45:38.000000000","message":"Done","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"}],"nova/tests/unit/virt/xenapi/test_xenapi.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2380a5beadd515f12c0f6aa3090b58272d3878e8","unresolved":false,"context_lines":[{"line_number":728,"context_line":"        if injected_files is None:"},{"line_number":729,"context_line":"            injected_files \u003d []"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        allocations \u003d {}"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        # Fake out inject_instance_metadata"},{"line_number":734,"context_line":"        def fake_inject_instance_metadata(self, instance, vm):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_5fcd0583","line":731,"updated":"2017-10-17 14:44:13.000000000","message":"Is there a specific reason why this has its own variable used only once below? In the other tests a simple {} passed inline.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e9873c181d23391237696c817a02b37aa872aeda","unresolved":false,"context_lines":[{"line_number":728,"context_line":"        if injected_files is None:"},{"line_number":729,"context_line":"            injected_files \u003d []"},{"line_number":730,"context_line":""},{"line_number":731,"context_line":"        allocations \u003d {}"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"        # Fake out inject_instance_metadata"},{"line_number":734,"context_line":"        def fake_inject_instance_metadata(self, instance, vm):"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f4e5783_6ab7d83b","line":731,"in_reply_to":"5f4e5783_5fcd0583","updated":"2017-10-17 17:45:38.000000000","message":"Just to match the other ones.  But I guess the other ones are being built up and this one\u0027s not.  Fixed.","commit_id":"9322addafe1405ca60164cd6f097dc4824f085ef"}],"nova/virt/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b8b683eccb3ec8a77a53148b215d45fcca1547d7","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_f731c35b","line":266,"updated":"2017-10-13 19:29:47.000000000","message":"Why make this \u003dNone? We\u0027re always going to pass it right? We do this \"any of our 23 arguments could be None at any time, good luck knowing when\" thing way too much.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"280f19972be6f5cdd7f78cec3e6f958ca688474f","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_88adcaea","line":266,"in_reply_to":"5f4e5783_524f8533","updated":"2017-10-13 21:02:07.000000000","message":"Yeah, I think we should be explicit here unless it\u0027s truly optional.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c4ccc967777768178c145cd0d6e73ba21c1b3826","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_c88502d1","line":266,"in_reply_to":"5f4e5783_88adcaea","updated":"2017-10-13 21:29:28.000000000","message":"Yuh, it definitely makes more sense for it to be positional and mandatory, long as I\u0027m not worried about \"breaking somebody\".  Getting it fixed up.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"1f541b76f54834d606aa524aa9dd384f786e679e","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_d118f31e","line":266,"in_reply_to":"5f4e5783_c88502d1","updated":"2017-10-16 10:13:18.000000000","message":"then we have more places to update maybe ...\n\nbut yeah, looks like we need make it mandatory as this info should be present whenever we spawn\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2672\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4697","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c47a5b6d7285711a7b08697721e44af10a5b5be3","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_d5fc4db6","line":266,"in_reply_to":"5f4e5783_d118f31e","updated":"2017-10-16 21:54:18.000000000","message":"Yes, thank you, fixing.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"4d68d94e6f7651eae02c98ee57299b8400b9cb73","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def spawn(self, context, instance, image_meta, injected_files,"},{"line_number":265,"context_line":"              admin_password, network_info\u003dNone, block_device_info\u003dNone,"},{"line_number":266,"context_line":"              allocations\u003dNone):"},{"line_number":267,"context_line":"        \"\"\"Create a new instance/VM/domain on the virtualization platform."},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        Once this successfully completes, the instance should be"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_524f8533","line":266,"in_reply_to":"5f4e5783_f731c35b","updated":"2017-10-13 20:01:44.000000000","message":"Heh, habit founded in coddling misbehaving consumers of public APIs who specify kwargs without naming them.\n\nBut I keep forgetting this isn\u0027t a public API (because I\u0027ve been consuming it as such in nova-powervm for three years).\n\nWill fix.","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":9172,"name":"Radoslav Gerganov","email":"rgerganov@vmware.com","username":"rgerganov"},"change_message_id":"5c3193c587178766c83ceee6d6185b0c9e13d950","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"        :param network_info: Instance network information."},{"line_number":1010,"context_line":"        :param block_device_info: Instance block device"},{"line_number":1011,"context_line":"            information."},{"line_number":1012,"context_line":"        :param nova.compute.allocations.Allocations allocations:"},{"line_number":1013,"context_line":"            Information about resources allocated to the instance via placement"},{"line_number":1014,"context_line":"        \"\"\""},{"line_number":1015,"context_line":"        LOG.debug(\u0027Spawn called for instance\u0027, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_38572ccd","line":1012,"updated":"2017-10-16 08:26:38.000000000","message":"Is there such class? Isn\u0027t it nova.objects.resource_provider.AllocationList?","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"c47a5b6d7285711a7b08697721e44af10a5b5be3","unresolved":false,"context_lines":[{"line_number":1009,"context_line":"        :param network_info: Instance network information."},{"line_number":1010,"context_line":"        :param block_device_info: Instance block device"},{"line_number":1011,"context_line":"            information."},{"line_number":1012,"context_line":"        :param nova.compute.allocations.Allocations allocations:"},{"line_number":1013,"context_line":"            Information about resources allocated to the instance via placement"},{"line_number":1014,"context_line":"        \"\"\""},{"line_number":1015,"context_line":"        LOG.debug(\u0027Spawn called for instance\u0027, instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f4e5783_35b04143","line":1012,"in_reply_to":"5f4e5783_38572ccd","updated":"2017-10-16 21:54:18.000000000","message":"This was from a previous rev where I made such a class - I need to fix this, thanks.\n\n(No, I can\u0027t use the nova.objects classes - those are internal to Placement, not for use by compute.)","commit_id":"301a5d7e8f515f1dcaa8a936e28dfba5d41db9de"}]}
