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

Error calling nova, glance with v3 authentication #512

Closed
sjpatil opened this issue Nov 24, 2015 · 5 comments
Closed

Error calling nova, glance with v3 authentication #512

sjpatil opened this issue Nov 24, 2015 · 5 comments

Comments

@sjpatil
Copy link

sjpatil commented Nov 24, 2015

Hi,
I am using openstack4j 2.0.2 with httpclient. All operations work properly with v2 auth but when I got for v3 I am getting errors.

OSClient os = OSFactory.builderV3().endpoint("http://myopenstack:5000/v3").domainName("d1").credentials("u1", "****").authenticate();

When I try to get supported service types from os client , it throws null pointer -
http://pastie.org/10577255#2

When called flavor list API or any other API, It shows -
http://pastie.org/10577259

Authenticate API returns token Id this means authentication is happening properly but somehow it is not able to communicate with other services.

With this version authentication API I even do not see option to specify project name/Id to get project scoped tokens

Using openstack4j snapshot 2.10 with HTTPClient I can execute APIs with project scoped tokens, However I am not able to authenticate with domain scope

Note: I have tried all these APIs with v3 token through curl and found them working fine.

@rski
Copy link

rski commented Nov 24, 2015

Hi @sjpatil,

I think your issue might be related to this:
https://github.com/gondor/openstack4j/issues/478

In any case, the V3 API is not fully implemented in openstack4j so you would be quite limited in what you can do with it.

@sjpatil
Copy link
Author

sjpatil commented Nov 24, 2015

Hi rski,

So is there fix available for this?
Using openstack4j snapshot 2.10 with HTTPClient I can execute APIs with project scoped tokens, However I am not able to authenticate with domain scope

@auhlig
Copy link
Member

auhlig commented Nov 26, 2015

Hi,
We're currently working on Identity V3 for OpenStack4j.
For now only authentication is supported in the V3 case. More Identity V3 is in progress.
V3 authentication in OpenStack4j 2.0.9 needs a project-or domain- scope.
In your case you want to use it that way:

OSClient os = OSFactory.builderV3()
                .endpoint("http://myopenstack:5000/v3")
                .credentials("USERNAME", "PASSWORD", Identifier.byId("PROJECT_DOMAIN_ID"))
                .scopeToDomain(Identifier.byId(DOMAIN_ID))
                .authenticate()

or

OSClient os = OSFactory.builderV3()
                .endpoint("http://myopenstack:5000/v3")
                .credentials("USER_ID", "PASSWORD")
                .scopeToDomain(Identifier.byId("DOMAIN_ID"))
                .authenticate());

@sjpatil
Copy link
Author

sjpatil commented Dec 4, 2015

Ok Thanks,
Could you let me know by when this v3 support will be available at least in snapshot version?

@vinodborole
Copy link
Contributor

@sjpatil please reopen if this issue still exists for u

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

4 participants