Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_credential_file should search for auth endpoint #10

Closed
calebgroom opened this issue Feb 7, 2013 · 2 comments
Closed

set_credential_file should search for auth endpoint #10

calebgroom opened this issue Feb 7, 2013 · 2 comments

Comments

@calebgroom
Copy link

Setting region to 'LON' in ~/.pyrax.cfg will set pyrax.identity.auth_endpoint correctly. However, I believe this should be something that can be parsed from the file in pyrax.set_credential_file(). The auth endpoint seems like a natural fit with username and API key.

Is there a better way that doesn't require a user-wide setting like ~/.pyrax.cfg? The alternatives that I see don't feel as convenient as pyrax.set_credential_file().

@EdLeafe
Copy link
Contributor

EdLeafe commented Feb 8, 2013

There is a way, but I have to agree that it's not obvious. I envisioned people being in one or the other auth regions, but not switching. I'll add the option to specify region when setting credentials. But in the meantime you can do:

import pyrax
pyrax.set_default_region("LON")
# This will reset the auth endpoint
pyrax.create_identity()
pyrax.set_credential_files("pth/to/creds")

@EdLeafe
Copy link
Contributor

EdLeafe commented Feb 16, 2013

OK, I've pushed this change to the working branch. You can now optionally specify the parameter region="LON" in set_credentials(), set_credential_file(), and keyring_auth(). Let me know how this works for you.

EdLeafe added a commit that referenced this issue Feb 18, 2013
Also fixed an issue with multiple logger handlers being assigned to each client.
@EdLeafe EdLeafe closed this as completed May 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants