Ask Your Question

Unable to change environment Variables for demo or admin tenant during runtime

asked 2016-03-12 19:52:27 -0500

Umar Usaf gravatar image

updated 2016-03-15 12:22:00 -0500

Unable to set Environment variables like OS_USERNAME, OS_PASSWORD, OS_TENANT_NAME, OS_REGION_NAME, OS_AUTH_URL during runtime through for example os.system("source openrc demo demo") ,in order to run commands for demo project like ceilometer event-list. Actually I am unable to get demo's ceilometer events from admin credentials set and could not change to demo credentials in my logic.

Instead getting error sh: 1: source: not found on executing source openrc demo demo command

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-03-12 21:42:07 -0500

Bipin gravatar image

Create a file with following content and name it adminrc

export LC_ALL=C
export OS_NO_CACHE='true'
export OS_TENANT_NAME='admin'
export OS_USERNAME='admin'
export OS_PASSWORD='yourpassword'
export OS_AUTH_URL='http://controllerip:5000/v2.0/'
export OS_AUTH_STRATEGY='keystone'
export OS_REGION_NAME='RegionOne'
export NOVA_ENDPOINT_TYPE='internalURL'
export OS_ENDPOINT_TYPE='internalURL'

Save the file.

source adminrc

Now you will get admin access. Is this you are looking for ?

edit flag offensive delete link more


I know this way you can set credentials either for admin or demo but during run time of an application, I could not do this and I am getting error sh:1 source not found. I wana do this in order to get ceilometer events for demo as well as admin tenant.

Umar Usaf gravatar imageUmar Usaf ( 2016-03-13 07:24:04 -0500 )edit

could you please tell the exact command line you are trying ?

Bipin gravatar imageBipin ( 2016-03-13 09:29:30 -0500 )edit

@Bipin I am changing my directory to devstack and then using openrc file to get required credentials through source openrc demo demo but I dont know why could not able to change the credentials from their initial value i.e admin to demo and getting error sh:1: source: not found

Umar Usaf gravatar imageUmar Usaf ( 2016-03-13 10:46:56 -0500 )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


Asked: 2016-03-12 19:52:27 -0500

Seen: 171 times

Last updated: Mar 15 '16