Ask Your Question
0

keystone api project problem need your help

asked 2018-11-08 12:32:52 -0600

sgalfonso gravatar image

Hi ALL :)

I'm using PHPOpenCloud API in order to create a new Project. My OpenStack installation is empty, there are no projects only its Default domain.

In order I can issue an API command, I need to create an identityV3 instance, so I issue:

$openstack = new OpenStack([ 'authUrl' => 'http://192.168.4.6:5000/v3', 'region' => 'RegionOne', 'user' => [ 'id' => $user_id, 'password' => $password, ], 'scope' => [ 'domain' => [ 'id' => $domain->openstack_id ] ]; ]);

$project = $api->createProject([ 'enabled' => True, 'name' => $name, 'description' => $description, 'domainId' => $domain->openstack_id, ]);

But it throws me: Call to a member function getServiceUrl() on null in ../php-opencloud/openstack/src/Identity/v3/Service.php

This never happens if I instance identityV3 with:

$this->openstack = new OpenStack([ 'authUrl' => 'http://192.168.4.6:5000/v3', 'region' => 'RegionOne', 'user' => [ 'id' => $user_id, 'password' => $password, ], 'scope' => [ 'project' => [ 'id' => $project->openstack_id ] ]; ]);

... but, of course, I don't have any project yet!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-11-09 10:58:25 -0600

The PHPOpenCloud API is not part of the Keystone project, so I can't say what it is doing, buit it looks like it wants an project prior to any operation, and you are getting an unscoped token instead. You might need to make a direct call to the Keystone API to create the initial project, or the PHP library might have a different API you use to create the initial project.

Probably what is happening is that the unscoped token does not provide a service catalog, and the createProject API is using the catalog to try and find the identity service. That is one of the reasons for this feature: https://review.openstack.org/#/c/607346/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2018-11-08 12:32:52 -0600

Seen: 22 times

Last updated: Nov 09