python-openstackclient token scope issue for user/domain

asked 2016-02-01 15:27:39 -0500

Satixx gravatar image

Hi,

first of all, sorry for the long post. Please bear with me!

I've been working on a keystone stack (standalone) and I'm having trouble issuing a token for a user/domain pair through the Openstackclient's CLI, even though issuing a token for a user/project works.

I'm using:

  • CentOS 7.2.1511
  • keystone 2015.1.1 (keystone-all --version)
  • python-openstackclient 1.0.3 (yum info python-openstackclient)

Here is an example of what I'm trying to achieve (admin/admin superuser added previously). This works:

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 project create test_project

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 user create --project test_project --password test_project_user test_project_user

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 role add --project test_project --user test_project_user admin

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name test_project --os-username test_project_user --os-password test_project_user --os-identity-api-version 3 token issue

So I create a user called "test_project_user" as "admin" in a project called "test_project", then issue a token and everything works.


When I try to do the same with a domain instead of a project:

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 domain create test_domain

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 user create --domain test_domain --password test_domain_user test_domain_user

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-project-name admin --os-username admin --os-password admin --os-identity-api-version 3 role add --domain test_domain --user test_domain_user admin

openstack --os-auth-url http://127.0.0.1:35357/v3/ --os-domain-name test_domain --os-username test_domain_user --os-password test_domain_user --os-identity-api-version 3 token issue

So I create a user called "test_domain_user" as "admin" in a domain called "test_domain", then issue a token and receive the following error on the last command:

Missing parameter(s): Set a scope, such as a project or domain, set a project scope with --os-project-name, OS_PROJECT_NAME or auth.project_name, set a domain scope with --os-domain-name, OS_DOMAIN_NAME or auth.domain_name

I've tried both --os-domain-name and OS_DOMAIN_NAME, but I just can't seem to set a domain scope. Is there something I'm missing or would you know of any reported issue with the Openstack Client regarding this?

I will be grateful for any help you can provide!

Small edit: Formatting

edit retag flag offensive close merge delete