)]}'
{"rally_openstack/task/contexts/designate/zones.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"type\": \"integer\","},{"line_number":35,"context_line":"                \"minimum\": 1"},{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"            \"test_existing_designate_from_VM\": {"},{"line_number":38,"context_line":"                \"type\": \"object\","},{"line_number":39,"context_line":"                \"required\": [\"bind_ip\"],"},{"line_number":40,"context_line":"                \"properties\": {"},{"line_number":41,"context_line":"                    \"bind_ip\": {"},{"line_number":42,"context_line":"                        \"type\": \"string\","},{"line_number":43,"context_line":"                    }"},{"line_number":44,"context_line":"                },"},{"line_number":45,"context_line":"                \"additionalProperties\": False"},{"line_number":46,"context_line":"            }"},{"line_number":47,"context_line":"        },"},{"line_number":48,"context_line":"        \"additionalProperties\": False"},{"line_number":49,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_21c29834","line":46,"range":{"start_line":37,"start_character":12,"end_line":46,"end_character":13},"updated":"2020-04-21 15:24:39.000000000","message":"From a documentation point of view (JSONSCHEMA is published to rtd) this looks unclear.\n\nLet\u0027s split the logic and add several flags:\n\n1) `attach_zone_to_network` (maybe attach is not the right world? associate is better?)\n\n   {\n       \"type\": \"bool\",\n       \"description\": \"Update network with created DNS zone.\"\n    }\n\n2) `change_dns_namespace` (not sure that this logic needed here, see my other comments)","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    }"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    DEFAULT_CONFIG \u003d {"},{"line_number":52,"context_line":"        \"zones_per_tenant\": 1"},{"line_number":53,"context_line":"    }"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def setup(self):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_81056c7d","line":52,"updated":"2020-04-21 15:24:39.000000000","message":"You can update this dict with new parameters, so `self.config[\"attach_zone_to_network\"]` will always give True/False no matter user specified it or not","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                    tenant[\"networks\"][0][\"id\"], body)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"                subnet_id \u003d tenant[\"networks\"][0][\"subnets\"][0]"},{"line_number":84,"context_line":"                subnet_update_args \u003d {\"dns_nameservers\": [bind_ip]}"},{"line_number":85,"context_line":"                body \u003d {\"subnet\": subnet_update_args}"},{"line_number":86,"context_line":"                scenario.clients(\"neutron\").update_subnet(subnet_id, body)"},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_8161ec3c","line":84,"updated":"2020-04-21 15:24:39.000000000","message":"Sorry, I\u0027m not familiar with Designate, but should dns_nameservers be specified via designate domain? Can you explain how it works here?\n\n+ this duplicates the logic of networks context. It actually dns_nameservers[*] that is used while createing subnets\n\n[*] - https://github.com/openstack/rally-openstack/blob/master/rally_openstack/task/contexts/network/networks.py#L58 .","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"}],"rally_openstack/task/scenarios/designate/basic.py":[{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":402,"context_line":"                                                   \"nova\", \"neutron\"],"},{"line_number":403,"context_line":"                             \"keypair@openstack\": {},"},{"line_number":404,"context_line":"                             \"allow_ssh@openstack\": None},"},{"line_number":405,"context_line":"                    name\u003d\"DesignateBasic.test_existing_designate_from_VM\","},{"line_number":406,"context_line":"                    platform\u003d\"openstack\")"},{"line_number":407,"context_line":"class TestExistingDesignateFromVM(vm_utils.VMScenario,"},{"line_number":408,"context_line":"                                  utils.DesignateScenario):"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def run(self, image, flavor, username, password\u003dNone,"},{"line_number":411,"context_line":"            floating_network\u003dNone, port\u003d22,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_872a9ce4","line":408,"range":{"start_line":405,"start_character":0,"end_line":408,"end_character":59},"updated":"2020-04-21 15:24:39.000000000","message":"1) I do not see that the scenario uses something from utils.DesignateScenario, so no need to inherit from it.\n\n2) Since this scenario mostly checks the availability of configured DNS, can we rename it to `VMTasks.check_designate_dns_availability` or something like that? We have VMTasks group that usually means that test checks something inside the VM","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        \"\"\""},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        zone \u003d self.context[\"tenant\"][\"zones\"][0][\"name\"]"},{"line_number":435,"context_line":"        subnet \u003d self.clients(\"neutron\").show_subnet("},{"line_number":436,"context_line":"            self.context[\"tenant\"][\"networks\"][0][\"subnets\"][0])"},{"line_number":437,"context_line":"        bind_ip \u003d subnet[\"subnet\"][\"dns_nameservers\"][0]"},{"line_number":438,"context_line":"        if \"test_existing_designate_from_VM\" not in \\"},{"line_number":439,"context_line":"                self.context[\"config\"][\"zones@openstack\"]:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_c7e664e9","line":436,"range":{"start_line":435,"start_character":8,"end_line":436,"end_character":64},"updated":"2020-04-21 15:24:39.000000000","message":"If we attach dns_namespace via networks context, vi can get bind_ip via `self.context[\"tenant\"][\"networks\"][0][\"subnets\"][\"dns_nameservers\"]`","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"9dad4d97725e9c6e7783ef6dbe244117e2f7426d","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        subnet \u003d self.clients(\"neutron\").show_subnet("},{"line_number":436,"context_line":"            self.context[\"tenant\"][\"networks\"][0][\"subnets\"][0])"},{"line_number":437,"context_line":"        bind_ip \u003d subnet[\"subnet\"][\"dns_nameservers\"][0]"},{"line_number":438,"context_line":"        if \"test_existing_designate_from_VM\" not in \\"},{"line_number":439,"context_line":"                self.context[\"config\"][\"zones@openstack\"]:"},{"line_number":440,"context_line":"            raise exceptions.RallyAssertionError("},{"line_number":441,"context_line":"                \"test_existing_designate_from_VM missing in zones context\")"},{"line_number":442,"context_line":""},{"line_number":443,"context_line":"        server, fip \u003d self._boot_server_with_fip("},{"line_number":444,"context_line":"            image, flavor, use_floating_ip\u003duse_floating_ip,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f493fa4_67f4b05c","line":441,"range":{"start_line":438,"start_character":8,"end_line":441,"end_character":75},"updated":"2020-04-21 15:24:39.000000000","message":"Let\u0027s move this logic into a validator plugin. It should be quite simple:\n\n@validation.configure(name\u003d\"required_context_config\")\nclass RequiredContextConfigValidator(validation.Validator):\n\n    def __init__(self, context_name, context_config):\n        \"\"\"Validator checks if required context is configure properly according to scenario requirements.\n        \"\"\"\n        super(RequiredContextConfigValidator, self).__init__()\n        self.context_name \u003d context_name\n        self.context_config \u003d context_config\n\n    def validate(self, context, config, plugin_cls, plugin_cfg):\n        if context_name not in config.get(\"contexts\", {}):\n             # fail silently. if it is required context, `required_contexts` validator should raise proper error\n             return\n        ctx_config \u003d config[\"contexts\"].get(self.context_name)\n\n        for key, value in self.context_config.items():\n            if key not ctx_config or ctx_config[key] !\u003d value:\n                self.fail(f\"The \u0027{self.context_name}\u0027 context should be configured...\")","commit_id":"ee830f0fd4f740119dd89b7d09fb9a50877ba660"}]}
