)]}'
{"swiftclient/client.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ddc4344735ad5b725feabd05acc09f2dd31f208","unresolved":false,"context_lines":[{"line_number":721,"context_line":"    cert_key \u003d kwargs.get(\u0027cert_key\u0027)"},{"line_number":722,"context_line":"    timeout \u003d kwargs.get(\u0027timeout\u0027, None)"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    if session:"},{"line_number":725,"context_line":"        service_type \u003d os_options.get(\u0027service_type\u0027, \u0027object-store\u0027)"},{"line_number":726,"context_line":"        interface \u003d os_options.get(\u0027endpoint_type\u0027, \u0027public\u0027)"},{"line_number":727,"context_line":"        region_name \u003d os_options.get(\u0027region_name\u0027)"},{"line_number":728,"context_line":"        storage_url \u003d session.get_endpoint(service_type\u003dservice_type,"},{"line_number":729,"context_line":"                                           interface\u003dinterface,"},{"line_number":730,"context_line":"                                           region_name\u003dregion_name)"},{"line_number":731,"context_line":"        token \u003d session.get_token()"},{"line_number":732,"context_line":"    elif auth_version in AUTH_VERSIONS_V1:"},{"line_number":733,"context_line":"        storage_url, token \u003d get_auth_1_0(auth_url,"},{"line_number":734,"context_line":"                                          user,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_8ff88149","line":731,"range":{"start_line":724,"start_character":0,"end_line":731,"end_character":35},"updated":"2020-03-17 17:03:21.000000000","message":"I\u0027d love to get more mileage out of this block","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"c90e698af1a729bca94b08d17be6ed4cf11ec69b","unresolved":false,"context_lines":[{"line_number":721,"context_line":"    cert_key \u003d kwargs.get(\u0027cert_key\u0027)"},{"line_number":722,"context_line":"    timeout \u003d kwargs.get(\u0027timeout\u0027, None)"},{"line_number":723,"context_line":""},{"line_number":724,"context_line":"    if session:"},{"line_number":725,"context_line":"        service_type \u003d os_options.get(\u0027service_type\u0027, \u0027object-store\u0027)"},{"line_number":726,"context_line":"        interface \u003d os_options.get(\u0027endpoint_type\u0027, \u0027public\u0027)"},{"line_number":727,"context_line":"        region_name \u003d os_options.get(\u0027region_name\u0027)"},{"line_number":728,"context_line":"        storage_url \u003d session.get_endpoint(service_type\u003dservice_type,"},{"line_number":729,"context_line":"                                           interface\u003dinterface,"},{"line_number":730,"context_line":"                                           region_name\u003dregion_name)"},{"line_number":731,"context_line":"        token \u003d session.get_token()"},{"line_number":732,"context_line":"    elif auth_version in AUTH_VERSIONS_V1:"},{"line_number":733,"context_line":"        storage_url, token \u003d get_auth_1_0(auth_url,"},{"line_number":734,"context_line":"                                          user,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_78e1442a","line":731,"range":{"start_line":724,"start_character":0,"end_line":731,"end_character":35},"in_reply_to":"1fa4df85_8ff88149","updated":"2020-03-18 03:32:43.000000000","message":"probably handle some sessions and new auth methods that provide form keystoneauth?","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e13110a03ec6008cee4137d1487886892e2c7ba1","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    pass"},{"line_number":71,"context_line":"try:"},{"line_number":72,"context_line":"    from keystoneclient.v3 import client as ksclient_v3"},{"line_number":73,"context_line":"    from keystoneauth1.identity import v3"},{"line_number":74,"context_line":"    from keystoneauth1 import session"},{"line_number":75,"context_line":"    from keystoneauth1 import exceptions as ksauthexceptions"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7f423b7e_44b702da","line":73,"range":{"start_line":73,"start_character":9,"end_line":73,"end_character":22},"updated":"2020-04-10 20:40:37.000000000","message":"Our minimum-supported keystoneclient is stupid-old (like, 0.7.0) and even that isn\u0027t strictly enforced (since it\u0027s an optional dep).\n\nThis led to us having these crazy import checks, and the exception getting raised around L617 when they fail (but only if you\u0027re actually trying to use keystone).\n\nIt *also* means that being able to import the v3 client won\u0027t be enough to guarantee that keystoneauth1 is available. I\u0027m slightly worried about someone trying to use this while still having an old (pre-2.0.0) keystoneclient installed and hitting a NameError... but then, that came out like 4 or 5 years ago. It\u0027s probably fine.","commit_id":"d818aa988fef19ab17a2c209f0ff1df18a362709"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"fab7e5f4cb14eafd5a9f0d11c9051f44396a60c2","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    pass"},{"line_number":71,"context_line":"try:"},{"line_number":72,"context_line":"    from keystoneclient.v3 import client as ksclient_v3"},{"line_number":73,"context_line":"    from keystoneauth1.identity import v3"},{"line_number":74,"context_line":"    from keystoneauth1 import session"},{"line_number":75,"context_line":"    from keystoneauth1 import exceptions as ksauthexceptions"},{"line_number":76,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_ef3514f9","line":73,"range":{"start_line":73,"start_character":9,"end_line":73,"end_character":22},"in_reply_to":"7f423b7e_44b702da","updated":"2020-04-15 06:06:26.000000000","message":"You\u0027re correct. I hit this problem when I used pythton-keystoneclient 1.8.1 that won\u0027t have a dependence for keystoneauth1 until you install  pythton-keystoneclient\u003e\u003d2.0.0\n\n$ swift stat -v\nTraceback (most recent call last):\n  File \"/Volumes/Data/charles/Work/SwiftStack/github/python-swiftclient-review/swiftclient/client.py\", line 74, in \u003cmodule\u003e\n    from keystoneauth1.identity import v3\nModuleNotFoundError: No module named \u0027keystoneauth1\u0027\n\nDuring handling of the above exception, another exception occurred:\n\n\nTry to catch the exception and raise a client error when it uses v3 module but it doesn\u0027t exist.\n\nMaybe force the requirement for pythton-keystoneclient\u003e\u003d2.0.0?","commit_id":"d818aa988fef19ab17a2c209f0ff1df18a362709"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4a52b8ea842dfe6dbf30147782de34c718c08544","unresolved":false,"context_lines":[{"line_number":639,"context_line":"                    \u0027application_credential_secret\u0027),"},{"line_number":640,"context_line":"                application_credential_id\u003dos_options.get("},{"line_number":641,"context_line":"                    \u0027application_credential_id\u0027))"},{"line_number":642,"context_line":"            sses \u003d session.Session(auth\u003dauth)"},{"line_number":643,"context_line":"            token \u003d sses.get_token()"},{"line_number":644,"context_line":"        except ksauthexceptions.Unauthorized:"},{"line_number":645,"context_line":"            msg \u003d \u0027Unauthorized. Check application credential id and secret.\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"1f493fa4_a1ccfa61","line":642,"range":{"start_line":642,"start_character":12,"end_line":642,"end_character":16},"updated":"2020-05-13 06:53:10.000000000","message":"nit: sess","commit_id":"02b637cdca6963e8dcab5170422347df99606f92"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"4a52b8ea842dfe6dbf30147782de34c718c08544","unresolved":false,"context_lines":[{"line_number":656,"context_line":"        except ksauthexceptions.EndpointNotFound:"},{"line_number":657,"context_line":"            raise ClientException("},{"line_number":658,"context_line":"                \u0027Endpoint for %s not found - \u0027"},{"line_number":659,"context_line":"                \u0027have you specified a region?\u0027 % service_type)"},{"line_number":660,"context_line":""},{"line_number":661,"context_line":"    try:"},{"line_number":662,"context_line":"        _ksclient \u003d ksclient.Client("}],"source_content_type":"text/x-python","patch_set":7,"id":"ff570b3c_b7ed228d","line":659,"updated":"2020-05-13 06:53:10.000000000","message":"Should we have a\n\n elif os_options.get(\u0027auth_type\u0027):\n     raise ClientException(...)\n\nhere, too, similar to what we did in shell.py?","commit_id":"02b637cdca6963e8dcab5170422347df99606f92"}],"swiftclient/shell.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ddc4344735ad5b725feabd05acc09f2dd31f208","unresolved":false,"context_lines":[{"line_number":1609,"context_line":"        return options, args"},{"line_number":1610,"context_line":""},{"line_number":1611,"context_line":"    if enforce_requires:"},{"line_number":1612,"context_line":"        if options[\u0027os_auth_type\u0027] \u003d\u003d \u0027v3applicationcredential\u0027:"},{"line_number":1613,"context_line":"            if not (options[\u0027os_application_credential_id\u0027] and"},{"line_number":1614,"context_line":"                    options[\u0027os_application_credential_secret\u0027]):"},{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_2f062d88","line":1612,"updated":"2020-03-17 17:03:21.000000000","message":"I don\u0027t quite like how we add a whole new option (with a heap of expected-to-be-supported values: https://github.com/openstack/keystoneauth/blob/3.18.0/setup.cfg#L41-L61) but only use it to check for one specific case. I\u0027d kind of prefer to just punt to keystoneauth to create a Session for us and go from there...\n\nI think it\u0027d also satisfy some other concerns I have: What if a user expects to be able to use --os-application-credential-name instead of --os-application-credential-id? How much more plumbing and special-casing will we need to support OIDC, or MFA? On the whole, I just *don\u0027t want to have to think* about auth, and I\u0027d rather have it be someone else\u0027s problem ;-)\n\nI\u0027ll play around with it a bit. Maybe this patch will work as a MVP for the CLI in the mean time? OTOH, it\u0027s adding more already-published options we need to ensure we\u0027re still compatible with as part of any transition...","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"c90e698af1a729bca94b08d17be6ed4cf11ec69b","unresolved":false,"context_lines":[{"line_number":1609,"context_line":"        return options, args"},{"line_number":1610,"context_line":""},{"line_number":1611,"context_line":"    if enforce_requires:"},{"line_number":1612,"context_line":"        if options[\u0027os_auth_type\u0027] \u003d\u003d \u0027v3applicationcredential\u0027:"},{"line_number":1613,"context_line":"            if not (options[\u0027os_application_credential_id\u0027] and"},{"line_number":1614,"context_line":"                    options[\u0027os_application_credential_secret\u0027]):"},{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_d840780a","line":1612,"in_reply_to":"1fa4df85_2f062d88","updated":"2020-03-18 03:32:43.000000000","message":"I saw there is a bunch of options to do auth in keystone, they might have another quest like this. I feel to move the auth to keystone auth is a good idea and just bypass that from swiftcleint, and then we just use the token to communicate with Swift cluster. \n\nIs something you want to add for this patch, or we can have another branch to handle that?","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ddc4344735ad5b725feabd05acc09f2dd31f208","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"        if options[\u0027os_auth_type\u0027] \u003d\u003d \u0027v3applicationcredential\u0027:"},{"line_number":1613,"context_line":"            if not (options[\u0027os_application_credential_id\u0027] and"},{"line_number":1614,"context_line":"                    options[\u0027os_application_credential_secret\u0027]):"},{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"},{"line_number":1616,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_ID and \u0027 +"},{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027 +"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_af121d57","line":1615,"range":{"start_line":1615,"start_character":73,"end_line":1615,"end_character":74},"updated":"2020-03-17 17:03:21.000000000","message":"nit: the explicit + isn\u0027t needed; you can just break the string up over multiple lines like\n\nexit(\u0027Auth version 3 (application credential) requires \u0027\n     \u0027OS_APPLICATION_CREDENTIAL_ID and \u0027\n     ...)","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"c90e698af1a729bca94b08d17be6ed4cf11ec69b","unresolved":false,"context_lines":[{"line_number":1612,"context_line":"        if options[\u0027os_auth_type\u0027] \u003d\u003d \u0027v3applicationcredential\u0027:"},{"line_number":1613,"context_line":"            if not (options[\u0027os_application_credential_id\u0027] and"},{"line_number":1614,"context_line":"                    options[\u0027os_application_credential_secret\u0027]):"},{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"},{"line_number":1616,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_ID and \u0027 +"},{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027 +"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and\u0027 +"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_5891e898","line":1615,"range":{"start_line":1615,"start_character":73,"end_line":1615,"end_character":74},"in_reply_to":"1fa4df85_af121d57","updated":"2020-03-18 03:32:43.000000000","message":"Done","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"5ddc4344735ad5b725feabd05acc09f2dd31f208","unresolved":false,"context_lines":[{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"},{"line_number":1616,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_ID and \u0027 +"},{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027 +"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and\u0027 +"},{"line_number":1619,"context_line":"                     \u0027--os-application-credential-secret respectively.\u0027)"},{"line_number":1620,"context_line":"        elif options[\u0027auth_version\u0027] \u003d\u003d \u00273\u0027:"},{"line_number":1621,"context_line":"            if not options[\u0027auth\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_4b16fe57","line":1618,"range":{"start_line":1618,"start_character":69,"end_line":1618,"end_character":72},"updated":"2020-03-17 17:03:21.000000000","message":"Needs a trailing space or it runs together.","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"c90e698af1a729bca94b08d17be6ed4cf11ec69b","unresolved":false,"context_lines":[{"line_number":1615,"context_line":"                exit(\u0027Auth version 3 (application credential) requires \u0027 +"},{"line_number":1616,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_ID and \u0027 +"},{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027 +"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and\u0027 +"},{"line_number":1619,"context_line":"                     \u0027--os-application-credential-secret respectively.\u0027)"},{"line_number":1620,"context_line":"        elif options[\u0027auth_version\u0027] \u003d\u003d \u00273\u0027:"},{"line_number":1621,"context_line":"            if not options[\u0027auth\u0027]:"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_f880d448","line":1618,"range":{"start_line":1618,"start_character":69,"end_line":1618,"end_character":72},"in_reply_to":"1fa4df85_4b16fe57","updated":"2020-03-18 03:32:43.000000000","message":"Done","commit_id":"044e3bc65c0e183765f9b078b8235758a71c9962"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"e13110a03ec6008cee4137d1487886892e2c7ba1","unresolved":false,"context_lines":[{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and \u0027"},{"line_number":1619,"context_line":"                     \u0027--os-application-credential-secret respectively.\u0027)"},{"line_number":1620,"context_line":"        elif options[\u0027auth_version\u0027] \u003d\u003d \u00273\u0027:"},{"line_number":1621,"context_line":"            if not options[\u0027auth\u0027]:"},{"line_number":1622,"context_line":"                exit(\u0027Auth version 3 requires OS_AUTH_URL to be set or \u0027"},{"line_number":1623,"context_line":"                     \u0027overridden with --os-auth-url\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f423b7e_24cbd61e","line":1620,"updated":"2020-04-10 20:40:37.000000000","message":"Might want an\n\n elif options[\u0027os_auth_type\u0027]:\n     exit(\u0027Only v3applicationcredential is supported for --os-auth-type\u0027)\n\n? Though, if it came from an env var that might be rather annoying...\n\nI just don\u0027t like that users might (quite reasonably) try something like\n\n swift stat --os-auth-type v3password --os-project-name test \\\n   --os-username tester --os-auth-url http://localhost\n\nand we\u0027ll default to trying v2 auth :-/","commit_id":"d818aa988fef19ab17a2c209f0ff1df18a362709"},{"author":{"_account_id":12050,"name":"Charles Hsu","email":"charles0126@gmail.com","username":"charz"},"change_message_id":"fab7e5f4cb14eafd5a9f0d11c9051f44396a60c2","unresolved":false,"context_lines":[{"line_number":1617,"context_line":"                     \u0027OS_APPLICATION_CREDENTIAL_SECRET to be set or \u0027"},{"line_number":1618,"context_line":"                     \u0027overridden with --os-application-credential-id and \u0027"},{"line_number":1619,"context_line":"                     \u0027--os-application-credential-secret respectively.\u0027)"},{"line_number":1620,"context_line":"        elif options[\u0027auth_version\u0027] \u003d\u003d \u00273\u0027:"},{"line_number":1621,"context_line":"            if not options[\u0027auth\u0027]:"},{"line_number":1622,"context_line":"                exit(\u0027Auth version 3 requires OS_AUTH_URL to be set or \u0027"},{"line_number":1623,"context_line":"                     \u0027overridden with --os-auth-url\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4c43b2_6f73c4e8","line":1620,"in_reply_to":"7f423b7e_24cbd61e","updated":"2020-04-15 06:06:26.000000000","message":"I forgot this case, thx! I\u0027ll fix that.","commit_id":"d818aa988fef19ab17a2c209f0ff1df18a362709"}]}
