)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"3f16d54961837969adbac6ebb390418f0e3a7ba1","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I8bb02f11e60767dacdf6ac852979cfa82de1e08b"},{"line_number":15,"context_line":"Closes-bug: #1585976"},{"line_number":16,"context_line":"DocImpact"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"da4df55a_2045a116","line":16,"updated":"2016-12-23 14:01:34.000000000","message":"DocImpact must be followed by one line that explain the impact to the doc content. The bug report that will be generated from this tag will then contain the info and help doc maintainers fix the documentation properly. Please, keep this in mind for the future.","commit_id":"91d048dbde83a52f43aceebaf1b1e1ef0937602d"}],"neutron/services/externaldns/drivers/designate/driver.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ee97e532a39df7ae3f06bfd77b1e795be388183a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_24466cbf","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"updated":"2016-11-16 19:45:41.000000000","message":"This path is never executed","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"47a09f39c0ea63fa8f5d81d4bc42e7a1a59bc776","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_a548b688","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_24466cbf","updated":"2016-11-16 20:48:06.000000000","message":"Hi Miguel! Did you try to set auth_type in [designate]? Since the loader only works if it is set. The other path is a fallback to work with the legacy (current) config.","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"a85daff6fed5c38284aa08cbbccf90f4154cb2ba","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_bb9181f3","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_914bcf86","updated":"2016-11-17 20:51:07.000000000","message":"It can be done, the problem is that it would require changing the ca_cert option to cafile (the loader uses cafile). And preserving both just complicates the code.","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"d2b2f38e5d5782f06e6e64078d6170689ca81b86","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_eb4fdcba","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_a548b688","updated":"2016-11-16 22:52:29.000000000","message":"What value should I set in auth_type if I want this to be equivalent L58-63?","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"3c2dc46321eb606933a21d2b6263aa3fffd4b73f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_db2abd8f","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_bb9181f3","updated":"2016-11-17 20:57:16.000000000","message":"Btw, loading.session.Session().load_from_options(insecure\u003dCONF.designate.insecure, cacert\u003dCONF.designate.ca_cert) \ncan be used in a fully compatible way.","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"4bf346fecfa4a6ee3fcbe8dbf8f5f089eff22921","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_914bcf86","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_c18bd1c1","updated":"2016-11-17 17:27:01.000000000","message":"You are right. loading.load_auth_from_conf_options works fine when setting auth_type \u003d password and adjusting the other parameters. I was able to send a port\u0027s dns_name to Designate\n\nPlease look at L45-50. With this change should we modify the creation of the SESSION to use ks_loading.load_session_from_conf_options?","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"f28b679fac2f14cafb791aa88ba0d149830d02e5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_e5ac128e","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_db2abd8f","updated":"2016-11-18 14:02:28.000000000","message":"Sounds good. Please add a DocImpact flag to your commit message. We need to update the documentation. These are the guidelines for DocImpact flag: https://wiki.openstack.org/wiki/Documentation/DocImpact","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"ee429f8a5743005b5d1069651d787959dffb6158","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    auth \u003d token_endpoint.Token(CONF.designate.url, context.auth_token)"},{"line_number":53,"context_line":"    client \u003d d_client.Client(session\u003d_SESSION, auth\u003dauth)"},{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_c18bd1c1","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":30},"in_reply_to":"7a77a97e_eb4fdcba","updated":"2016-11-17 08:26:15.000000000","message":"auth_type \u003d password\nHowever, the loader uses somewhat different settings than the legacy, e.g. admin_auth_url become auth_url, and of course the v3 options are different (username, password, user_domain_name, project_name, project_domain_name, just like in [keystone_authtoken])","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"ee97e532a39df7ae3f06bfd77b1e795be388183a","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"},{"line_number":60,"context_line":"            username\u003dCONF.designate.admin_username,"},{"line_number":61,"context_line":"            password\u003dCONF.designate.admin_password,"},{"line_number":62,"context_line":"            tenant_name\u003dCONF.designate.admin_tenant_name,"},{"line_number":63,"context_line":"            tenant_id\u003dCONF.designate.admin_tenant_id)"},{"line_number":64,"context_line":"    admin_client \u003d d_client.Client(session\u003d_SESSION, auth\u003dadmin_auth)"},{"line_number":65,"context_line":"    return client, admin_client"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_04317005","line":64,"range":{"start_line":57,"start_character":0,"end_line":64,"end_character":69},"updated":"2016-11-16 19:45:41.000000000","message":"If I comment out these lines and the if in L54, forcing the execution of L55-56, I get the following traceback: http://paste.openstack.org/show/589501/. I think that what you have to do is something similar to what I am doing here for routed networks: https://review.openstack.org/#/c/358658/16/neutron/services/segments/plugin.py@133 and https://review.openstack.org/#/c/358658/16/neutron/conf/common.py@186. In that patchset please don\u0027t pay attention to the failures in Jenkins. They are due to one of the clients that I am using that haven\u0027t merged yet. The code works fine.\n\nAnother example can also be seen here: https://blog-rcritten.rhcloud.com/?p\u003d132.\n\nThis means that we are not going to be able to share the session anymore between client and admin_client (unless you know something I don\u0027t). So we will have to update the management of the session above. Also, we might create admin_client only once. There is no need to create every time","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"47a09f39c0ea63fa8f5d81d4bc42e7a1a59bc776","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    if CONF.designate.auth_type:"},{"line_number":55,"context_line":"        admin_auth \u003d loading.load_auth_from_conf_options("},{"line_number":56,"context_line":"            CONF, \u0027designate\u0027)"},{"line_number":57,"context_line":"    else:"},{"line_number":58,"context_line":"        admin_auth \u003d password.Password("},{"line_number":59,"context_line":"            auth_url\u003dCONF.designate.admin_auth_url,"},{"line_number":60,"context_line":"            username\u003dCONF.designate.admin_username,"},{"line_number":61,"context_line":"            password\u003dCONF.designate.admin_password,"},{"line_number":62,"context_line":"            tenant_name\u003dCONF.designate.admin_tenant_name,"},{"line_number":63,"context_line":"            tenant_id\u003dCONF.designate.admin_tenant_id)"},{"line_number":64,"context_line":"    admin_client \u003d d_client.Client(session\u003d_SESSION, auth\u003dadmin_auth)"},{"line_number":65,"context_line":"    return client, admin_client"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a77a97e_e508ee2f","line":64,"range":{"start_line":57,"start_character":0,"end_line":64,"end_character":69},"in_reply_to":"7a77a97e_04317005","updated":"2016-11-16 20:48:06.000000000","message":"MissingAuthPlugin is due to the missing auth_type option. I\u0027ve tried to make use of the loader in this patch, of course your optimization idea can be considered.","commit_id":"507542ba825b08673d098a88c2c51ef41396a9bb"}],"neutron/tests/unit/plugins/ml2/extensions/test_dns_integration.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"56230439dfc6aeac89d6fd05249d1d7449073d9f","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"},{"line_number":643,"context_line":"        config.cfg.CONF.unregister_opts("},{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":"        config.cfg.CONF.clear_override(\u0027auth_type\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_c6f07c69","line":643,"updated":"2016-11-22 16:51:42.000000000","message":"We call CONF.reset() at the end of each test, which should at least get rid of the need for the clear_override call.","commit_id":"e7344410489f4b155f2bb5f8948fb7d5ee92e7ba"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f44cc6ea0373ba309513c2661a33b92bb3f4c478","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"},{"line_number":643,"context_line":"        config.cfg.CONF.unregister_opts("},{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":"        config.cfg.CONF.clear_override(\u0027auth_type\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_47cd9185","line":643,"updated":"2016-11-21 12:26:44.000000000","message":"our test framework should get us a clean config object on each run. Are you sure this teardown method is necessary?","commit_id":"e7344410489f4b155f2bb5f8948fb7d5ee92e7ba"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"12c72f41f9294ad44865c4e58b818b07a2c3194e","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"},{"line_number":643,"context_line":"        config.cfg.CONF.unregister_opts("},{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":"        config.cfg.CONF.clear_override(\u0027auth_type\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_c730beeb","line":643,"in_reply_to":"7a77a97e_47cd9185","updated":"2016-11-21 13:21:13.000000000","message":"Yes, without that, other tests will fail because of the mandatory auth_url left-over registered Password plugin option.","commit_id":"e7344410489f4b155f2bb5f8948fb7d5ee92e7ba"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"3994dcc8e4207486ce6fe06cc2ffb742293fe016","unresolved":false,"context_lines":[{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"},{"line_number":643,"context_line":"        config.cfg.CONF.unregister_opts("},{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":"        config.cfg.CONF.clear_override(\u0027auth_type\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a77a97e_611dd265","line":643,"in_reply_to":"7a77a97e_c6f07c69","updated":"2016-11-22 16:56:51.000000000","message":"Maybe the clear_override is redundant, but unregister_opts is necessary.","commit_id":"e7344410489f4b155f2bb5f8948fb7d5ee92e7ba"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0a50d8d1594b7275bc6a210b90358f2e52e87e00","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        mock.patch.object(driver, \u0027_SESSION\u0027, new\u003dNone).start()"},{"line_number":637,"context_line":"        self.driver_session \u003d ("},{"line_number":638,"context_line":"            mock.patch.object(driver.session, \u0027Session\u0027).start()"},{"line_number":639,"context_line":"        )"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_325a5e84","line":639,"range":{"start_line":639,"start_character":8,"end_line":639,"end_character":9},"updated":"2016-11-30 19:42:58.000000000","message":"Nit: You may move this to the end of the previous line","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"5126dd2aa3ba4c9db24e3cd521a0ee43d3c51787","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        mock.patch.object(driver, \u0027_SESSION\u0027, new\u003dNone).start()"},{"line_number":637,"context_line":"        self.driver_session \u003d ("},{"line_number":638,"context_line":"            mock.patch.object(driver.session, \u0027Session\u0027).start()"},{"line_number":639,"context_line":"        )"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    def tearDown(self):"},{"line_number":642,"context_line":"        super(TestDesignateClientKeystoneV3, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_233fb426","line":639,"range":{"start_line":639,"start_character":8,"end_line":639,"end_character":9},"in_reply_to":"5a74a57a_325a5e84","updated":"2016-12-01 09:41:50.000000000","message":"It was just copy-paste.","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"251c43d668df322ced649b0f73aef7866a2d7930","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_5bfaa943","line":647,"updated":"2016-11-23 21:54:22.000000000","message":"The essence of your change (https://review.openstack.org/#/c/398359/5/neutron/services/externaldns/drivers/designate/driver.py@54) is whether, based on CONF.designate.auth_type, you use loading.load_auth_from_conf_options or password.Password to create the admin_auth that will be used to instantiate the admin_client. I think we should have two test cases that explicitly test those two paths","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"4b3364bd981e661b1c0a0afeb48af641b3677317","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_f1a1c2aa","line":647,"in_reply_to":"3a71b18c_7bb057de","updated":"2016-12-02 09:38:15.000000000","message":"I understand, but then 1 case will cover the new code path, and 3 cases the old one. Does not sound too good to me. But If you want, I\u0027ll do it.","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"3c616e8bb072c61dc4f56dc022fa99f46e6069b0","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_d8403fa8","line":647,"in_reply_to":"3a71b18c_c0876fd5","updated":"2016-12-03 09:59:53.000000000","message":"Ah, thanks for the long explanation, it must took lot of time from you, all with the code and debugging.\nSo I start to understand: you suggest the test cases added to the new TestDesignateClientKeystoneV3 class, and leave the existing TestDesignateClient(KeystoneV2) as is. Then we\u0027ll have 2 tests with the old class, and 4 with the new. So test_secure_client, test_insecure_client, test_auth_type_password will use the new code (I agree about the old-new code path definition), and test_auth_type_not_defined will use the old path.\nI admit, I suck at writing tests. I just assumed that introducing separate TestDesignateClientV2 and V3 classes is enough to cover all pathes (actually I\u0027m always confused by mocking, since then the test will run on an \"artifical\" environment, and easy to skip the real thing - e.g. it is easy to write tests which always succeeds regardless of the actual code, or do what is intended, but the intention is not always correct).","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"e5896a6d33a04c57f15ef30cf29c55eb1c6af920","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_7bb057de","line":647,"in_reply_to":"3a71b18c_ce78e792","updated":"2016-12-01 17:09:06.000000000","message":"I am not suggesting you remove the other test cases. Different test cases test different aspects of the code","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0442e9e8c975ff2c82bae5042f78bd1d11825fc5","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_c0876fd5","line":647,"in_reply_to":"3a71b18c_f1a1c2aa","updated":"2016-12-03 00:26:13.000000000","message":"Hi Gyorgy,\n\nThank you for your comments. I appreciate them and your making the effort to contribute this patchset.\n\nI am confused by your latest comment. So first of all, let\u0027s agree on what the new code path is. I propose the following definition: the new code path are the lines highlighted in bright green by gerrit here: https://review.openstack.org/#/c/398359/5/neutron/services/externaldns/drivers/designate/driver.py@54. The old code path is shown with a less bright green background.\n\nUsing this definition, I added the two test cases I proposed to you in a previous comment, for a total of 4 tests cases. I then added pdb breakpoints to the new and old code paths as follows: https://gist.github.com/miguellavalle/4d47e26db03011f300c197f5fbc4363d\n\nFinally, I execute this test class as follows: http://paste.openstack.org/show/591302/. As you can see, we hit the new code path 3 times and the old one once. So, what do you mean when you say \"1 case will cover the new code path, and 3 cases the old one\"?\n\nI don\u0027t want to force you to write any lines of code. I am only expressing my opinion with the intent of helping you and other contributors to write code that complies with the standards of the Neutron community. Among those standards, the community wants to \"cover as much code as possible\" with unit tests, as indicated in the devref documentation: http://docs.openstack.org/developer/neutron/devref/development.environment.html#unit-tests. Since you are making the effort to contribute this patchset, I am pretty sure you share this aspiration with the Neutron community.\n\nWith this is mind, it is my opinion that we should explicitly test whether, based on CONF.designate.auth_type, we use loading.load_auth_from_conf_options or password.Password to create the admin_auth that will be used to instantiate the admin_client. As I\u0027ve said before, this is the essence of your change. As the pdb experiment demonstrates, with the two additional tests cases I propose, we achieve just that","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"5126dd2aa3ba4c9db24e3cd521a0ee43d3c51787","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_ce78e792","line":647,"in_reply_to":"5a74a57a_32fede6b","updated":"2016-12-01 09:41:50.000000000","message":"Yepp, your tests are more specific to the patch, but the leave test_secure_client and test_insecure_client to test with the legacy options? Seems not very consistent to me.","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"2752284495f795f67f3730763cfdc9647ddc1e08","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_3a98701b","line":647,"in_reply_to":"5a74a57a_32fede6b","updated":"2016-11-30 21:53:15.000000000","message":"You might also improve on my test cases by using assert_called_with instead of self.assertTrue(load_auth.called) and self.assertTrue(password.called)","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":18940,"name":"Gyorgy Szombathelyi","email":"gyurco@freemail.hu","username":"gyurco78"},"change_message_id":"1493be7252d445bfd7578ce198de241348d289ce","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_6924e8ae","line":647,"in_reply_to":"5a74a57a_5bfaa943","updated":"2016-11-24 08:34:05.000000000","message":"Hi! The two cases are covered by the (old) TestDesignateClientV2 class with the legacy options, and this new TestDestignateClientV3 class with the options with auth_type. Maybe other class names can be used, or more OOP-like design (but didn\u0027t want to over-engineer the tests).\nOr am I misunderstood you?","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"0a50d8d1594b7275bc6a210b90358f2e52e87e00","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            loading.get_auth_plugin_conf_options(\u0027password\u0027),"},{"line_number":645,"context_line":"            group\u003d\u0027designate\u0027)"},{"line_number":646,"context_line":""},{"line_number":647,"context_line":"    def test_insecure_client(self):"},{"line_number":648,"context_line":"        config.cfg.CONF.set_override(\u0027insecure\u0027,"},{"line_number":649,"context_line":"                                     True,"},{"line_number":650,"context_line":"                                     group\u003d\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a74a57a_32fede6b","line":647,"in_reply_to":"5a74a57a_6924e8ae","updated":"2016-11-30 19:42:58.000000000","message":"@Gyorgy,\n\nI was thinking of just adding 2 simple additional tests cases to this class, along the lines of: https://gist.github.com/miguellavalle/bc5a915674bc5d03c96134ba611b4f27. They explicitly test the code paths you added here: https://review.openstack.org/#/c/398359/5/neutron/services/externaldns/drivers/designate/driver.py@54. I ran both test cases successfully in my local system.\n\nI created the mocks in the test cases themselves for clarity. You might want to move them to setUp()","commit_id":"0523c62330b47e39d7967e6ca7bba88442acc80e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"7d5a568d352f68846330415e346cc0031f451198","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import uuid"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from keystoneauth1 import loading"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import mock"},{"line_number":21,"context_line":"import netaddr"},{"line_number":22,"context_line":"from neutron_lib import constants"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_bdf18e03","line":19,"updated":"2016-12-05 13:39:44.000000000","message":"no need for the new line","commit_id":"d9860cb4978b9fb0a9557a82514fa092076a75b4"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6cf3e4f841390204def87d2c4f6c28412ee2ce53","unresolved":false,"context_lines":[{"line_number":590,"context_line":"        driver.get_clients(self.TEST_CONTEXT)"},{"line_number":591,"context_line":"        self.driver_session.assert_called_with(verify\u003dself.TEST_CA_CERT)"},{"line_number":592,"context_line":""},{"line_number":593,"context_line":"    def test_auth_type_not_defined(self):"},{"line_number":594,"context_line":"        driver.get_clients(self.TEST_CONTEXT)"},{"line_number":595,"context_line":"        self.load_auth.assert_not_called()"},{"line_number":596,"context_line":"        self.password.assert_called_with("}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_61398f41","line":593,"updated":"2016-12-07 21:32:28.000000000","message":"Yes, the proper location for this test case is the Keystone V2 test class. Thanks","commit_id":"91d048dbde83a52f43aceebaf1b1e1ef0937602d"}]}
