Ask Your Question
0

Swift in Kilo - difference between --os-tenant-name and --os-project-name

asked 2016-02-25 08:38:50 -0600

rozie gravatar image

updated 2016-02-26 03:43:55 -0600

I noticed that swift accepts two different parameters --os-tenant-name and --os-project-name. AFAIK they mean the same thing (please correct me if I'm wrong), just there's migration between name tenant and project in Kilo (depending on API version). I noticed, that setting one of the parameters (--os-tenant-name) does not influence the other. I wonder, if there's any good reason for this? If not, I believe I should report the bug - both variables should be set to the same value, if one is set...

Ubuntu 14.04 LTS, swift version 2.3.1

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2016-02-25 15:24:10 -0600

updated 2016-02-25 15:24:38 -0600

Hi Rozie,

It is because the change from identity api v2 to v3 and the introduction of python-openstackclient, you can still use tenant for older api versions. This change is common to all OpenStack services, you can see in the output of swift --help how in auth version 2.0 uses tenant-name and in auth version 3 uses project-name:

  swift --os-auth-url https://api.example.com/v2.0 --os-tenant-name tenant \
      --os-username user --os-password password list

  swift --os-auth-url https://api.example.com/v3 --auth-version 3\
      --os-project-name project1 --os-project-domain-name domain1 \
      --os-username user --os-user-domain-name domain1 \
      --os-password password list
  • In keystone v2 and python-keystoneclient we have tenants as an identity object.
  • In keystone v3 and python-openstackclient we have project as an identity object.

As docs says: http://docs.openstack.org/developer/python-openstackclient/man/openstack.html#authentication-methods

Openstack uses a similar authentication scheme as the OpenStack project CLIs, with the credential information supplied either as environment variables or as options on the command line. The primary difference is the use of ‘project’ in the name of the options OS_PROJECT_NAME/OS_PROJECT_ID over the old tenant-based names.

Regards

edit flag offensive delete link more

Comments

OK, so it looks that swift accepts the same variable through two separate parameters. And does not merge them internally. I believe it should accept both versions of parameter name, but pass the right value, depending only on API version. Am I right?

Lost some time using v3 API and old howto...

rozie gravatar imagerozie ( 2016-02-26 02:27:29 -0600 )edit

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: 2016-02-25 08:38:50 -0600

Seen: 584 times

Last updated: Feb 25 '16