)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"9c363e23b56f369ac471b9a9f73c444f5ea98150","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2018-03-23 22:37:36 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add Agents client unit tests"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Change-Id: Iba9dcf9572e50cd6b38b04eedea3e90a17f51f5b"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"bf659307_a5aff792","line":8,"updated":"2018-03-25 19:42:34.000000000","message":"This also requires a Partially Implements bp: tempest-lib-missing-test-coverage tag as well.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"}],"tempest/tests/lib/services/network/test_agents_client.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":20,"context_line":""},{"line_number":21,"context_line":"class TestAgentsClient(base.BaseServiceTest):"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    FAKE_AGENTS \u003d {"},{"line_number":24,"context_line":"        \"agents\": ["},{"line_number":25,"context_line":"            \"agent1\","},{"line_number":26,"context_line":"            \"agent2\","}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_45cffb7e","line":23,"range":{"start_line":23,"start_character":4,"end_line":23,"end_character":15},"updated":"2018-03-25 19:40:53.000000000","message":"FAKE_AGENTS isn\u0027t the response to every API endpoint below. The correct response body should be used for list/show/create and so on. If there isn\u0027t API documentation with example response bodies, I would look at the Tempest API tests for this client as well as try the relevant CLI calls from which you can can figure out the responses as well.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        self.client \u003d agents_client.AgentsClient("},{"line_number":41,"context_line":"            fake_auth, \u0027compute\u0027, \u0027regionOne\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def test_update_agent(self, bytes_body\u003dFalse):"},{"line_number":44,"context_line":"        self.check_service_client_function("},{"line_number":45,"context_line":"            self.client.update_agent,"},{"line_number":46,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,"},{"line_number":47,"context_line":"            {\"fake_agent\": self.FAKE_AGENTS[\"agents\"][1]},"},{"line_number":48,"context_line":"            bytes_body,"},{"line_number":49,"context_line":"            200,"},{"line_number":50,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"},{"line_number":51,"context_line":"        )"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def test_show_agent(self, bytes_body\u003dFalse):"},{"line_number":54,"context_line":"        self.check_service_client_function("}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_651ebf0d","line":51,"range":{"start_line":43,"start_character":0,"end_line":51,"end_character":9},"updated":"2018-03-25 19:40:53.000000000","message":"This isn\u0027t the correct pattern (applies to all non-delete tests below). This should be called _test_update_agent(self, bytes_body\u003dFalse). Then you\u0027ll need 2 tests:\n\n  * test_update_agent_with_str_body\n  * test_update_agent_with_bytes_body\n\nWhere the argument bytes_body\u003dFalse/True depends on the name of the test.\n\nThis only applies for APIs that return a response body, i.e. whose response codes aren\u0027t 204.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        self.check_service_client_function("},{"line_number":84,"context_line":"            self.client.create_router_on_l3_agent,"},{"line_number":85,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.post\u0027,"},{"line_number":86,"context_line":"            {},"},{"line_number":87,"context_line":"            bytes_body,"},{"line_number":88,"context_line":"            201,"},{"line_number":89,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_25ed27ef","line":86,"range":{"start_line":86,"start_character":12,"end_line":86,"end_character":15},"updated":"2018-03-25 19:40:53.000000000","message":"If this returns a 201 it most likely returns a response body.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":89,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"},{"line_number":90,"context_line":"        )"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":"    def test_delete_router_from_l3_agent(self, bytes_body\u003dFalse):"},{"line_number":93,"context_line":"        self.check_service_client_function("},{"line_number":94,"context_line":"            self.client.delete_router_from_l3_agent,"},{"line_number":95,"context_line":"            \"tempest.lib.common.rest_client.RestClient.delete\","}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_85dc3347","line":92,"range":{"start_line":92,"start_character":47,"end_line":92,"end_character":63},"updated":"2018-03-25 19:40:53.000000000","message":"This should be dropped since it\u0027s not being used. See how to implement delete: https://github.com/openstack/tempest/blob/8db08ca7f672fa39a947d32d5c6d34a9dca9df9a/tempest/tests/lib/services/network/test_floating_ips_client.py#L139","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"},{"line_number":111,"context_line":"        )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def test_delete_network_from_dhcp_agent(self, bytes_body\u003dFalse):"},{"line_number":114,"context_line":"        self.check_service_client_function("},{"line_number":115,"context_line":"            self.client.delete_network_from_dhcp_agent,"},{"line_number":116,"context_line":"            \"tempest.lib.common.rest_client.RestClient.delete\","}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_a5e13701","line":113,"updated":"2018-03-25 19:40:53.000000000","message":"See comment on L92.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"1e51765bd4ae8578a81badb242198dcb5ea0a499","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        self.check_service_client_function("},{"line_number":126,"context_line":"            self.client.add_dhcp_agent_to_network,"},{"line_number":127,"context_line":"            \"tempest.lib.common.rest_client.RestClient.post\","},{"line_number":128,"context_line":"            {},"},{"line_number":129,"context_line":"            bytes_body,"},{"line_number":130,"context_line":"            201,"},{"line_number":131,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf659307_05f023c9","line":128,"range":{"start_line":128,"start_character":12,"end_line":128,"end_character":15},"updated":"2018-03-25 19:40:53.000000000","message":"If this returns a 201 it most likely returns a response body.","commit_id":"b34d1a958fb4ae55f04b94be172208d221c2557b"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b39cd23bb6edb90b58f86a5e5e8125333b7e5f93","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 AT\u0026T Corporation."},{"line_number":2,"context_line":"# All rights reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_824b8257","line":1,"updated":"2018-03-27 22:30:25.000000000","message":"This still doesn\u0027t follow the established testing convention of lib clients in Tempest.\n\nCorrect:\n\n    def _test_update_agent(self, bytes_body\u003dFalse):\n        self.check_service_client_function(\n            self.client.update_agent,\n            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,\n            {\"fake_agent\": self.FAKE_UPDATE_AGENT},\n            bytes_body,\n            200,\n            agent_id\u003dself.FAKE_AGENTS_ID\n        )\n\n    def test_update_agent_with_str_body(self):\n        self._test_update_agent()\n\n    def test_update_agent_with_bytes_body(self):\n        self._test_update_agent(bytes_body\u003dTrue)\n\n\nIncorrect:\n\n    def test_update_agent_with_str_body(self, bytes_body\u003dFalse):\n        self.check_service_client_function(\n            self.client.update_agent,\n            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,\n            {\"fake_agent\": self.FAKE_UPDATE_AGENT},\n            bytes_body,\n            200,\n            agent_id\u003dself.FAKE_AGENTS_ID\n        )\n\n    def test_update_agent_with_bytes_body(self, bytes_body\u003dTrue):\n        self.check_service_client_function(\n            self.client.update_agent,\n            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,\n            {\"fake_agent\": self.FAKE_UPDATE_AGENT},\n            bytes_body,\n            200,\n            agent_id\u003dself.FAKE_AGENTS_ID\n        )","commit_id":"7ef12095ad7def4050e77ef52a62abd875441fd0"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b39cd23bb6edb90b58f86a5e5e8125333b7e5f93","unresolved":false,"context_lines":[{"line_number":205,"context_line":"        self.check_service_client_function("},{"line_number":206,"context_line":"            self.client.update_agent,"},{"line_number":207,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,"},{"line_number":208,"context_line":"            {\"fake_agent\": self.FAKE_UPDATE_AGENT},"},{"line_number":209,"context_line":"            bytes_body,"},{"line_number":210,"context_line":"            200,"},{"line_number":211,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_0223f2a9","line":208,"range":{"start_line":208,"start_character":12,"end_line":208,"end_character":51},"updated":"2018-03-27 22:30:25.000000000","message":"self.FAKE_UPDATE_AGENT\n\nThe top-level key would never be fake_agent.","commit_id":"7ef12095ad7def4050e77ef52a62abd875441fd0"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b39cd23bb6edb90b58f86a5e5e8125333b7e5f93","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        self.check_service_client_function("},{"line_number":216,"context_line":"            self.client.update_agent,"},{"line_number":217,"context_line":"            \u0027tempest.lib.common.rest_client.RestClient.put\u0027,"},{"line_number":218,"context_line":"            {\"fake_agent\": self.FAKE_UPDATE_AGENT},"},{"line_number":219,"context_line":"            bytes_body,"},{"line_number":220,"context_line":"            200,"},{"line_number":221,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_4229ea87","line":218,"range":{"start_line":218,"start_character":12,"end_line":218,"end_character":51},"updated":"2018-03-27 22:30:25.000000000","message":"self.FAKE_UPDATE_AGENT\n\nThe top-level key would never be fake_agent.","commit_id":"7ef12095ad7def4050e77ef52a62abd875441fd0"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b39cd23bb6edb90b58f86a5e5e8125333b7e5f93","unresolved":false,"context_lines":[{"line_number":345,"context_line":"        self.check_service_client_function("},{"line_number":346,"context_line":"            self.client.add_dhcp_agent_to_network,"},{"line_number":347,"context_line":"            \"tempest.lib.common.rest_client.RestClient.post\","},{"line_number":348,"context_line":"            {},"},{"line_number":349,"context_line":"            bytes_body,"},{"line_number":350,"context_line":"            201,"},{"line_number":351,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_42000a02","line":348,"range":{"start_line":348,"start_character":12,"end_line":348,"end_character":15},"updated":"2018-03-27 22:30:25.000000000","message":"This is probably not the correct response body","commit_id":"7ef12095ad7def4050e77ef52a62abd875441fd0"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"b39cd23bb6edb90b58f86a5e5e8125333b7e5f93","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self.check_service_client_function("},{"line_number":356,"context_line":"            self.client.add_dhcp_agent_to_network,"},{"line_number":357,"context_line":"            \"tempest.lib.common.rest_client.RestClient.post\","},{"line_number":358,"context_line":"            {},"},{"line_number":359,"context_line":"            bytes_body,"},{"line_number":360,"context_line":"            201,"},{"line_number":361,"context_line":"            agent_id\u003dself.FAKE_AGENTS_ID"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf659307_6203ce0e","line":358,"range":{"start_line":358,"start_character":11,"end_line":358,"end_character":15},"updated":"2018-03-27 22:30:25.000000000","message":"This is probably not the correct response body","commit_id":"7ef12095ad7def4050e77ef52a62abd875441fd0"}]}
