)]}'
{"designateclient/client.py":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"8b0f53caf71560b898b79a5fd6e045b6f8649184","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027)"},{"line_number":48,"context_line":"        content_type \u003d headers.get(\u0027Content-Type\u0027) if headers else None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        if \u0027data\u0027 in kwargs and content_type in {None, \u0027application/json\u0027}:"},{"line_number":51,"context_line":"            kwargs[\u0027data\u0027] \u003d json.dumps(kwargs[\u0027data\u0027])"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _post(self, url, response_key\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_20a043f4","line":50,"range":{"start_line":50,"start_character":49,"end_line":50,"end_character":53},"updated":"2016-03-29 12:31:04.000000000","message":"We should never return a content_type of \"None\" - is there somewhere we are?","commit_id":"2b9b3623d6b3bd010cc92147e5daf8e9964dec52"},{"author":{"_account_id":15452,"name":"Rahman Syed","email":"rahman.syed@gmail.com","username":"rahmansyed"},"change_message_id":"6bb354208330b8865d46c24448af7c3e9d5dae0b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        headers \u003d kwargs.get(\u0027headers\u0027)"},{"line_number":48,"context_line":"        content_type \u003d headers.get(\u0027Content-Type\u0027) if headers else None"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"        if \u0027data\u0027 in kwargs and content_type in {None, \u0027application/json\u0027}:"},{"line_number":51,"context_line":"            kwargs[\u0027data\u0027] \u003d json.dumps(kwargs[\u0027data\u0027])"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _post(self, url, response_key\u003dNone, **kwargs):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_8fbfbbcf","line":50,"range":{"start_line":50,"start_character":49,"end_line":50,"end_character":53},"in_reply_to":"ba0121b8_20a043f4","updated":"2016-03-29 13:35:26.000000000","message":"I included None only because of what I reasoned out, I didn\u0027t confirm empirically yet (but I will now).\n\nhttps://github.com/openstack/python-designateclient/blob/master/designateclient/v2/client.py#L50-L51\n\nsets Content-Type, but I believe this code comes after the _serialize call here:\n\nhttps://github.com/openstack/python-designateclient/blob/master/designateclient/client.py#L51\n\nZoneImportsController.create -\u003e self._post -\u003e self._serialize, then only after the self._serialize comes the self.request call which sets Content-Type header.","commit_id":"2b9b3623d6b3bd010cc92147e5daf8e9964dec52"}],"designateclient/functionaltests/client.py":[{"author":{"_account_id":11662,"name":"Paul Glass","email":"paul.glass@rackspace.com","username":"pglass"},"change_message_id":"5883d5e44d192c0acc20591b6a6ee9efb2a1c87f","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def zone_import_create(self, zone_file_contents, *args, **kwargs):"},{"line_number":185,"context_line":"        with tempfile.NamedTemporaryFile() as f:"},{"line_number":186,"context_line":"            f.write(zone_file_contents)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            cmd \u003d \u0027zone import create {0}\u0027.format(f.name)"},{"line_number":189,"context_line":"            return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_736d1732","line":186,"updated":"2016-03-28 20:26:04.000000000","message":"Since this file is a resource used by the tests, I would have it be managed by either some fixture, or in the setup/teardown for the relevant tests.\n\nThen this method just accepts the filename rather than the zone file contents, which better reflects the actual cli command (which accepts the file path).","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"},{"author":{"_account_id":15452,"name":"Rahman Syed","email":"rahman.syed@gmail.com","username":"rahmansyed"},"change_message_id":"e38f2ad22a3a964ceb93db81ad1c7c5ebcac9e42","unresolved":false,"context_lines":[{"line_number":183,"context_line":""},{"line_number":184,"context_line":"    def zone_import_create(self, zone_file_contents, *args, **kwargs):"},{"line_number":185,"context_line":"        with tempfile.NamedTemporaryFile() as f:"},{"line_number":186,"context_line":"            f.write(zone_file_contents)"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"            cmd \u003d \u0027zone import create {0}\u0027.format(f.name)"},{"line_number":189,"context_line":"            return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_e9177a52","line":186,"in_reply_to":"ba0121b8_736d1732","updated":"2016-03-28 20:41:58.000000000","message":"That\u0027s fair: I preferred the convenience of feeding zone_file contents rather than dealing with paths across the interface for the purpose of testing, but you\u0027re right that moving file management out of this method reflects the actual CLI command better.","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"}],"designateclient/functionaltests/datagen.py":[{"author":{"_account_id":11662,"name":"Paul Glass","email":"paul.glass@rackspace.com","username":"pglass"},"change_message_id":"5883d5e44d192c0acc20591b6a6ee9efb2a1c87f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"           \"{0}{1}.com. 42 IN NS ns.{0}{1}.com.\" \\"},{"line_number":44,"context_line":"           \"{0}{1}.com. 42 IN MX 10 mail.{0}{1}.com.\" \\"},{"line_number":45,"context_line":"           \"ns.{0}{1}.com. 42 IN A 10.0.0.1\" \\"},{"line_number":46,"context_line":"           \"mail.{0}{1}.com. 42 IN A 10.0.0.2\".format(name, random_digits())"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_9390abee","line":46,"updated":"2016-03-28 20:26:04.000000000","message":"This is missing newlines, so the zone file ends up being one long line.\n\nI also have a vendor-specific request, which is to include \"$TTL 300\" here (and remove or bump the 42 second TTLs from the records). This will ensure we at Rackspace can run these tests against all our envs which require a TTL \u003e\u003d 300 for all zones.","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"},{"author":{"_account_id":15452,"name":"Rahman Syed","email":"rahman.syed@gmail.com","username":"rahmansyed"},"change_message_id":"e38f2ad22a3a964ceb93db81ad1c7c5ebcac9e42","unresolved":false,"context_lines":[{"line_number":43,"context_line":"           \"{0}{1}.com. 42 IN NS ns.{0}{1}.com.\" \\"},{"line_number":44,"context_line":"           \"{0}{1}.com. 42 IN MX 10 mail.{0}{1}.com.\" \\"},{"line_number":45,"context_line":"           \"ns.{0}{1}.com. 42 IN A 10.0.0.1\" \\"},{"line_number":46,"context_line":"           \"mail.{0}{1}.com. 42 IN A 10.0.0.2\".format(name, random_digits())"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_a43487de","line":46,"in_reply_to":"ba0121b8_9390abee","updated":"2016-03-28 20:41:58.000000000","message":"Odd, earlier I\u0027d been careful about ensuring newlines (I avoided the Python multiline string for a reason).  Thanks for catching this!\n\nI\u0027ll bump the TTL as well","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"},{"author":{"_account_id":11662,"name":"Paul Glass","email":"paul.glass@rackspace.com","username":"pglass"},"change_message_id":"02fe0077ca2e3a560cf9ea6f86872f952badf25b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"           \"{0}{1}.com. 42 IN NS ns.{0}{1}.com.\\n\" \\"},{"line_number":45,"context_line":"           \"{0}{1}.com. 42 IN MX 10 mail.{0}{1}.com.\\n\" \\"},{"line_number":46,"context_line":"           \"ns.{0}{1}.com. 42 IN A 10.0.0.1\\n\" \\"},{"line_number":47,"context_line":"           \"mail.{0}{1}.com. 42 IN A 10.0.0.2\\n\".format(name, random_digits())"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba0121b8_0c86fc64","line":47,"updated":"2016-03-29 22:21:50.000000000","message":"If we want the ttl for the zone to be \u003e\u003d 300, then each of the 42 second ttls in the records here must be changed as well (the first number after the record name is the record ttl).","commit_id":"2b9b3623d6b3bd010cc92147e5daf8e9964dec52"}],"designateclient/functionaltests/v2/test_zone_import.py":[{"author":{"_account_id":11662,"name":"Paul Glass","email":"paul.glass@rackspace.com","username":"pglass"},"change_message_id":"304eed2647d7eafb3840644ac5d3da8c02d9d9f6","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(TestZoneImport, self).setUp()"},{"line_number":29,"context_line":"        self.ensure_tld_exists(\u0027com\u0027)"},{"line_number":30,"context_line":"        fixture \u003d self.useFixture(ZoneFixture("},{"line_number":31,"context_line":"            name\u003drandom_zone_name(),"},{"line_number":32,"context_line":"            email\u003d\u0027test@example.com\u0027,"},{"line_number":33,"context_line":"        ))"},{"line_number":34,"context_line":"        self.zone \u003d fixture.zone"},{"line_number":35,"context_line":"        self.zone_file_contents \u003d random_zone_file()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def test_list_zone_imports(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_a8dd0be2","line":34,"range":{"start_line":30,"start_character":0,"end_line":34,"end_character":32},"updated":"2016-03-30 15:11:52.000000000","message":"The import tests shouldn\u0027t need to create this zone.","commit_id":"0a5a769fbc338a437e154d288a028b3c59ca1558"},{"author":{"_account_id":15452,"name":"Rahman Syed","email":"rahman.syed@gmail.com","username":"rahmansyed"},"change_message_id":"6af6291b9112c37b0c291fbceff30ff82baf4361","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    def setUp(self):"},{"line_number":28,"context_line":"        super(TestZoneImport, self).setUp()"},{"line_number":29,"context_line":"        self.ensure_tld_exists(\u0027com\u0027)"},{"line_number":30,"context_line":"        fixture \u003d self.useFixture(ZoneFixture("},{"line_number":31,"context_line":"            name\u003drandom_zone_name(),"},{"line_number":32,"context_line":"            email\u003d\u0027test@example.com\u0027,"},{"line_number":33,"context_line":"        ))"},{"line_number":34,"context_line":"        self.zone \u003d fixture.zone"},{"line_number":35,"context_line":"        self.zone_file_contents \u003d random_zone_file()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def test_list_zone_imports(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba0121b8_ab3ce5c8","line":34,"range":{"start_line":30,"start_character":0,"end_line":34,"end_character":32},"in_reply_to":"ba0121b8_a8dd0be2","updated":"2016-03-30 15:14:39.000000000","message":"Agreed, this was cargo culted from TestZoneExport and never reevaluated as necessary for the test.  Nice catch!","commit_id":"0a5a769fbc338a437e154d288a028b3c59ca1558"}],"designateclient/v2/cli/zones.py":[{"author":{"_account_id":11662,"name":"Paul Glass","email":"paul.glass@rackspace.com","username":"pglass"},"change_message_id":"5883d5e44d192c0acc20591b6a6ee9efb2a1c87f","unresolved":false,"context_lines":[{"line_number":519,"context_line":"    def take_action(self, parsed_args):"},{"line_number":520,"context_line":"        client \u003d self.app.client_manager.dns"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        with open(parsed_args.zone_file_path, \u0027rb\u0027) as f:"},{"line_number":523,"context_line":"            zone_file_contents \u003d f.read()"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        data \u003d client.zone_imports.create(zone_file_contents)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_6eb0908c","line":522,"updated":"2016-03-28 20:26:04.000000000","message":"It may not matter, but do we need to read as binary here (\u0027rb\u0027) since zone files are just text files? \n\nThe internet just mentions different handling of end-of-line characters between the two modes (binary vs text).","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"},{"author":{"_account_id":15452,"name":"Rahman Syed","email":"rahman.syed@gmail.com","username":"rahmansyed"},"change_message_id":"e38f2ad22a3a964ceb93db81ad1c7c5ebcac9e42","unresolved":false,"context_lines":[{"line_number":519,"context_line":"    def take_action(self, parsed_args):"},{"line_number":520,"context_line":"        client \u003d self.app.client_manager.dns"},{"line_number":521,"context_line":""},{"line_number":522,"context_line":"        with open(parsed_args.zone_file_path, \u0027rb\u0027) as f:"},{"line_number":523,"context_line":"            zone_file_contents \u003d f.read()"},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"        data \u003d client.zone_imports.create(zone_file_contents)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba0121b8_24ca37a2","line":522,"in_reply_to":"ba0121b8_6eb0908c","updated":"2016-03-28 20:41:58.000000000","message":"Nope, do not need the binary designation here; it\u0027s an artifact from debugging preserving newlines while reading a zonefile and attempted to work with bytes instead.","commit_id":"c218bdd94d09ac07799dbdc57132b950055a7568"}]}
