)]}'
{"rally/plugins/openstack/context/network/networks.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"565934233e1ce56e247955422a49611bf769aa58","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        \"networks_per_tenant\": 1,"},{"line_number":70,"context_line":"        \"subnets_per_network\": 1,"},{"line_number":71,"context_line":"        \"network_create_args\": {},"},{"line_number":72,"context_line":"        \"dns_nameservers\": []"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `network`\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_4d3ceb2e","line":72,"updated":"2016-07-01 09:21:42.000000000","message":"This is not correct, because in case if \"dns_nameservers\": []\nnameservers will actually be [\"8.8.8.8\", \"8.8.4.4\"] - this is confusing\nhttps://github.com/openstack/rally/blob/8316edca958a38877fe7d427ffed4ae6879f5b7c/rally/plugins/openstack/wrappers/network.py#L335\n\nSo the correct default value should be [\"8.8.8.8\", \"8.8.4.4\"]\n\nAnd if context config file has \"dns_nameservers\": [] (for some strange case), as well as a list of alternative nameservers, this value of empty list must be passed to net_wrapper.create_network() as-is","commit_id":"2c4ced8c0885c0b15cd0434b78f862778333b879"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"80ba3a2d23a6936ab0654acd2412be3bdf19321c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        \"networks_per_tenant\": 1,"},{"line_number":70,"context_line":"        \"subnets_per_network\": 1,"},{"line_number":71,"context_line":"        \"network_create_args\": {},"},{"line_number":72,"context_line":"        \"dns_nameservers\": []"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `network`\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_eceae073","line":72,"in_reply_to":"3aaa91ec_4d3ceb2e","updated":"2016-07-01 17:58:37.000000000","message":"I\u0027m trying to avoid hard coding the default value in multiple places.  But I get your use case, allowing to disable/not add any DNS servers during net create, which this patch currently doesn\u0027t handle.\n\nWhat about changing L72 to \"dns_nameservers\": None and in L85 check if self.config[\"dns_nameservers\"] is a tuple?\n\n        \"dns_nameservers\": None\n        \u003c..snip..\u003e\n        if isinstance(self.config[\"dns_nameservers\"], tuple):\n            kwargs[\"dns_nameservers\"] \u003d self.config[\"dns_nameservers\"]\n\nThis way it will handle the case you described and also avoid multiple hard coding places.  Will this be more confusing?  I\u0027m fine with implementing either way.","commit_id":"2c4ced8c0885c0b15cd0434b78f862778333b879"},{"author":{"_account_id":15029,"name":"John Wu","email":"weiwu@cisco.com","username":"johnwwu"},"change_message_id":"e67cecba631e55d0500847b4b824fed6b8400ec7","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        \"networks_per_tenant\": 1,"},{"line_number":70,"context_line":"        \"subnets_per_network\": 1,"},{"line_number":71,"context_line":"        \"network_create_args\": {},"},{"line_number":72,"context_line":"        \"dns_nameservers\": []"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `network`\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"1aa78d24_a5be32d2","line":72,"in_reply_to":"3aaa91ec_58ae4a30","updated":"2016-07-02 05:08:35.000000000","message":"Done\n\nThanks for the LockedDict info; yes, I was wondering where is the change to tuple coming from.","commit_id":"2c4ced8c0885c0b15cd0434b78f862778333b879"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"c9051844996b264dcc5a8ca8959be49320809a0b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        \"networks_per_tenant\": 1,"},{"line_number":70,"context_line":"        \"subnets_per_network\": 1,"},{"line_number":71,"context_line":"        \"network_create_args\": {},"},{"line_number":72,"context_line":"        \"dns_nameservers\": []"},{"line_number":73,"context_line":"    }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `network`\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_58ae4a30","line":72,"in_reply_to":"3aaa91ec_eceae073","updated":"2016-07-01 18:18:03.000000000","message":"Your proposal looks good, let\u0027s make it so.\nHowever \u0027if self.config[\"dns_nameservers\"] is not None\u0027 is a bit better.\n\nJust to note, if you are confused about how list at L72 becomes a tuple - this is after config dict transformed into LockedDict at https://github.com/openstack/rally/blob/25af9a0a4087c4406632b5a8d2a83c08bbe1d387/rally/task/context.py#L82","commit_id":"2c4ced8c0885c0b15cd0434b78f862778333b879"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"565934233e1ce56e247955422a49611bf769aa58","unresolved":false,"context_lines":[{"line_number":96,"context_line":"                    add_router\u003dTrue,"},{"line_number":97,"context_line":"                    subnets_num\u003dself.config[\"subnets_per_network\"],"},{"line_number":98,"context_line":"                    network_create_args\u003dnetwork_create_args,"},{"line_number":99,"context_line":"                    **kwargs)"},{"line_number":100,"context_line":"                self.context[\"tenants\"][tenant_id][\"networks\"].append(network)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Exit context: `network`\"))"}],"source_content_type":"text/x-python","patch_set":1,"id":"3aaa91ec_cd161ba6","line":99,"updated":"2016-07-01 09:21:42.000000000","message":"dns_nameservers\u003dself.config[\"dns_nameservers\"]","commit_id":"2c4ced8c0885c0b15cd0434b78f862778333b879"}]}
