)]}'
{"nova/objects/base.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"191baf377cdf8d246194af7c29257efcae8a5816","unresolved":false,"context_lines":[{"line_number":785,"context_line":"        else:"},{"line_number":786,"context_line":"            # NOTE(danms): A set can\u0027t have an unhashable value inside, such as"},{"line_number":787,"context_line":"            # a dict. Convert sets to tuples, which is fine, since we can\u0027t"},{"line_number":788,"context_line":"            # send them over RPC anyway."},{"line_number":789,"context_line":"            # NOTE(gibi) Covert the set to list instead as the rpc will do it"},{"line_number":790,"context_line":"            # anyway and this way there will be no semantic change between"},{"line_number":791,"context_line":"            # the fake rpc driver used in functional test and a normal rpc"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_e109fe2b","line":788,"updated":"2015-01-15 16:09:01.000000000","message":"need remove this comment","commit_id":"de96a07ab4d376669cea27ec250adbff814d5c33"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"6c4edabe2ffde04f43065d817e6c2fbdac01d048","unresolved":false,"context_lines":[{"line_number":785,"context_line":"        else:"},{"line_number":786,"context_line":"            # NOTE(danms): A set can\u0027t have an unhashable value inside, such as"},{"line_number":787,"context_line":"            # a dict. Convert sets to tuples, which is fine, since we can\u0027t"},{"line_number":788,"context_line":"            # send them over RPC anyway."},{"line_number":789,"context_line":"            # NOTE(gibi) Covert the set to list instead as the rpc will do it"},{"line_number":790,"context_line":"            # anyway and this way there will be no semantic change between"},{"line_number":791,"context_line":"            # the fake rpc driver used in functional test and a normal rpc"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_cc219950","line":788,"in_reply_to":"3a961159_e109fe2b","updated":"2015-01-16 14:48:57.000000000","message":"Good point. Second part of the NOTE is not valid any more. I will merge the two NOTEs together in the next patch set","commit_id":"de96a07ab4d376669cea27ec250adbff814d5c33"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7ff7bb406e369f6cfbda0f876fdaeab06ab5479f","unresolved":false,"context_lines":[{"line_number":789,"context_line":"            # way there will be no semantic change between the fake rpc driver"},{"line_number":790,"context_line":"            # used in functional test and a normal rpc driver."},{"line_number":791,"context_line":"            if iterable \u003d\u003d set:"},{"line_number":792,"context_line":"                iterable \u003d list"},{"line_number":793,"context_line":"            return iterable([action_fn(context, value) for value in values])"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def serialize_entity(self, context, entity):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_44406b56","line":792,"updated":"2015-01-23 11:18:22.000000000","message":"IMHO, this change is very important so it needs to be discussed properly, so could you please split it in a separate patch ?\n\nAlso, I haven\u0027t seen where you amend the unittest. If that\u0027s not covered now, please add the coverage","commit_id":"067bd2f06f8dcbd023f59b6d195fab11d88ca481"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"2488479a6b77febcac9e39af76978fd54b71a3aa","unresolved":false,"context_lines":[{"line_number":789,"context_line":"            # way there will be no semantic change between the fake rpc driver"},{"line_number":790,"context_line":"            # used in functional test and a normal rpc driver."},{"line_number":791,"context_line":"            if iterable \u003d\u003d set:"},{"line_number":792,"context_line":"                iterable \u003d list"},{"line_number":793,"context_line":"            return iterable([action_fn(context, value) for value in values])"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"    def serialize_entity(self, context, entity):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a930d6b_18f652f9","line":792,"in_reply_to":"1a930d6b_44406b56","updated":"2015-01-27 14:01:35.000000000","message":"Fair point. I split this commit into two. Please discuss the Serialization change in the previous commit in this commit change. \n\nI also added unit test coverage for the change in that commit.","commit_id":"067bd2f06f8dcbd023f59b6d195fab11d88ca481"}],"nova/tests/functional/api/client.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"65422a100c13159a312dd19835f12e89fedf40d3","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        return self.api_delete(\u0027/servers/%s/os-volume_attachments/%s\u0027 %"},{"line_number":272,"context_line":"                            (server_id, attachment_id))"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def get_server_groups(self):"},{"line_number":275,"context_line":"        return self.api_get(\u0027/os-server-groups\u0027)[\u0027server_groups\u0027]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def get_server_group(self, group_id):"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_d79c03c3","line":274,"updated":"2015-03-05 21:51:24.000000000","message":"I don\u0027t think these should be added as convenience methods. Instead make the API calls using the get and post directly in the test.","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a48d0a716b015fe86cfc0027bd868df0a8f71721","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        return self.api_delete(\u0027/servers/%s/os-volume_attachments/%s\u0027 %"},{"line_number":272,"context_line":"                            (server_id, attachment_id))"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def get_server_groups(self):"},{"line_number":275,"context_line":"        return self.api_get(\u0027/os-server-groups\u0027)[\u0027server_groups\u0027]"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def get_server_group(self, group_id):"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_536fd52a","line":274,"in_reply_to":"9a80dd14_d79c03c3","updated":"2015-03-15 20:08:12.000000000","message":"This still has the advantage of having to change only these functions in case of any change in the API calls, like now the status code is returned too, therefore this code has to be modified to use only the body of the response.","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"}],"nova/tests/functional/integrated_helpers.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0d5a6c9936efa2eaf7e6e13fe8e36e50a0615415","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":74,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        f \u003d self._get_flags()"},{"line_number":77,"context_line":"        self.flags(**f)"},{"line_number":78,"context_line":"        self.flags(verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_0cd0b752","line":75,"updated":"2015-01-30 20:10:27.000000000","message":"Why does this need to move?","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"848acd244a2e961b12b042bb4b4b86c9c434d0bc","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":74,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        f \u003d self._get_flags()"},{"line_number":77,"context_line":"        self.flags(**f)"},{"line_number":78,"context_line":"        self.flags(verbose\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_0cba77e1","line":75,"in_reply_to":"da86d52c_0cd0b752","updated":"2015-01-30 20:26:12.000000000","message":"Otherwise it cannot be overwritten, which is needed to set the appropriate driver in the Affinity tests as you can see in the new test file, where _get_flags() is used, for instance in line 65.","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7bae7b9258a8233541a10a1660718d838cd98e65","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def setUp(self):"},{"line_number":71,"context_line":"        super(_IntegratedTestBase, self).setUp()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":74,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        f \u003d self._get_flags()"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_a4cbf71c","line":73,"updated":"2015-02-02 23:45:21.000000000","message":"why did this need to move?","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d6b3a8511b68337ea61f8848dfbffa971a0346c7","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def setUp(self):"},{"line_number":71,"context_line":"        super(_IntegratedTestBase, self).setUp()"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":74,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        f \u003d self._get_flags()"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_c8f9d4c9","line":73,"in_reply_to":"da86d52c_a4cbf71c","updated":"2015-02-03 06:34:01.000000000","message":"Otherwise it cannot be overwritten, which is needed for the tests in the test_server_group file. The scheduler_driver option is set in the get_flags function.","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7bae7b9258a8233541a10a1660718d838cd98e65","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":173,"context_line":"            if server[\u0027status\u0027] !\u003d from_status:"},{"line_number":174,"context_line":"                break"},{"line_number":175,"context_line":"            time.sleep(.1)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        return server"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_248547ad","line":175,"updated":"2015-02-02 23:45:21.000000000","message":"we should not be doing sleeps in tests.\nwhat if the state does not change?\nwhy can we not mock this?","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d6b3a8511b68337ea61f8848dfbffa971a0346c7","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":173,"context_line":"            if server[\u0027status\u0027] !\u003d from_status:"},{"line_number":174,"context_line":"                break"},{"line_number":175,"context_line":"            time.sleep(.1)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        return server"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_a8e10000","line":175,"in_reply_to":"da86d52c_248547ad","updated":"2015-02-03 06:34:01.000000000","message":"As this is the functional test suite, state changes cannot be mocked, as that way the functions cannot be tested. The same function is used in test_server.py too. If the tested function gets to the timeout phase, then that function needs to be checked or the test env to see what is the problem behind.\n\nThis function will be removed from here, as another format of it is used in test_server_group.py.","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"f800ad05b913b89199dceb36b2ae44a62dba82ee","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        super(_IntegratedTestBase, self).setUp()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":73,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        f \u003d self._get_flags()"},{"line_number":76,"context_line":"        self.flags(**f)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_1f4a4d83","line":73,"updated":"2015-02-09 23:39:41.000000000","message":"Why did this line need to move? If order is genuinely important here, then perhaps we need a comment explaining why?","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a3f0a416947e5be1a6b2a0eeca27e0a5a2492475","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        super(_IntegratedTestBase, self).setUp()"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":73,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        f \u003d self._get_flags()"},{"line_number":76,"context_line":"        self.flags(**f)"}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_01001e00","line":73,"in_reply_to":"da86d52c_1f4a4d83","updated":"2015-02-10 10:03:40.000000000","message":"It was needed in order to being able to set the scheduler_driver to FilterScheduler in test_server_group.py. I added a note about this.","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"65422a100c13159a312dd19835f12e89fedf40d3","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       fake_crypto.fetch_ca)"},{"line_number":82,"context_line":"        self.stubs.Set(crypto, \u0027generate_x509_cert\u0027,"},{"line_number":83,"context_line":"                       fake_crypto.generate_x509_cert)"},{"line_number":84,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":85,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":86,"context_line":"        self._setup_services()"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_57de536e","side":"PARENT","line":84,"updated":"2015-03-05 21:51:24.000000000","message":"I actually wonder if we can just fully delete this.","commit_id":"10a7974b3a13c97a316c89aa80d60fbaf06b4c76"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a48d0a716b015fe86cfc0027bd868df0a8f71721","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                       fake_crypto.fetch_ca)"},{"line_number":82,"context_line":"        self.stubs.Set(crypto, \u0027generate_x509_cert\u0027,"},{"line_number":83,"context_line":"                       fake_crypto.generate_x509_cert)"},{"line_number":84,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":85,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":86,"context_line":"        self._setup_services()"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_f3652945","side":"PARENT","line":84,"in_reply_to":"9a80dd14_57de536e","updated":"2015-03-15 20:08:12.000000000","message":"Done in the latest. I haven\u0027t seen any test failing because of removing this line locally so far, but I still have some work to do in order to make the test gods happy.","commit_id":"10a7974b3a13c97a316c89aa80d60fbaf06b4c76"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"87f9377dd4ae80c241cececf220b0dd0e05df05b","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":105,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":106,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":107,"context_line":"        return self.start_service(\u0027scheduler\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _setup_services(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_17b29494","side":"PARENT","line":106,"updated":"2015-07-08 12:02:05.000000000","message":"changing integrated_helpers is usually a sign that this is too coupled to this very bloated base class. Lets not do that.","commit_id":"78f2a98b50d2162ada8d012b1499bb3de613ed2d"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"45915d98ff087066dd0931e37c04d444a0d24ba9","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":105,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":106,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":107,"context_line":"        return self.start_service(\u0027scheduler\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _setup_services(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_9f7bb77b","side":"PARENT","line":106,"in_reply_to":"9a41bdd9_403e71b9","updated":"2015-07-18 20:25:22.000000000","message":"Done","commit_id":"78f2a98b50d2162ada8d012b1499bb3de613ed2d"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"4ce333a88daa6b46b20122937b52851b6acc3688","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":105,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":106,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":107,"context_line":"        return self.start_service(\u0027scheduler\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _setup_services(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_1e711a0c","side":"PARENT","line":106,"in_reply_to":"ba3cc151_17b29494","updated":"2015-07-09 07:40:17.000000000","message":"I don\u0027t really see, why ChanceScheduler isloaded here by  default, no tests are failing by removing these lines. It was removed after patch set 29, as you suggested.","commit_id":"78f2a98b50d2162ada8d012b1499bb3de613ed2d"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8abd5f26921967e20ebdb9492d898a2997abf176","unresolved":false,"context_lines":[{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    def _setup_scheduler_service(self):"},{"line_number":105,"context_line":"        self.flags(scheduler_driver\u003d\u0027nova.scheduler.\u0027"},{"line_number":106,"context_line":"                    \u0027chance.ChanceScheduler\u0027)"},{"line_number":107,"context_line":"        return self.start_service(\u0027scheduler\u0027)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _setup_services(self):"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a41bdd9_403e71b9","side":"PARENT","line":106,"in_reply_to":"ba3cc151_1e711a0c","updated":"2015-07-17 14:51:21.000000000","message":"Agreed, I think it should be left here","commit_id":"78f2a98b50d2162ada8d012b1499bb3de613ed2d"}],"nova/tests/functional/test_server_group.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0d5a6c9936efa2eaf7e6e13fe8e36e50a0615415","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        post \u003d {\u0027migrate\u0027: {}}"},{"line_number":248,"context_line":"        self.api.post_server_action(servers[1][\u0027id\u0027], post)"},{"line_number":249,"context_line":"        migrated_server \u003d self._wait_for_state_change(servers[1], \u0027BUILD\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self.assertEqual(\u0027VERIFY_RESIZE\u0027, migrated_server[\u0027status\u0027])"},{"line_number":252,"context_line":"        self.assertNotEqual(servers[0][\u0027OS-EXT-SRV-ATTR:host\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_acf5ebcc","line":249,"updated":"2015-01-30 20:10:27.000000000","message":"Isn\u0027t this going to race with things going through RESIZING state between BUILD and VERIFY_RESIZE?","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"53982b7203eab52800d99a38fd5637d712b5dfc2","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        post \u003d {\u0027migrate\u0027: {}}"},{"line_number":248,"context_line":"        self.api.post_server_action(servers[1][\u0027id\u0027], post)"},{"line_number":249,"context_line":"        migrated_server \u003d self._wait_for_state_change(servers[1], \u0027BUILD\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self.assertEqual(\u0027VERIFY_RESIZE\u0027, migrated_server[\u0027status\u0027])"},{"line_number":252,"context_line":"        self.assertNotEqual(servers[0][\u0027OS-EXT-SRV-ATTR:host\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_c4cb8ba3","line":249,"in_reply_to":"da86d52c_286ff1c6","updated":"2015-02-02 23:26:54.000000000","message":"Thanks for the clarification. I changed the state change check according the discussion on IRC to check the desired state instead of waiting for one state change.","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"ec311fcbae2be4603e79159f776821549ff08178","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        post \u003d {\u0027migrate\u0027: {}}"},{"line_number":248,"context_line":"        self.api.post_server_action(servers[1][\u0027id\u0027], post)"},{"line_number":249,"context_line":"        migrated_server \u003d self._wait_for_state_change(servers[1], \u0027BUILD\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self.assertEqual(\u0027VERIFY_RESIZE\u0027, migrated_server[\u0027status\u0027])"},{"line_number":252,"context_line":"        self.assertNotEqual(servers[0][\u0027OS-EXT-SRV-ATTR:host\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_286ff1c6","line":249,"in_reply_to":"da86d52c_acf40b88","updated":"2015-02-02 15:35:20.000000000","message":"The states will go BUILD-\u003eACTIVE-\u003eRESIZING-\u003eVERIFY_RESIZED, right? Won\u0027t this _wait_for_state_change() return when we\u0027re in ACTIVE and then let this test race with the rest of the migration to reach like 251 when we\u0027re expecting it to be in VERIFY_RESIZED? Meaning, shouldn\u0027t we wait for it to exit RESIZED state to make sure it\u0027s in VERIFY_RESIZED when we check below?","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"848acd244a2e961b12b042bb4b4b86c9c434d0bc","unresolved":false,"context_lines":[{"line_number":246,"context_line":""},{"line_number":247,"context_line":"        post \u003d {\u0027migrate\u0027: {}}"},{"line_number":248,"context_line":"        self.api.post_server_action(servers[1][\u0027id\u0027], post)"},{"line_number":249,"context_line":"        migrated_server \u003d self._wait_for_state_change(servers[1], \u0027BUILD\u0027)"},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self.assertEqual(\u0027VERIFY_RESIZE\u0027, migrated_server[\u0027status\u0027])"},{"line_number":252,"context_line":"        self.assertNotEqual(servers[0][\u0027OS-EXT-SRV-ATTR:host\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"da86d52c_acf40b88","line":249,"in_reply_to":"da86d52c_acf5ebcc","updated":"2015-01-30 20:26:12.000000000","message":"This is a test with minimal configuration applied, we\u0027ve never had issues with it. Do you have an exact scenario in mind that could cause race condition here?","commit_id":"3909d94e4e0d170c2095bc94cbbecf2272a7e243"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7bae7b9258a8233541a10a1660718d838cd98e65","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        f[\u0027report_interval\u0027] \u003d self._report_interval"},{"line_number":70,"context_line":"        return f"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":73,"context_line":"        while True:"},{"line_number":74,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":75,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_84bd136b","line":72,"updated":"2015-02-02 23:45:21.000000000","message":"same as previous comment we should not be using sleeps in unit tests","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d6b3a8511b68337ea61f8848dfbffa971a0346c7","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        f[\u0027report_interval\u0027] \u003d self._report_interval"},{"line_number":70,"context_line":"        return f"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":73,"context_line":"        while True:"},{"line_number":74,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":75,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_c8955441","line":72,"in_reply_to":"da86d52c_84bd136b","updated":"2015-02-03 06:34:01.000000000","message":"Please note that this is the functional test suite as opposed to unit tests, therefore sleep should be accepted to be able to test the functionality.","commit_id":"302134a1b9aaad9de952d5f076ccf9f3061457af"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"58905714e065fafae96240d39d987f2012af98cb","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self._reset_globals()"},{"line_number":56,"context_line":"        super(ServerGroupTestBase, self).setUp()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def tearDown(self):"},{"line_number":59,"context_line":"        super(ServerGroupTestBase, self).tearDown()"},{"line_number":60,"context_line":"        CONF.reset()"},{"line_number":61,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_212b6b95","line":58,"updated":"2015-02-03 08:51:04.000000000","message":"Please use `self.addCleanup` instead `tearDown`.","commit_id":"ae1c20c69f5293b38a1144680aed96f99fe6ed46"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"cec825457dc0813ab41b0386181afec839c1f2f5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self._reset_globals()"},{"line_number":56,"context_line":"        super(ServerGroupTestBase, self).setUp()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def tearDown(self):"},{"line_number":59,"context_line":"        super(ServerGroupTestBase, self).tearDown()"},{"line_number":60,"context_line":"        CONF.reset()"},{"line_number":61,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_b3596c5c","line":58,"in_reply_to":"da86d52c_212b6b95","updated":"2015-02-03 11:34:19.000000000","message":"Done","commit_id":"ae1c20c69f5293b38a1144680aed96f99fe6ed46"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"58905714e065fafae96240d39d987f2012af98cb","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":105,"context_line":"        fake_network.set_stub_network_methods(self.stubs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def tearDown(self):"},{"line_number":108,"context_line":"        super(ServerGroupTest, self).tearDown()"},{"line_number":109,"context_line":"        self.compute2.kill()"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_a1167b53","line":107,"updated":"2015-02-03 08:51:04.000000000","message":"ditto","commit_id":"ae1c20c69f5293b38a1144680aed96f99fe6ed46"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"cec825457dc0813ab41b0386181afec839c1f2f5","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        self.compute2 \u003d self.start_service(\u0027compute\u0027, host\u003d\u0027host2\u0027)"},{"line_number":105,"context_line":"        fake_network.set_stub_network_methods(self.stubs)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def tearDown(self):"},{"line_number":108,"context_line":"        super(ServerGroupTest, self).tearDown()"},{"line_number":109,"context_line":"        self.compute2.kill()"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"da86d52c_f332040f","line":107,"in_reply_to":"da86d52c_a1167b53","updated":"2015-02-03 11:34:19.000000000","message":"Done","commit_id":"ae1c20c69f5293b38a1144680aed96f99fe6ed46"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"03258e531cddd9329311d2a7b043c4af39b3cfcc","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo.config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Import extensions to pull in osapi_compute_extension CONF option used below."},{"line_number":20,"context_line":"import nova.scheduler.utils"},{"line_number":21,"context_line":"import nova.servicegroup"},{"line_number":22,"context_line":"from nova.tests.functional.api import client"},{"line_number":23,"context_line":"from nova.tests.functional import integrated_helpers"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_4c40ef07","line":20,"updated":"2015-02-06 17:16:52.000000000","message":"Why are you importing this instead of like this?\n\n from nova.scheduler import utils\n\nApparently the comment above has something to do with it, but I don\u0027t know why. Perhaps you need to use CONF.import_opt?","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"abc5768b9c79ad8ef0fc4cbe0e36407eb2249ca5","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from oslo.config import cfg"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Import extensions to pull in osapi_compute_extension CONF option used below."},{"line_number":20,"context_line":"import nova.scheduler.utils"},{"line_number":21,"context_line":"import nova.servicegroup"},{"line_number":22,"context_line":"from nova.tests.functional.api import client"},{"line_number":23,"context_line":"from nova.tests.functional import integrated_helpers"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_006785eb","line":20,"in_reply_to":"da86d52c_4c40ef07","updated":"2015-02-07 20:53:57.000000000","message":"It was needed because of overwriting the global variables, but with mocking them it\u0027s no longer required.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"03258e531cddd9329311d2a7b043c4af39b3cfcc","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Import extensions to pull in osapi_compute_extension CONF option used below."},{"line_number":20,"context_line":"import nova.scheduler.utils"},{"line_number":21,"context_line":"import nova.servicegroup"},{"line_number":22,"context_line":"from nova.tests.functional.api import client"},{"line_number":23,"context_line":"from nova.tests.functional import integrated_helpers"},{"line_number":24,"context_line":"from nova.tests.unit import fake_network"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_8c490735","line":21,"updated":"2015-02-06 17:16:52.000000000","message":"same.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"abc5768b9c79ad8ef0fc4cbe0e36407eb2249ca5","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"# Import extensions to pull in osapi_compute_extension CONF option used below."},{"line_number":20,"context_line":"import nova.scheduler.utils"},{"line_number":21,"context_line":"import nova.servicegroup"},{"line_number":22,"context_line":"from nova.tests.functional.api import client"},{"line_number":23,"context_line":"from nova.tests.functional import integrated_helpers"},{"line_number":24,"context_line":"from nova.tests.unit import fake_network"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_206489e4","line":21,"in_reply_to":"da86d52c_8c490735","updated":"2015-02-07 20:53:57.000000000","message":"It was also needed for overwriting a variable to reload some config options. This is also no longer needed.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"03258e531cddd9329311d2a7b043c4af39b3cfcc","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _reset_globals(self):"},{"line_number":48,"context_line":"        nova.scheduler.utils._SUPPORTS_AFFINITY \u003d None"},{"line_number":49,"context_line":"        nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY \u003d None"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_6c5cd3ee","line":49,"updated":"2015-02-06 17:16:52.000000000","message":"Why are you setting these on the scheduler utils module? Tests shouldn\u0027t modify the modules being tested. Use mocks if you need to override something, and something in this class if you need persistence.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"abc5768b9c79ad8ef0fc4cbe0e36407eb2249ca5","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _reset_globals(self):"},{"line_number":48,"context_line":"        nova.scheduler.utils._SUPPORTS_AFFINITY \u003d None"},{"line_number":49,"context_line":"        nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY \u003d None"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_40617dd2","line":49,"in_reply_to":"da86d52c_6c5cd3ee","updated":"2015-02-07 20:53:57.000000000","message":"Mocking is used now for the configuration error check tests.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"03258e531cddd9329311d2a7b043c4af39b3cfcc","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY \u003d None"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_ec67e3b5","line":52,"updated":"2015-02-06 17:16:52.000000000","message":"This should be a mock","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"abc5768b9c79ad8ef0fc4cbe0e36407eb2249ca5","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY \u003d None"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_605e8114","line":52,"in_reply_to":"da86d52c_ec67e3b5","updated":"2015-02-07 20:53:57.000000000","message":"Done","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"03258e531cddd9329311d2a7b043c4af39b3cfcc","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self._reset_globals()"},{"line_number":56,"context_line":"        super(ServerGroupTestBase, self).setUp()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self.addCleanup(CONF.reset)"},{"line_number":59,"context_line":"        self.addCleanup(self._reset_globals)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _get_flags(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_4cdc6f47","line":58,"updated":"2015-02-06 17:16:52.000000000","message":"Is this necessary? It should be part of our general ConfFixture on the tests.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"abc5768b9c79ad8ef0fc4cbe0e36407eb2249ca5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        self._reset_globals()"},{"line_number":56,"context_line":"        super(ServerGroupTestBase, self).setUp()"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        self.addCleanup(CONF.reset)"},{"line_number":59,"context_line":"        self.addCleanup(self._reset_globals)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _get_flags(self):"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_809a95c3","line":58,"in_reply_to":"da86d52c_4cdc6f47","updated":"2015-02-07 20:53:57.000000000","message":"I removed it and it didn\u0027t make any harm, so you are right, thanks for the heads up.","commit_id":"a62bd27be51eff94d77e09a691401dd4fc7fb944"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"f800ad05b913b89199dceb36b2ae44a62dba82ee","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"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":"import mock"},{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_9f247dc7","line":14,"range":{"start_line":14,"start_character":22,"end_line":14,"end_character":23},"updated":"2015-02-09 23:39:41.000000000","message":"nit: blank line between comment and first import please.","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a3f0a416947e5be1a6b2a0eeca27e0a5a2492475","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"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":"import mock"},{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_1064ee47","line":14,"in_reply_to":"da86d52c_9f247dc7","updated":"2015-02-10 10:03:40.000000000","message":"Done","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"f800ad05b913b89199dceb36b2ae44a62dba82ee","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":57,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"},{"line_number":58,"context_line":"                break"},{"line_number":59,"context_line":"            time.sleep(.1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        return server"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_222616bb","line":59,"updated":"2015-02-09 23:39:41.000000000","message":"I\u0027m not super keen on sleeps in unit tests, but I assume we haven\u0027t found a better way of doing this? If something goes really wrong with the test, what is to stop this from sleeping forever?","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a3f0a416947e5be1a6b2a0eeca27e0a5a2492475","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            server \u003d self.api.get_server(server[\u0027id\u0027])"},{"line_number":57,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"},{"line_number":58,"context_line":"                break"},{"line_number":59,"context_line":"            time.sleep(.1)"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        return server"},{"line_number":62,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da86d52c_705e0a47","line":59,"in_reply_to":"da86d52c_222616bb","updated":"2015-02-10 10:03:40.000000000","message":"First I would like to note here that these tests are part of the functional test suite as opposed to the regular unit tests. Therefore it cannot be avoided to use techniques that include for instance sleep in order to test the real functionality. There is not much point in using mocks here, as the end-to-end functionality will not be tested anywhere in that case. Another version of this function can be found in test_servers.py.\n\nAs for sleeping forever, first of all that shouldn\u0027t happen. Or if it does, then there is some serious issue that was caught and should be checked and fixed. On the other hand sleeping forever will reach the global timeout for the tests, so it will fail within the global timeout interval. But again, if the code base and the functionality is correct, that shouldn\u0027t happen to reach this timeout.","commit_id":"c9d6e52c5af0757caf051fb2a71d31a40b82d6f5"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"65422a100c13159a312dd19835f12e89fedf40d3","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ServerGroupTestBase(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    _api_version \u003d \u0027v2\u0027"},{"line_number":33,"context_line":"    _image_ref_parameter \u003d \u0027imageRef\u0027"},{"line_number":34,"context_line":"    _flavor_ref_parameter \u003d \u0027flavorRef\u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_54b1f18d","line":31,"updated":"2015-03-05 21:51:24.000000000","message":"IntegratedTestBase is pretty bloated at this point, I\u0027d like to unwind from there and build on nova.test.TestBase directly. See tests.functions.wsgi.test_flavor_manage","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a48d0a716b015fe86cfc0027bd868df0a8f71721","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ServerGroupTestBase(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    _api_version \u003d \u0027v2\u0027"},{"line_number":33,"context_line":"    _image_ref_parameter \u003d \u0027imageRef\u0027"},{"line_number":34,"context_line":"    _flavor_ref_parameter \u003d \u0027flavorRef\u0027"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_53743567","line":31,"in_reply_to":"9a80dd14_54b1f18d","updated":"2015-03-15 20:08:12.000000000","message":"What is your plan with integrated_helpers? I can try to align this patch to that if you can share further details.\n\nThis patch does not add code to that file just use the already existing code base. Building on nova.test.TestBase would mean code duplication as far as I can see.","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"65422a100c13159a312dd19835f12e89fedf40d3","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def _reset_globals(self):"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_770fd72e","line":52,"updated":"2015-03-05 21:51:24.000000000","message":"this is entirely unclear why it\u0027s here, should this really be a monkeypatch?","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"a48d0a716b015fe86cfc0027bd868df0a8f71721","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def _reset_globals(self):"},{"line_number":50,"context_line":"        # Make it possible to override the timing parameters of the service"},{"line_number":51,"context_line":"        # group in a specific test by forcing the rereading of the CONF"},{"line_number":52,"context_line":"        nova.servicegroup.API._driver \u003d None"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    def setUp(self):"},{"line_number":55,"context_line":"        self._reset_globals()"}],"source_content_type":"text/x-python","patch_set":29,"id":"9a80dd14_62050045","line":52,"in_reply_to":"9a80dd14_770fd72e","updated":"2015-03-15 20:08:12.000000000","message":"I tried to mock it, but maybe the import order has changed, as it started to fail a short while ago. That is why I changed it back to clear the value of this global variable this way. Do you have any suggestion of how this could be mocked in a bullet proof way?","commit_id":"ffe42750f5abc4e5661683cb8b3902da36fb8cc0"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"87f9377dd4ae80c241cececf220b0dd0e05df05b","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ServerGroupTestBase(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    ADMIN_API \u003d True"},{"line_number":33,"context_line":"    _api_version \u003d \u0027v2\u0027"},{"line_number":34,"context_line":"    _image_ref_parameter \u003d \u0027imageRef\u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_d7f98c4f","line":31,"updated":"2015-07-08 12:02:05.000000000","message":"there is so much magic inside of _IntegratedTestBase, instead of doing that it would be nice to build up from TestCase directly like the wsgi/ tests do.","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"4ce333a88daa6b46b20122937b52851b6acc3688","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ServerGroupTestBase(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    ADMIN_API \u003d True"},{"line_number":33,"context_line":"    _api_version \u003d \u0027v2\u0027"},{"line_number":34,"context_line":"    _image_ref_parameter \u003d \u0027imageRef\u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_fe56b628","line":31,"in_reply_to":"ba3cc151_d7f98c4f","updated":"2015-07-09 07:40:17.000000000","message":"As we need more here than just API interaction, if we need to recreate most of the magic here, I don\u0027t see the value in not using integrated_helpers. What do you think? Also please see patch set 29 for answer.","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"45915d98ff087066dd0931e37c04d444a0d24ba9","unresolved":false,"context_lines":[{"line_number":28,"context_line":"CONF \u003d cfg.CONF"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class ServerGroupTestBase(integrated_helpers._IntegratedTestBase):"},{"line_number":32,"context_line":"    ADMIN_API \u003d True"},{"line_number":33,"context_line":"    _api_version \u003d \u0027v2\u0027"},{"line_number":34,"context_line":"    _image_ref_parameter \u003d \u0027imageRef\u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_7f934ba4","line":31,"in_reply_to":"ba3cc151_fe56b628","updated":"2015-07-18 20:25:22.000000000","message":"Done","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8abd5f26921967e20ebdb9492d898a2997abf176","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    _flavor_ref_parameter \u003d \u0027flavorRef\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Note(gibi): RamFilter is needed to ensure that"},{"line_number":38,"context_line":"    # test_boot_servers_with_affinity_no_valid_host behaves as expected"},{"line_number":39,"context_line":"    _scheduler_default_filters \u003d (\u0027ServerGroupAntiAffinityFilter\u0027,"},{"line_number":40,"context_line":"                                  \u0027ServerGroupAffinityFilter\u0027,"},{"line_number":41,"context_line":"                                  \u0027RamFilter\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a41bdd9_6057f5ca","line":38,"updated":"2015-07-17 14:51:21.000000000","message":"while I understand the need of keeping RAMFilter, I just wonder if you should rather change your tests so it could be not needed.\n\nTo be clear, I think it would be better to fully isolate the functional testing of filters, since all of them are not interlaced.","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"45915d98ff087066dd0931e37c04d444a0d24ba9","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    _flavor_ref_parameter \u003d \u0027flavorRef\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    # Note(gibi): RamFilter is needed to ensure that"},{"line_number":38,"context_line":"    # test_boot_servers_with_affinity_no_valid_host behaves as expected"},{"line_number":39,"context_line":"    _scheduler_default_filters \u003d (\u0027ServerGroupAntiAffinityFilter\u0027,"},{"line_number":40,"context_line":"                                  \u0027ServerGroupAffinityFilter\u0027,"},{"line_number":41,"context_line":"                                  \u0027RamFilter\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_9f0e57e4","line":38,"in_reply_to":"9a41bdd9_6057f5ca","updated":"2015-07-18 20:25:22.000000000","message":"There is only one test, which is referred in the comment, that relies on it. I don\u0027t see any scenario for testing that case, which does not require additional filter to be loaded. Another option is to have a separate class for that case. What do you think?","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"87f9377dd4ae80c241cececf220b0dd0e05df05b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                  self.affinity]"},{"line_number":107,"context_line":"        created_groups \u003d []"},{"line_number":108,"context_line":"        for group in groups:"},{"line_number":109,"context_line":"            created_group \u003d self.api.post_server_groups(group)"},{"line_number":110,"context_line":"            created_groups.append(created_group)"},{"line_number":111,"context_line":"            self.assertEqual(group[\u0027name\u0027], created_group[\u0027name\u0027])"},{"line_number":112,"context_line":"            self.assertEqual(group[\u0027policies\u0027], created_group[\u0027policies\u0027])"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_372478c3","line":109,"updated":"2015-07-08 12:02:05.000000000","message":"the api. convenience methods were really meant for use in setUp only. Once we get to actual tests, we should be making api post and get raw calls so that the tests aren\u0027t hiding the API interactions. It also helps people learn along the way what things actually look like.","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"4ce333a88daa6b46b20122937b52851b6acc3688","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                  self.affinity]"},{"line_number":107,"context_line":"        created_groups \u003d []"},{"line_number":108,"context_line":"        for group in groups:"},{"line_number":109,"context_line":"            created_group \u003d self.api.post_server_groups(group)"},{"line_number":110,"context_line":"            created_groups.append(created_group)"},{"line_number":111,"context_line":"            self.assertEqual(group[\u0027name\u0027], created_group[\u0027name\u0027])"},{"line_number":112,"context_line":"            self.assertEqual(group[\u0027policies\u0027], created_group[\u0027policies\u0027])"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba3cc151_fe91d6f1","line":109,"in_reply_to":"ba3cc151_372478c3","updated":"2015-07-09 07:40:17.000000000","message":"In my opinion the current version makes it easier to handle changes in the code by extracting the lines that you use frequently. It\u0027s not about hiding the api call, but making it easier to adapt to changes. From readability perspective the method name is talkative, so I don\u0027t see an issue here either.\n\nIs your concern readability here?","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"8abd5f26921967e20ebdb9492d898a2997abf176","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    # Load only affinity filter so anti-affinity will be missing"},{"line_number":343,"context_line":"    _scheduler_default_filters \u003d \u0027ServerGroupAffinityFilter\u0027"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    @mock.patch(\u0027nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY\u0027, None)"},{"line_number":346,"context_line":"    def test_anti_affinity_no_filter(self):"},{"line_number":347,"context_line":"        created_group \u003d self.api.post_server_groups(self.anti_affinity)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"9a41bdd9_e00225b4","line":345,"updated":"2015-07-17 14:51:21.000000000","message":"that sounds a little hacky","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"45915d98ff087066dd0931e37c04d444a0d24ba9","unresolved":false,"context_lines":[{"line_number":342,"context_line":"    # Load only affinity filter so anti-affinity will be missing"},{"line_number":343,"context_line":"    _scheduler_default_filters \u003d \u0027ServerGroupAffinityFilter\u0027"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    @mock.patch(\u0027nova.scheduler.utils._SUPPORTS_ANTI_AFFINITY\u0027, None)"},{"line_number":346,"context_line":"    def test_anti_affinity_no_filter(self):"},{"line_number":347,"context_line":"        created_group \u003d self.api.post_server_groups(self.anti_affinity)"},{"line_number":348,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"3a50d1a3_7fda6b7a","line":345,"in_reply_to":"9a41bdd9_e00225b4","updated":"2015-07-18 20:25:22.000000000","message":"It is for ensuring that the global variable has the right value.","commit_id":"3ec7e2d5839913c92f23e06d6e6c116fb8a3f3ac"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1630a4749fc709e6cc19a9f756deecf6d8dad52a","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        self.assertEqual(\u0027No valid host was found. \u0027"},{"line_number":210,"context_line":"                         \u0027There are not enough hosts available.\u0027,"},{"line_number":211,"context_line":"                         failed_server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":212,"context_line":"        self.assertEqual(500, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def test_boot_servers_with_anti_affinity(self):"},{"line_number":215,"context_line":"        created_group \u003d self.api.post_server_groups(self.anti_affinity)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_0ad85c1c","line":212,"updated":"2015-08-19 09:51:25.000000000","message":"500 errors should never happen, these are bugs that need fixing.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23a6a623dee9f82fb00f2647a3f430f61f7cf7df","unresolved":false,"context_lines":[{"line_number":209,"context_line":"        self.assertEqual(\u0027No valid host was found. \u0027"},{"line_number":210,"context_line":"                         \u0027There are not enough hosts available.\u0027,"},{"line_number":211,"context_line":"                         failed_server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":212,"context_line":"        self.assertEqual(500, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def test_boot_servers_with_anti_affinity(self):"},{"line_number":215,"context_line":"        created_group \u003d self.api.post_server_groups(self.anti_affinity)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_09f5c081","line":212,"in_reply_to":"fa1b9901_0ad85c1c","updated":"2015-08-19 15:26:27.000000000","message":"This is actually not a HTTP error code as the POST request return 202 and then the test polls the instance state with GET requests. The GET response body contains a \u0027fault\u0027 field and that contains an error code along with the exception traceback.\nI agree that this is misleading in the test so I will remove this assertion.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1630a4749fc709e6cc19a9f756deecf6d8dad52a","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.assertEqual(\u0027No valid host was found. \u0027"},{"line_number":232,"context_line":"                         \u0027There are not enough hosts available.\u0027,"},{"line_number":233,"context_line":"                         failed_server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":234,"context_line":"        self.assertEqual(500, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def _rebuild_with_group(self, group):"},{"line_number":237,"context_line":"        created_group \u003d self.api.post_server_groups(group)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_8a022c6e","line":234,"updated":"2015-08-19 09:51:25.000000000","message":"as above, this has identified a bug that needs fixing.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23a6a623dee9f82fb00f2647a3f430f61f7cf7df","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        self.assertEqual(\u0027No valid host was found. \u0027"},{"line_number":232,"context_line":"                         \u0027There are not enough hosts available.\u0027,"},{"line_number":233,"context_line":"                         failed_server[\u0027fault\u0027][\u0027message\u0027])"},{"line_number":234,"context_line":"        self.assertEqual(500, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def _rebuild_with_group(self, group):"},{"line_number":237,"context_line":"        created_group \u003d self.api.post_server_groups(group)"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_49397840","line":234,"in_reply_to":"fa1b9901_8a022c6e","updated":"2015-08-19 15:26:27.000000000","message":"This is not a HTTP error code. I will remove this assertion, see above.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1630a4749fc709e6cc19a9f756deecf6d8dad52a","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":345,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":346,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":347,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        host.start()"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_2a56805c","line":347,"updated":"2015-08-19 09:51:25.000000000","message":"as above, this is a bug, if this is correct.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23a6a623dee9f82fb00f2647a3f430f61f7cf7df","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":345,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":346,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":347,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        host.start()"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_e90dec3e","line":347,"in_reply_to":"fa1b9901_2a56805c","updated":"2015-08-19 15:26:27.000000000","message":"This seems to be a bug. At least in functional test environment it is really a 500 HTTP code coming from the API. Will check it in more detail and fill a bug / propose a fix.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8926fc339136874a02351878010d78b257056a45","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":345,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":346,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":347,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        host.start()"},{"line_number":350,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_7d2ea8fb","line":347,"in_reply_to":"fa1b9901_e90dec3e","updated":"2015-08-25 14:51:47.000000000","message":"I digged a bit and now I see more details here. The reason behind HTTP 500 is NoValidHost exception. But evacuate API calls rebuild_instance rpc call, so the API should not see the NoValidHost exception. It works as expected in devstack and there is no HTTP 500 visible for the user. However in the functional test environment the NoValidHost exception raised from the rpc call because of the CastAsCall fixture in L75. \n\nAlso an interesting thing is that migrate tests does not behave similarly because the migrate REST API expects and wraps NoValidHost (see https://github.com/openstack/nova/blob/f3d294aca9c1adc3521a0722f8ef28abe9a9645b/nova/api/openstack/compute/migrate_server.py#L83 ) but evacuate API does not.\n\nI removed the CastAsCall fixture in the patch set 47 to get a closer to real life test scenario.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1630a4749fc709e6cc19a9f756deecf6d8dad52a","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":364,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":365,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":366,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        host.start()"},{"line_number":369,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_aac85023","line":366,"updated":"2015-08-19 09:51:25.000000000","message":"as above.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"8926fc339136874a02351878010d78b257056a45","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":364,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":365,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":366,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        host.start()"},{"line_number":369,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_d8dd5071","line":366,"in_reply_to":"fa1b9901_8d49d562","updated":"2015-08-25 14:51:47.000000000","message":"See above","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23a6a623dee9f82fb00f2647a3f430f61f7cf7df","unresolved":false,"context_lines":[{"line_number":363,"context_line":"        ex \u003d self.assertRaises(client.OpenStackApiException,"},{"line_number":364,"context_line":"                               self.admin_api.post_server_action,"},{"line_number":365,"context_line":"                               servers[1][\u0027id\u0027], post)"},{"line_number":366,"context_line":"        self.assertEqual(500, ex.response.status_code)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        host.start()"},{"line_number":369,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_8d49d562","line":366,"in_reply_to":"fa1b9901_aac85023","updated":"2015-08-19 15:26:27.000000000","message":"This seems to be a bug. See above","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"1630a4749fc709e6cc19a9f756deecf6d8dad52a","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        self.assertEqual(400, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"class ServerGroupTestV3(client.TestOpenStackClientV3Mixin, ServerGroupTest):"},{"line_number":404,"context_line":"    _api_version \u003d \u0027v2.1\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_0ae29c9f","line":403,"updated":"2015-08-19 09:51:25.000000000","message":"Please call this ServerGroupTestV21 to match the newely renamed things.","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"23a6a623dee9f82fb00f2647a3f430f61f7cf7df","unresolved":false,"context_lines":[{"line_number":400,"context_line":"        self.assertEqual(400, failed_server[\u0027fault\u0027][\u0027code\u0027])"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"class ServerGroupTestV3(client.TestOpenStackClientV3Mixin, ServerGroupTest):"},{"line_number":404,"context_line":"    _api_version \u003d \u0027v2.1\u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"fa1b9901_2d71a9a8","line":403,"in_reply_to":"fa1b9901_0ae29c9f","updated":"2015-08-19 15:26:27.000000000","message":"Done","commit_id":"d3705a28a2a40ec569435f87348874baea322a4d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"4ce189d95b99708ee214b99e8d0799d9bd0e7246","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            server \u003d self.admin_api.get_server(server[\u0027id\u0027])"},{"line_number":82,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"},{"line_number":83,"context_line":"                break"},{"line_number":84,"context_line":"            time.sleep(.1)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        return server"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa1b9901_1f0c443a","line":84,"updated":"2015-08-24 14:58:08.000000000","message":"Tests should never actually sleep. Either block on something that gives you immediate notification, or something.","commit_id":"81c2c7cca19d26d4ebf4fa121c80eb1a250d1eac"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"108c082989dcc2d65d431b37eedb881102a60c03","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":80,"context_line":"        while True:"},{"line_number":81,"context_line":"            server \u003d self.admin_api.get_server(server[\u0027id\u0027])"},{"line_number":82,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"},{"line_number":83,"context_line":"                break"},{"line_number":84,"context_line":"            time.sleep(.1)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        return server"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa1b9901_a47bc07a","line":84,"range":{"start_line":80,"start_character":8,"end_line":84,"end_character":26},"updated":"2015-08-24 18:04:13.000000000","message":"the fact that this is an unbounded wait is kind of bad. We do have to busy poll some times, but it should be inside a well defined limit of attempts. If this fails in a test case timeout it\u0027s pretty opaque as to why.","commit_id":"81c2c7cca19d26d4ebf4fa121c80eb1a250d1eac"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"54ea83de935b77d64e99be244d28efc8295e6ec3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.addCleanup(nova.tests.unit.image.fake.FakeImageService_reset)"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _wait_for_state_change(self, server, expected_status):"},{"line_number":80,"context_line":"        while True:"},{"line_number":81,"context_line":"            server \u003d self.admin_api.get_server(server[\u0027id\u0027])"},{"line_number":82,"context_line":"            if server[\u0027status\u0027] \u003d\u003d expected_status:"},{"line_number":83,"context_line":"                break"},{"line_number":84,"context_line":"            time.sleep(.1)"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"        return server"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"fa1b9901_be1401e9","line":84,"range":{"start_line":80,"start_character":8,"end_line":84,"end_character":26},"in_reply_to":"fa1b9901_a47bc07a","updated":"2015-08-25 14:59:52.000000000","message":"Done","commit_id":"81c2c7cca19d26d4ebf4fa121c80eb1a250d1eac"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"b9d01f3e801506ab413d266869b208c963b30d0f","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                self.fail(\u0027Wait for state change failed, \u0027"},{"line_number":89,"context_line":"                          \u0027expected_status\u003d%s, actual_status\u003d%s\u0027"},{"line_number":90,"context_line":"                          % (expected_status, server[\u0027status\u0027]))"},{"line_number":91,"context_line":"            self.save_fixture.wait()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return server"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"fa1b9901_2afbc47c","line":91,"updated":"2015-08-25 16:44:42.000000000","message":"so, I realize that Dan was opposed to the sleep wait here, however, the sleep wait had the advantage of looking like API could would actually look. \n\nThis fixture creates a layer violation in the testing here. Would it be nice if our API provided something back to the user they could wait on? Yes, definitely. But it doesn\u0027t. So I think sneaking around that in what are supposed to be API tests is something we should avoid.","commit_id":"65772dac1d4700ea8c60ee97d2173a18946c809e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"532133c046c26da2be23f0b9df65159527d219e2","unresolved":false,"context_lines":[{"line_number":88,"context_line":"                self.fail(\u0027Wait for state change failed, \u0027"},{"line_number":89,"context_line":"                          \u0027expected_status\u003d%s, actual_status\u003d%s\u0027"},{"line_number":90,"context_line":"                          % (expected_status, server[\u0027status\u0027]))"},{"line_number":91,"context_line":"            self.save_fixture.wait()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        return server"},{"line_number":94,"context_line":""}],"source_content_type":"text/x-python","patch_set":47,"id":"fa1b9901_21d0c21e","line":91,"in_reply_to":"fa1b9901_2afbc47c","updated":"2015-08-25 19:36:34.000000000","message":"Yeah, agree with Sean on this one...","commit_id":"65772dac1d4700ea8c60ee97d2173a18946c809e"}]}
