)]}'
{"tempest/scenario/test_network_basic_ops.py":[{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"62546c2f4f57f2f8f3d2faaff7b8c6c6c4e7a247","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            ssh_client.renew_lease(fixed_ip\u003dfloating_ip[\u0027fixed_ip_address\u0027])"},{"line_number":503,"context_line":"            try:"},{"line_number":504,"context_line":"                self._check_dns_server(ssh_client, [alt_dns_server])"},{"line_number":505,"context_line":"            except AssertionError:"},{"line_number":506,"context_line":"                LOG.debug(\"Failed to update DNS nameservers\")"},{"line_number":507,"context_line":"                return False"},{"line_number":508,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_1d3dd8de","line":505,"updated":"2015-02-24 01:36:58.000000000","message":"So this method and the private method _check_dns_server() are just bad. If _check_dns_server doesn\u0027t always cause a failure for every call then it shouldn\u0027t be calling assertTrue, because it\u0027s not always expected to be true. You can just do that from the caller method. \n\nInstead of catching the exception here I think you should just rework _check_dns_server() to return a bool or the servers list from the api call instead. Then if the result results in a test failure assert the response from _check_dns_server() in the caller method.\n\nFor example this call would be something like:\n\n    servers \u003d get_dns_servers(ssh_client, [alt_dns_server])\n    if servers !\u003d [alt_dns_server]:\n        LOG.debug(\"Failed to update DNS nameservers\")\n        return False\n\nand the one above on 488 would be something like:\n\n    servers \u003d self._get_dns_server(ssh_client, [initial_dns_server])\n    self.assertEqual(([initial_dns_servers), servers, ...","commit_id":"7788c4fedcc03508b85729126746d861fc3d2f3f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"09ea674e3bf630fe5abaf603dc459a17c3bcd761","unresolved":false,"context_lines":[{"line_number":502,"context_line":"            ssh_client.renew_lease(fixed_ip\u003dfloating_ip[\u0027fixed_ip_address\u0027])"},{"line_number":503,"context_line":"            try:"},{"line_number":504,"context_line":"                self._check_dns_server(ssh_client, [alt_dns_server])"},{"line_number":505,"context_line":"            except AssertionError:"},{"line_number":506,"context_line":"                LOG.debug(\"Failed to update DNS nameservers\")"},{"line_number":507,"context_line":"                return False"},{"line_number":508,"context_line":"            return True"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba7be1f8_7eba4b24","line":505,"in_reply_to":"ba7be1f8_1d3dd8de","updated":"2015-02-24 02:23:36.000000000","message":"agreed, I was being less surgical in addressing a gate failure, let me see what I can put together...this week I won\u0027t be fast in turning this around though.","commit_id":"7788c4fedcc03508b85729126746d861fc3d2f3f"},{"author":{"_account_id":5196,"name":"Matthew Treinish","email":"mtreinish@kortar.org","username":"treinish"},"change_message_id":"22d98616be592c291569e5209f7cd859db573e88","unresolved":false,"context_lines":[{"line_number":431,"context_line":"            should_connect\u003dTrue, msg\u003d\"after updating \""},{"line_number":432,"context_line":"            \"admin_state_up of router to True\")"},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"    def get_dns_servers(self, ssh_client, dns_servers):"},{"line_number":435,"context_line":"        return ssh_client.get_dns_servers()"},{"line_number":436,"context_line":""},{"line_number":437,"context_line":"    @testtools.skipUnless(CONF.scenario.dhcp_client,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba7be1f8_a29acf6b","line":434,"updated":"2015-02-24 15:25:01.000000000","message":"So after seeing this refactor I\u0027m not sure we need a helper anymore, especially because the dns_servers arg isn\u0027t used at all. I\u0027m thinking just calling ssh_client.get_dns_servers() directly instead of using this method is probably the better way.","commit_id":"ccfbc5849b0b4d5561f70e53c6048ef2a40919a4"}]}
