)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a597a398c709d66b47f3c96db9123205f5baf73","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle user-defined ephemeral disk size if provided"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"User is able to specify custom ephemeral disk size and format, but"},{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and incapability to launch a VM when the compute"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9ad45d7e_59ccef69","line":9,"updated":"2016-08-10 20:14:05.000000000","message":"I actually wasn\u0027t aware users could do this...","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"eea700f33b59b51b125908f2c913d818fde0290f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle user-defined ephemeral disk size if provided"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"User is able to specify custom ephemeral disk size and format, but"},{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and incapability to launch a VM when the compute"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9ad45d7e_691c1cc2","line":9,"in_reply_to":"9ad45d7e_59ccef69","updated":"2016-08-12 11:55:15.000000000","message":"Yes, user could request ephemeral disk with any size in range from 1 to value defined in flavor. it\u0027s also implemented in clients.","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a597a398c709d66b47f3c96db9123205f5baf73","unresolved":false,"context_lines":[{"line_number":9,"context_line":"User is able to specify custom ephemeral disk size and format, but"},{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and incapability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9ad45d7e_39c93b5a","line":12,"updated":"2016-08-10 20:14:05.000000000","message":"s/incapability/inability/","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"eea700f33b59b51b125908f2c913d818fde0290f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"User is able to specify custom ephemeral disk size and format, but"},{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and incapability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9ad45d7e_b307a380","line":12,"in_reply_to":"9ad45d7e_39c93b5a","updated":"2016-08-12 11:55:15.000000000","message":"Done","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2f0aebecee10ff14bd6786f9480303e7f392d1fb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handle user-defined ephemeral disk size if provided"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"User is able to specify custom ephemeral disk size and format, but"},{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"9ad45d7e_15564f06","line":9,"updated":"2016-08-12 13:30:25.000000000","message":"Oh, I\u0027m really surprised we actually support this...","commit_id":"d8081979f8e7edb5281a9539e52f087b61c890b9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80d54379397522ddee4876a1f97a32d87bc5dcf9","unresolved":false,"context_lines":[{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"},{"line_number":16,"context_line":"Closes-Bug: 1428176"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ac06dbe_349683f0","line":13,"updated":"2016-08-22 17:23:27.000000000","message":"How is allowing user-defined ephemeral sizes not a DoS exploit? If this is really the case, we probably need to examine the sanity of that. Can you provide more information about how this is possible and why that makes sense?","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6ee73413862754c41663bb2113d34153d4bc1c76","unresolved":false,"context_lines":[{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"},{"line_number":16,"context_line":"Closes-Bug: 1428176"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ac06dbe_3620eff6","line":13,"in_reply_to":"1ac06dbe_253901d8","updated":"2016-08-23 20:35:40.000000000","message":"Yeah, I see now that it\u0027s bounded by flavor, so that\u0027s good I guess, but just really surprising to me that this is exposed.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"7d0f1b5bcc288385f5e8da80e307c85a21275695","unresolved":false,"context_lines":[{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"},{"line_number":16,"context_line":"Closes-Bug: 1428176"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ac06dbe_787bae8c","line":13,"in_reply_to":"1ac06dbe_349683f0","updated":"2016-08-23 07:02:08.000000000","message":"The user-defined ephemeral size value is still bounded by what is specified in the flavor, so this should be ok. Having said that, it\u0027s very surprising for  me that we allow this in our API.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"984c2386c2467c2cab5df74f513fc436cd21e9b5","unresolved":false,"context_lines":[{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"},{"line_number":16,"context_line":"Closes-Bug: 1428176"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ac06dbe_253901d8","line":13,"in_reply_to":"1ac06dbe_349683f0","updated":"2016-08-23 14:36:37.000000000","message":"Yes, the ability to specify user-defined ephemeral disk size is already present in Nova and described in the official user guide: http://docs.openstack.org/user-guide/cli-nova-launch-instance-from-volume.html#attach-swap-or-ephemeral-disk-to-an-instance\n\nThe only problem here is that nova-scheduler gives false-negative result if the user has adjusted ephemeral disk size, in which case the instance can really fit.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7c4fda03f9c5d098a171646aad559cfdbc53321d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"currently nova-scheduler ignores this user-defined value, as it"},{"line_number":11,"context_line":"uses only flavor-defined value. This may lead to false-negative"},{"line_number":12,"context_line":"scheduler result and inability to launch a VM when the compute"},{"line_number":13,"context_line":"disk resource is actually sufficient."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: Ibbf3653d8d9f8c557f020bf043ae543434349af0"},{"line_number":16,"context_line":"Closes-Bug: 1428176"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1ac06dbe_8fb6e6f6","line":13,"in_reply_to":"1ac06dbe_3620eff6","updated":"2016-08-23 21:24:55.000000000","message":"TBH, I\u0027m very not liking the possibility to override flavors by passing BDM-related values which would then make the flavor not being the single source of truth for knowing the user request.\n\nAt least, that specific CLI thing should IMHO be removed without easy way to specify that unless you\u0027re explicitly knowing that you will trample the world and potentially lead to problems because you decided your flavor is not good enough (or because as an operator you were lazy enough to not create a flavor).\n\nNow that said, I sincerely don\u0027t think we should continue to support this on the server side, because like I said, it introduces some corner case where looking up the flavor wouldn\u0027t help figuring out. We could potentially hack the RequestSpec object like we did for root_gb\u003d0 for making sure that the nested flavor would be correct but is that a good idea ? I\u0027m really not sure.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"}],"nova/compute/api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4e0cc4abdf0b3673c38d6f314ffc9f701b53dd6f","unresolved":false,"context_lines":[{"line_number":1123,"context_line":"                         \u0027max_net_count\u0027: max_net_count})"},{"line_number":1124,"context_line":"            max_count \u003d max_net_count"},{"line_number":1125,"context_line":""},{"line_number":1126,"context_line":"        ephemeral_size \u003d block_device.get_bdm_ephemeral_disk_size("},{"line_number":1127,"context_line":"                block_device_mapping)"},{"line_number":1128,"context_line":"        if ephemeral_size:"},{"line_number":1129,"context_line":"            base_options[\u0027ephemeral_gb\u0027] \u003d ephemeral_size"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_c08d4ad4","line":1126,"updated":"2016-08-18 10:30:44.000000000","message":"nit: perharps this should be moved inside _check_and_transform_bdm()","commit_id":"20ece825b30f0ce062f0ff3f7eb34bf39e0a614a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80d54379397522ddee4876a1f97a32d87bc5dcf9","unresolved":false,"context_lines":[{"line_number":714,"context_line":"                                 block_device_mapping, legacy_bdm):"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        ephemeral_size \u003d block_device.get_bdm_ephemeral_disk_size("},{"line_number":717,"context_line":"                block_device_mapping)"},{"line_number":718,"context_line":"        if ephemeral_size:"},{"line_number":719,"context_line":"            base_options[\u0027ephemeral_gb\u0027] \u003d ephemeral_size"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_54d5ffb6","line":717,"updated":"2016-08-22 17:23:27.000000000","message":"This seems to return the volume size of a bdm, if volume-backed. I\u0027m not sure it was intended to allow the user to specify the ephemeral size. As best I can tell, this would be a serious user-exploitable issue.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"984c2386c2467c2cab5df74f513fc436cd21e9b5","unresolved":false,"context_lines":[{"line_number":714,"context_line":"                                 block_device_mapping, legacy_bdm):"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"        ephemeral_size \u003d block_device.get_bdm_ephemeral_disk_size("},{"line_number":717,"context_line":"                block_device_mapping)"},{"line_number":718,"context_line":"        if ephemeral_size:"},{"line_number":719,"context_line":"            base_options[\u0027ephemeral_gb\u0027] \u003d ephemeral_size"},{"line_number":720,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_8501d5b1","line":717,"in_reply_to":"1ac06dbe_54d5ffb6","updated":"2016-08-23 14:36:37.000000000","message":"It works with any type of storage and contents ephemeral disk size if it was provided in nova API request (or nothing).","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80d54379397522ddee4876a1f97a32d87bc5dcf9","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        ephemeral_size \u003d block_device.get_bdm_ephemeral_disk_size("},{"line_number":717,"context_line":"                block_device_mapping)"},{"line_number":718,"context_line":"        if ephemeral_size:"},{"line_number":719,"context_line":"            base_options[\u0027ephemeral_gb\u0027] \u003d ephemeral_size"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        # NOTE (ndipanov): Assume root dev name is \u0027vda\u0027 if not supplied."},{"line_number":722,"context_line":"        #                  It\u0027s needed for legacy conversion to work."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_34b7a3d9","line":719,"updated":"2016-08-22 17:23:27.000000000","message":"So, the problem with this is that instance.ephemeral_gb is deprecated and I was hoping to remove it soon.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"984c2386c2467c2cab5df74f513fc436cd21e9b5","unresolved":false,"context_lines":[{"line_number":716,"context_line":"        ephemeral_size \u003d block_device.get_bdm_ephemeral_disk_size("},{"line_number":717,"context_line":"                block_device_mapping)"},{"line_number":718,"context_line":"        if ephemeral_size:"},{"line_number":719,"context_line":"            base_options[\u0027ephemeral_gb\u0027] \u003d ephemeral_size"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        # NOTE (ndipanov): Assume root dev name is \u0027vda\u0027 if not supplied."},{"line_number":722,"context_line":"        #                  It\u0027s needed for legacy conversion to work."}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_433eb0da","line":719,"in_reply_to":"1ac06dbe_34b7a3d9","updated":"2016-08-23 14:36:37.000000000","message":"If so, what should I use instead?","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"}],"nova/objects/request_spec.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9a597a398c709d66b47f3c96db9123205f5baf73","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"},{"line_number":105,"context_line":"            ephemeral_size \u003d instance.ephemeral_gb"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            ephemeral_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_f9b203e4","line":104,"updated":"2016-08-10 20:14:05.000000000","message":"The reason the unit tests are all failing here is because the request spec object in the unit tests does not have its instance_uuid attribute set. You will need to modify the unit tests (in addition to adding an additional unit test for the new code here) to ensure that the RequestSpec object that is having its instance_uuid attribute read in the \"self.instance_uuid\" call above actually has something set in it.\n\nTake one of the failing unit tests as an example:\n\nnova.tests.unit.scheduler.filters.test_disk_filters.TestDiskFilter:test_exact_disk_filter_fails is failing with this exception:\n\n Traceback (most recent call last):\n  File \"/home/jenkins/workspace/gate-nova-python34-db/nova/tests/unit/scheduler/filters/test_exact_disk_filter.py\", line 38, in test_exact_disk_filter_fails\n    self.assertFalse(self.filt_cls.host_passes(host, spec_obj))\n  File \"/home/jenkins/workspace/gate-nova-python34-db/nova/scheduler/filters/exact_disk_filter.py\", line 29, in host_passes\n    spec_obj.ephemeral_gb) +\n  File \"/home/jenkins/workspace/gate-nova-python34-db/nova/objects/request_spec.py\", line 104, in ephemeral_gb\n    self.instance_uuid)\n  File \"/home/jenkins/workspace/gate-nova-python34-db/.tox/py34/lib/python3.4/site-packages/oslo_versionedobjects/base.py\", line 67, in getter\n    self.obj_load_attr(name)\n  File \"/home/jenkins/workspace/gate-nova-python34-db/nova/objects/request_spec.py\", line 81, in obj_load_attr\n    reason\u003d\u0027attribute %s not lazy-loadable\u0027 % attrname)\nnova.exception.ObjectActionError: Object action obj_load_attr failed because: attribute instance_uuid not lazy-loadable\n\nThat is essentially saying that the uuid attribute of the request_spec object involved in line 38 of test_exact_disk_filter.py doesn\u0027t have a instance_uuid attribute. Let\u0027s check out that test case:\n\n    def test_exact_disk_filter_fails(self):\n        spec_obj \u003d objects.RequestSpec(\n            flavor\u003dobjects.Flavor(root_gb\u003d1, ephemeral_gb\u003d1, swap\u003d1024))\n        host \u003d self._get_host({\u0027free_disk_mb\u0027: 2 * 1024})\n        self.assertFalse(self.filt_cls.host_passes(host, spec_obj))\n        self.assertNotIn(\u0027disk_gb\u0027, host.limits)\n\nThe test above will get to this line in your patch:\n\n if self.flavor.ephemeral_gb:\n\nand continue to the next line which attempts this:\n\n instance \u003d obj_instance.Instance.get_by_uuid(self._context,\n                                              self.instance_uuid)\n\nThat will cause the RequestSpec.instance_uuid attribute to have its value looked up. However, there hasn\u0027t been any instance_uuid value set on the RequestSpec object create for the unit test.\n\nSo, you will need to change the unit test to do this:\n\n    from nova.tests.utils import uuidsentinel as uuids\n    ...\n    def test_exact_disk_filter_fails(self):\n        spec_obj \u003d objects.RequestSpec(\n            instance_uuid\u003duuids.instance,\n            flavor\u003dobjects.Flavor(root_gb\u003d1, ephemeral_gb\u003d1, swap\u003d1024))\n        host \u003d self._get_host({\u0027free_disk_mb\u0027: 2 * 1024})\n        self.assertFalse(self.filt_cls.host_passes(host, spec_obj))\n        self.assertNotIn(\u0027disk_gb\u0027, host.limits)\n\nThat will get you past the issue with the lazy-load-attr failure. You will then run into your next problem which is that the unit tests don\u0027t use the database, but objects.Instance.get_by_uuid() requires a database call, so you will need to mock out Instance.get_by_uuid() to return an Instance object with its ephemeral_gb attribute set, like so:\n\n    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,\n                return_value\u003dobjects.Instance(ephemeral_gb\u003d1024))\n    def test_exact_disk_filter_fails(self):\n        spec_obj \u003d objects.RequestSpec(\n            instance_uuid\u003duuids.instance,\n            flavor\u003dobjects.Flavor(root_gb\u003d1, ephemeral_gb\u003d1, swap\u003d1024))\n        host \u003d self._get_host({\u0027free_disk_mb\u0027: 2 * 1024})\n        self.assertFalse(self.filt_cls.host_passes(host, spec_obj))\n        self.assertNotIn(\u0027disk_gb\u0027, host.limits)\n\nAnd that should get you passing those failed unit tests. I will leave the creation of the additional unit tests for the changes you made to the compute API and ReqestSpec object up to an exercise for you to tackle :)\n\nCome find us on IRC #openstack-nova if you run into further problems!","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"eea700f33b59b51b125908f2c913d818fde0290f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"},{"line_number":105,"context_line":"            ephemeral_size \u003d instance.ephemeral_gb"},{"line_number":106,"context_line":"        else:"},{"line_number":107,"context_line":"            ephemeral_size \u003d 0"}],"source_content_type":"text/x-python","patch_set":1,"id":"9ad45d7e_692b7c95","line":104,"in_reply_to":"9ad45d7e_f9b203e4","updated":"2016-08-12 11:55:15.000000000","message":"Thank you for the great lesson, Jay! I\u0027ve passed thru the tests and added one more.","commit_id":"c528020ec0deed5aca23eca46a69fb32c29c4729"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2f0aebecee10ff14bd6786f9480303e7f392d1fb","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return self.flavor.root_gb"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_7c717377","line":101,"updated":"2016-08-12 13:30:25.000000000","message":"I haven\u0027t checked this on an environment yet, but it looks like this method will be called *for each* node in the filter scheduler:\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/filters/disk_filter.py#L37\n\nwhich effectively means N DB requests \u003d\u003d horrible for performance for any reasonable deployment.\n\nI suggest we cache the return value to only calculate it once.","commit_id":"d8081979f8e7edb5281a9539e52f087b61c890b9"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"3e841e7ea7ce081b7a8747487825e153f3a27561","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return self.flavor.root_gb"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9ad45d7e_a8ac458d","line":101,"in_reply_to":"9ad45d7e_7c717377","updated":"2016-08-12 14:31:50.000000000","message":"Checked on my devstack:\n\n-\u003e res \u003d self.dispatcher.dispatch(message)\n  /usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py(150)dispatch()\n-\u003e return self._do_dispatch(endpoint, method, ctxt, args)\n  /usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/dispatcher.py(121)_do_dispatch()\n-\u003e result \u003d func(ctxt, **new_args)\n  /usr/local/lib/python2.7/dist-packages/oslo_messaging/rpc/server.py(199)inner()\n-\u003e return func(*args, **kwargs)\n  /opt/stack/nova/nova/scheduler/manager.py(104)select_destinations()\n-\u003e dests \u003d self.driver.select_destinations(ctxt, spec_obj)\n  /opt/stack/nova/nova/scheduler/filter_scheduler.py(53)select_destinations()\n-\u003e selected_hosts \u003d self._schedule(context, spec_obj)\n  /opt/stack/nova/nova/scheduler/filter_scheduler.py(113)_schedule()\n-\u003e spec_obj, index\u003dnum)\n  /opt/stack/nova/nova/scheduler/host_manager.py(557)get_filtered_hosts()\n-\u003e hosts, spec_obj, index)\n  /opt/stack/nova/nova/filters.py(89)get_filtered_objects()\n-\u003e list_objs \u003d list(objs)\n  /opt/stack/nova/nova/filters.py(44)filter_all()\n-\u003e if self._filter_one(obj, spec_obj):\n  /opt/stack/nova/nova/scheduler/filters/__init__.py(26)_filter_one()\n-\u003e return self.host_passes(obj, filter_properties)\n  /opt/stack/nova/nova/scheduler/filters/disk_filter.py(37)host_passes()\n-\u003e spec_obj.ephemeral_gb) +\n\u003e /opt/stack/nova/nova/objects/request_spec.py(103)ephemeral_gb()\n-\u003e return self.flavor.ephemeral_gb\n\nand\n\n(Pdb) l 39\n 34             return True\n 35\n 36         def filter_all(self, filter_obj_list, spec_obj):\n 37             \"\"\"Yield objects that pass the filter.\n 38\n 39             Can be overridden in a subclass, if you need to base filtering\n 40             decisions on all objects.  Otherwise, one can just override\n 41             _filter_one() to filter a single object.\n 42             \"\"\"\n 43             for obj in filter_obj_list:\n 44  -\u003e             if self._filter_one(obj, spec_obj):\n(Pdb) a   \nself \u003d \u003cnova.scheduler.filters.disk_filter.DiskFilter object at 0x7fd281509550\u003e\nfilter_obj_list \u003d [(rpodolyaka-devstack, rpodolyaka-devstack) ram: 6959MB disk: 71680MB io_ops: 0 instances: 1]\nspec_obj \u003d RequestSpec(availability_zone\u003dNone,flavor\u003dFlavor(13),force_hosts\u003dNone,force_nodes\u003dNone,id\u003d\u003c?\u003e,ignore_hosts\u003dNone,image\u003dImageMeta(583c0d17-cac7-4b19-89d1-d37ae8bfe7d3),instance_group\u003dNone,instance_uuid\u003d07b89b34-d731-4d10-a9b2-ab36c3bab4e4,limits\u003dSchedulerLimits,num_instances\u003d1,numa_topology\u003dNone,pci_requests\u003dInstancePCIRequests,project_id\u003d\u002747e74c53bd634298a95faa1005f9c98a\u0027,requested_destination\u003dNone,retry\u003dSchedulerRetries,scheduler_hints\u003d{})\n\n\nso we surely need to fix this.","commit_id":"d8081979f8e7edb5281a9539e52f087b61c890b9"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"42c73c47297560000db60d875ba97f7932eb750c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return self.flavor.root_gb"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_642b7183","line":101,"in_reply_to":"9ad45d7e_7c717377","updated":"2016-08-15 19:10:50.000000000","message":"Yes, it\u0027s surely a huge performance issue.","commit_id":"d8081979f8e7edb5281a9539e52f087b61c890b9"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"42c73c47297560000db60d875ba97f7932eb750c","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        return self.flavor.root_gb"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            instance \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":104,"context_line":"                                                         self.instance_uuid)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ac371cc_81181f86","line":101,"in_reply_to":"9ad45d7e_a8ac458d","updated":"2016-08-15 19:10:50.000000000","message":"Done","commit_id":"d8081979f8e7edb5281a9539e52f087b61c890b9"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d40d566d743d0299fbff35e1bd11b5fea12cd70b","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if self.flavor.ephemeral_gb:"},{"line_number":103,"context_line":"            if hasattr(self, \u0027ephemeral\u0027):"},{"line_number":104,"context_line":"                ephemeral_size \u003d self.ephemeral"},{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                inst \u003d obj_instance.Instance.get_by_uuid(self._context,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_a4172950","line":103,"range":{"start_line":103,"start_character":30,"end_line":103,"end_character":39},"updated":"2016-08-15 19:37:00.000000000","message":"nit: I suggest to prefix the name with _ to make it clear that it\u0027s not supposed to be used directly","commit_id":"85057abcd352a5d54a8580f63bb46217e28cf0ec"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8f7b76f9af0ce2421bf5ab16474df86c5d09b093","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                inst \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":107,"context_line":"                                                         self.instance_uuid)"},{"line_number":108,"context_line":"                ephemeral_size \u003d self._ephemeral \u003d inst.ephemeral_gb"},{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            ephemeral_size \u003d 0"},{"line_number":111,"context_line":"        return ephemeral_size"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_6cf79af5","line":108,"updated":"2016-08-16 20:18:36.000000000","message":"I personally find this from of assignment confusing, but it works...","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":22785,"name":"Tanvir Talukder","email":"tanvirt16@gmail.com","username":"tanvirt16"},"change_message_id":"bdcd2c65bf5b1e6cf4d8bb2367d44a5705dfdb77","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                inst \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":107,"context_line":"                                                         self.instance_uuid)"},{"line_number":108,"context_line":"                ephemeral_size \u003d self._ephemeral \u003d inst.ephemeral_gb"},{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            ephemeral_size \u003d 0"},{"line_number":111,"context_line":"        return ephemeral_size"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_ec4a6aab","line":108,"in_reply_to":"3ac371cc_6cf79af5","updated":"2016-08-16 20:31:35.000000000","message":"I agree... Scope-wise its odd because the variable is created and assigned inside the \"if/else\" block but referenced outside of the block. You could declare ephemeral_size before the block like so:\n\nephemeral_size \u003d 0\n# your \"if\" block here\nreturn ephemeral_size\n\nYou could also reduce it a bit like so:\n\nif hasattr(self, \u0027_ephemeral\u0027)\n    return self._ephemeral\nelif self.flavor.ephemeral_gb\n    inst \u003d obj_instance.Instance.get_by_uuid(self._context, \n                                         self.instance_uuid)\n    self._ephemeral \u003d inst.ephemeral_gb\n    return self._ephemeral\nreturn 0\n\nWhatever reads better.","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"0ebab1ebc8e6f131ce95c49aa75c597247f0a547","unresolved":false,"context_lines":[{"line_number":105,"context_line":"            else:"},{"line_number":106,"context_line":"                inst \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":107,"context_line":"                                                         self.instance_uuid)"},{"line_number":108,"context_line":"                ephemeral_size \u003d self._ephemeral \u003d inst.ephemeral_gb"},{"line_number":109,"context_line":"        else:"},{"line_number":110,"context_line":"            ephemeral_size \u003d 0"},{"line_number":111,"context_line":"        return ephemeral_size"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_c7046719","line":108,"in_reply_to":"3ac371cc_ec4a6aab","updated":"2016-08-17 20:28:55.000000000","message":"Thank you for code refactoring, Tanvir! It\u0027s really much more readable.","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4e0cc4abdf0b3673c38d6f314ffc9f701b53dd6f","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    @property"},{"line_number":101,"context_line":"    def ephemeral_gb(self):"},{"line_number":102,"context_line":"        if hasattr(self, \u0027_ephemeral\u0027):"},{"line_number":103,"context_line":"            return self._ephemeral"},{"line_number":104,"context_line":"        elif self.flavor.ephemeral_gb:"},{"line_number":105,"context_line":"            inst \u003d obj_instance.Instance.get_by_uuid(self._context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_55d92156","line":102,"updated":"2016-08-18 10:30:44.000000000","message":"nit: we could leave a note here on why memoization is needed","commit_id":"20ece825b30f0ce062f0ff3f7eb34bf39e0a614a"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"80d54379397522ddee4876a1f97a32d87bc5dcf9","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        elif self.flavor.ephemeral_gb:"},{"line_number":108,"context_line":"            inst \u003d obj_instance.Instance.get_by_uuid(self._context,"},{"line_number":109,"context_line":"                                                     self.instance_uuid)"},{"line_number":110,"context_line":"            self._ephemeral \u003d inst.ephemeral_gb"},{"line_number":111,"context_line":"            return self._ephemeral"},{"line_number":112,"context_line":"        return 0"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1ac06dbe_7410fb01","line":110,"updated":"2016-08-22 17:23:27.000000000","message":"This property of the instance is deprecated.","commit_id":"8d35c639c96c34c00c44f9236684dcf36455f7d5"}],"nova/tests/unit/scheduler/filters/test_disk_filters.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d40d566d743d0299fbff35e1bd11b5fea12cd70b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    def setUp(self):"},{"line_number":25,"context_line":"        super(TestDiskFilter, self).setUp()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,"},{"line_number":28,"context_line":"                return_value\u003dobjects.Instance(ephemeral_gb\u003d1))"},{"line_number":29,"context_line":"    def test_disk_filter_passes(self, instance_mock):"},{"line_number":30,"context_line":"        filt_cls \u003d disk_filter.DiskFilter()"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_77d04154","line":27,"updated":"2016-08-15 19:37:00.000000000","message":"nit: as you are using this mock in every single test case you could apply it to the class instead to avoid repetition (see http://www.voidspace.org.uk/python/mock/patch.html#mock.patch)","commit_id":"85057abcd352a5d54a8580f63bb46217e28cf0ec"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8f7b76f9af0ce2421bf5ab16474df86c5d09b093","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"@mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,"},{"line_number":23,"context_line":"            return_value\u003dobjects.Instance)"},{"line_number":24,"context_line":"class TestDiskFilter(test.NoDBTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_8c593601","line":23,"updated":"2016-08-16 20:18:36.000000000","message":"get_by_uuid() is supposed to return an instance of objects.Instance, not the class object itself. So you need:\n\n  return_value\u003dobjects.Instance()\n\nhere","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"0ebab1ebc8e6f131ce95c49aa75c597247f0a547","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"@mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,"},{"line_number":23,"context_line":"            return_value\u003dobjects.Instance)"},{"line_number":24,"context_line":"class TestDiskFilter(test.NoDBTestCase):"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_87154f41","line":23,"in_reply_to":"3ac371cc_8c593601","updated":"2016-08-17 20:28:55.000000000","message":"Thanks! Here it\u0027s completely my fault.","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8f7b76f9af0ce2421bf5ab16474df86c5d09b093","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        super(TestDiskFilter, self).setUp()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def test_disk_filter_passes(self, instance_mock):"},{"line_number":30,"context_line":"        objects.Instance.ephemeral_gb\u003d1"},{"line_number":31,"context_line":"        filt_cls \u003d disk_filter.DiskFilter()"},{"line_number":32,"context_line":"        spec_obj \u003d objects.RequestSpec("},{"line_number":33,"context_line":"            instance_uuid\u003duuids.instance,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_6c131a0e","line":30,"updated":"2016-08-16 20:18:36.000000000","message":"ditto. this must be an instance attribute, not the class attribute:\n\n   instance_mock.ephemeral_gb \u003d 1\n\nand all the cases below...","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":21382,"name":"Danil","email":"dakhmetov@mirantis.com","username":"dinobot"},"change_message_id":"0ebab1ebc8e6f131ce95c49aa75c597247f0a547","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        super(TestDiskFilter, self).setUp()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def test_disk_filter_passes(self, instance_mock):"},{"line_number":30,"context_line":"        objects.Instance.ephemeral_gb\u003d1"},{"line_number":31,"context_line":"        filt_cls \u003d disk_filter.DiskFilter()"},{"line_number":32,"context_line":"        spec_obj \u003d objects.RequestSpec("},{"line_number":33,"context_line":"            instance_uuid\u003duuids.instance,"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_2acd42b7","line":30,"in_reply_to":"3ac371cc_6c131a0e","updated":"2016-08-17 20:28:55.000000000","message":"By the way, this assignment broke other tests also :)","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4e0cc4abdf0b3673c38d6f314ffc9f701b53dd6f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"from nova import objects"},{"line_number":16,"context_line":"from nova.scheduler.filters import disk_filter"},{"line_number":17,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_d5db517a","side":"PARENT","line":14,"updated":"2016-08-18 10:30:44.000000000","message":"femtonit: you should not have removed this empty line - it\u0027s there to separate two group of imports: 3rd party libs and imports from within the project itself","commit_id":"99675413aac0934de22103c425eeb8e5019908ac"}],"nova/tests/unit/scheduler/filters/test_exact_disk_filter.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d40d566d743d0299fbff35e1bd11b5fea12cd70b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        super(TestExactDiskFilter, self).setUp()"},{"line_number":25,"context_line":"        self.filt_cls \u003d exact_disk_filter.ExactDiskFilter()"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    @mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,"},{"line_number":28,"context_line":"                return_value\u003dobjects.Instance(ephemeral_gb\u003d1))"},{"line_number":29,"context_line":"    def test_exact_disk_filter_passes(self, instance_mock):"},{"line_number":30,"context_line":"        spec_obj \u003d objects.RequestSpec("}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_7737a1b0","line":27,"updated":"2016-08-15 19:37:00.000000000","message":"nit: only two test cases here, but you could do the very same thing with mock.patch() on the class","commit_id":"85057abcd352a5d54a8580f63bb46217e28cf0ec"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8f7b76f9af0ce2421bf5ab16474df86c5d09b093","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from nova.tests import uuidsentinel as uuids"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@mock.patch(\u0027nova.objects.Instance.get_by_uuid\u0027,"},{"line_number":21,"context_line":"            return_value\u003dobjects.Instance(ephemeral_gb\u003d1))"},{"line_number":22,"context_line":"class TestExactDiskFilter(test.NoDBTestCase):"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_ace35204","line":21,"updated":"2016-08-16 20:18:36.000000000","message":"This one is correct ;)","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4e0cc4abdf0b3673c38d6f314ffc9f701b53dd6f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import mock"},{"line_number":14,"context_line":"from nova import objects"},{"line_number":15,"context_line":"from nova.scheduler.filters import exact_disk_filter"},{"line_number":16,"context_line":"from nova import test"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_a0de4eda","line":13,"updated":"2016-08-18 10:30:44.000000000","message":"femptonit: please put an empty line here to separate groups of imports","commit_id":"20ece825b30f0ce062f0ff3f7eb34bf39e0a614a"}],"nova/tests/unit/scheduler/test_caching_scheduler.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"d40d566d743d0299fbff35e1bd11b5fea12cd70b","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":"from oslo_utils import timeutils"},{"line_number":18,"context_line":"from six.moves import range"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_f74b9129","side":"PARENT","line":15,"updated":"2016-08-15 19:37:00.000000000","message":"nit: unrelated change","commit_id":"99675413aac0934de22103c425eeb8e5019908ac"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"8f7b76f9af0ce2421bf5ab16474df86c5d09b093","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":13,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":14,"context_line":"#    under the License."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import mock"},{"line_number":17,"context_line":"from oslo_utils import timeutils"},{"line_number":18,"context_line":"from six.moves import range"}],"source_content_type":"text/x-python","patch_set":5,"id":"3ac371cc_0cf386d7","line":15,"updated":"2016-08-16 20:18:36.000000000","message":"nit: unrelated change","commit_id":"317d45bc5ea929a3fd6147b26c41624261cb856a"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"4e0cc4abdf0b3673c38d6f314ffc9f701b53dd6f","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from oslo_utils import timeutils"},{"line_number":17,"context_line":"from six.moves import range"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"import mock"},{"line_number":20,"context_line":"from nova import exception"},{"line_number":21,"context_line":"from nova import objects"},{"line_number":22,"context_line":"from nova.scheduler import caching_scheduler"}],"source_content_type":"text/x-python","patch_set":6,"id":"3ac371cc_80007235","line":19,"updated":"2016-08-18 10:30:44.000000000","message":"nit: this shouldn\u0027t be moved","commit_id":"20ece825b30f0ce062f0ff3f7eb34bf39e0a614a"}]}
