-
Notifications
You must be signed in to change notification settings - Fork 210
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
Can't set identity_class based in the identity_type through OS environment variables #82
Comments
Based on the line number you quoted, it looks like you're not on the latest release. The current version is 1.4.2, which fixed several issues relating to the handling of the default environment when no configuration file is defined. Can you upgrade to the latest and see if that corrects your issues? |
Having similar problem, and I double checked my version it's 1.4.3 File "/home/tolo/Projects/yosilo.se/yosilose/core/storage.py", line 17, in connect Any clues? It was working till last update, if it helps |
@toloco: Please be sure to check https://github.com/rackspace/pyrax/blob/master/docs/pyrax_doc.md#set-up-authentication Basically, you have a few options such as placing |
How are you defining the identity class? Are you using a configuration file, an environment variable, or setting it manually, as described in the docs? Versions prior to 1.4 only supported Rackspace identity, so this was not required. Now that pyrax supports any identity service, it is necessary to at least define which type you are using. |
I already set identity_type and its working, how should I proceed? It looks like a patch |
If this is just a temporary script, then setting the |
@EdLeafe I'm using 1.4.3 now and I had the same problem: you don't set the identity_class when identity_type comes from os.environ (and I checked the environ, the var is here). This way, the option 2 in the docs (as suggested by @sivel) cannot be applied. You also aren't using the default values unless a config file is defined with a default section. |
@michelts Ah! Thanks - I see the issue now. I'll get out a fix for reading the |
OK, this should be fixed in 1.4.4. Please update and let me know if you have any further issues. |
Hi,
I'm trying to use django-cumulus with pyrax and novaclient without success.
The error raised is:
IdentityClassNotDefined at ...
No identity class has been defined for the current environment.
In the issue #79, @mlew comments he need to set the identity_type in code. I did it and it worked, but I don't want to change cumulus or my code to include it.
In fact, I read the pyrax code and note that the set method for settings changes the identity_class when the identity_type is changed (pyrax/init.py:166) but for the default environment, this settings param would never be set and I will never fall in the default rackspace identity_type, consequently, the rax_identity.RaxIdentity.
I try to set it through config files without success but I must admit, I didn't try enough. I want to use OS env variables as they are easier to set in my uWSGI deployment.
I can't set the identity_class through OS env variables and if I set identity_type, it will work as a default, it will never pass through the set method and this way, will never update the identity_class.
In fact, there is a default_identity_type/region/encoding but they aren't used until read_config is called, IF I set a config file (something I want to avoid).
Well, this is what I could dig up first time :)
I don't feel secure to fix it myself until work a little more with the lib, this is the first time with pyrax. Anyway, anything I could help just tell me!
The text was updated successfully, but these errors were encountered: