)]}'
{"ironicclient/client.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1c8966cdc1be7a2e12d738da1548c74098922b72","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":47,"context_line":"            attr\u003d\u0027region\u0027,"},{"line_number":48,"context_line":"            filter_value\u003dkwargs.get(\u0027region_name\u0027),"},{"line_number":49,"context_line":"            endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"},{"line_number":50,"context_line":"    return client.service_catalog.url_for("},{"line_number":51,"context_line":"        service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":52,"context_line":"        endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_41c82022","line":49,"updated":"2014-09-11 21:45:11.000000000","message":"instead of making two different calls to client.service_catalog.url_for(), I suggest that before this if, you have:\n    attr \u003d None\n    filter_value \u003d None\n\nAnd instead of this call, set attr \u003d \u0027region\u0027 and filter_value \u003d kwargs...\n\nAnd then in the call itself, add attr\u003dattr, filter_value\u003dfilter_value.\n\nHaving written all this, I have a question: I am not familiar with the keystone client code, so maybe this is the wrong method, but if it is the right one, it has a \u0027region_name\u0027 parameter [1]. I don\u0027t actually know what the attr and filter_value parameters do, so would you please explain why you are using attr and filter_value, instead of region_name parameter?\n\n[1] https://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/service_catalog.py#L191","commit_id":"8260fe25140e2d9e8a2dd2bbdad2efaab2bb6cc8"},{"author":{"_account_id":11424,"name":"Rakesh H S","email":"rakeshhs1@gmail.com","username":"rakesh"},"change_message_id":"61bb92904f587795df26cdd1b2ec1338e561828d","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":47,"context_line":"            attr\u003d\u0027region\u0027,"},{"line_number":48,"context_line":"            filter_value\u003dkwargs.get(\u0027region_name\u0027),"},{"line_number":49,"context_line":"            endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"},{"line_number":50,"context_line":"    return client.service_catalog.url_for("},{"line_number":51,"context_line":"        service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":52,"context_line":"        endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_5ceff7e8","line":49,"in_reply_to":"fa98f980_41c82022","updated":"2014-09-14 14:22:53.000000000","message":"we could use, region_name, but I went with the already used code in keystoneclient:\n\ni.e, in Keystone CLI we can get endpoint using the following command:\n--------------------------------------------\n$ keystone help endpoint-get\nusage: keystone endpoint-get --service \u003cservice-type\u003e\n                             [--endpoint-type \u003cendpoint-type\u003e]\n                             [--attr \u003cservice-attribute\u003e] [--value \u003cvalue\u003e]\n\nFind endpoint filtered by a specific attribute or service type.\n\nArguments:\n  --service \u003cservice-type\u003e\n                        Service type to select.\n  --endpoint-type \u003cendpoint-type\u003e\n                        Endpoint type to select.\n  --attr \u003cservice-attribute\u003e\n                        Service attribute to match for selection.\n  --value \u003cvalue\u003e       Value of attribute to match.\n$\n$\n$ keystone endpoint-get --service baremetal --attr region --value RegionOne --endpoint-type publicURL\n+---------------------+----------------------------+\n|       Property      |           Value            |\n+---------------------+----------------------------+\n| baremetal.publicURL | http://192.168.38.129:6385 |\n+---------------------+----------------------------+\n$\n----------------------------------------------------\nand the code in keystone client is similar to what we are trying to use here:\nhttps://github.com/openstack/python-keystoneclient/blob/master/keystoneclient/v2_0/shell.py#L471-L496","commit_id":"8260fe25140e2d9e8a2dd2bbdad2efaab2bb6cc8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1d41d6c2660afc055a84093ce9a8884306b5982a","unresolved":false,"context_lines":[{"line_number":46,"context_line":"            service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":47,"context_line":"            attr\u003d\u0027region\u0027,"},{"line_number":48,"context_line":"            filter_value\u003dkwargs.get(\u0027region_name\u0027),"},{"line_number":49,"context_line":"            endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"},{"line_number":50,"context_line":"    return client.service_catalog.url_for("},{"line_number":51,"context_line":"        service_type\u003dkwargs.get(\u0027service_type\u0027) or \u0027baremetal\u0027,"},{"line_number":52,"context_line":"        endpoint_type\u003dkwargs.get(\u0027endpoint_type\u0027) or \u0027publicURL\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_2b7495cd","line":49,"in_reply_to":"fa98f980_5ceff7e8","updated":"2014-09-15 14:58:13.000000000","message":"fair enough. I think it might be more efficient and easier-to-understand, to set the region_name parameter but this works too and I\u0027m guessing there aren\u0027t that many urls so looping through them again to filter shouldn\u0027t be a problem ;)","commit_id":"8260fe25140e2d9e8a2dd2bbdad2efaab2bb6cc8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"1c8966cdc1be7a2e12d738da1548c74098922b72","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                 else _ksclient.auth_token)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if kwargs.get(\u0027os_region_name\u0027):"},{"line_number":96,"context_line":"            ks_kwargs[\u0027region_name\u0027] \u003d kwargs.get(\u0027os_region_name\u0027)"},{"line_number":97,"context_line":"        endpoint \u003d kwargs.get(\u0027ironic_url\u0027) or \\"},{"line_number":98,"context_line":"            _get_endpoint(_ksclient, **ks_kwargs)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_81ce882b","line":96,"updated":"2014-09-11 21:45:11.000000000","message":"instead of this, you should be able to add this to ks_kwargs, after eg line 88.","commit_id":"8260fe25140e2d9e8a2dd2bbdad2efaab2bb6cc8"},{"author":{"_account_id":11424,"name":"Rakesh H S","email":"rakeshhs1@gmail.com","username":"rakesh"},"change_message_id":"61bb92904f587795df26cdd1b2ec1338e561828d","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                 else _ksclient.auth_token)"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"        if kwargs.get(\u0027os_region_name\u0027):"},{"line_number":96,"context_line":"            ks_kwargs[\u0027region_name\u0027] \u003d kwargs.get(\u0027os_region_name\u0027)"},{"line_number":97,"context_line":"        endpoint \u003d kwargs.get(\u0027ironic_url\u0027) or \\"},{"line_number":98,"context_line":"            _get_endpoint(_ksclient, **ks_kwargs)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa98f980_7cbd9bb0","line":96,"in_reply_to":"fa98f980_81ce882b","updated":"2014-09-14 14:22:53.000000000","message":"Done","commit_id":"8260fe25140e2d9e8a2dd2bbdad2efaab2bb6cc8"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"188aa13c28f5807747e0858bff6995422de86799","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            * os_username: name of user"},{"line_number":66,"context_line":"            * os_password: user\u0027s password"},{"line_number":67,"context_line":"            * os_auth_url: endpoint to authenticate against"},{"line_number":68,"context_line":"            * insecure: allow insecure SSL (no cert verification)"},{"line_number":69,"context_line":"            * os_tenant_{name|id}: name or ID of tenant"},{"line_number":70,"context_line":"    \"\"\""},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa98f980_33424bab","line":68,"updated":"2014-09-15 16:24:25.000000000","message":"nit: would be good to add os_region_name here","commit_id":"fa2b68ed4e5dad285af1ec9fddc6ee1527c2004e"}]}
