Bugfix: yardstick env prepare cmd do not support other installer 79/34179/1
authorchenjiankun <chenjiankun1@huawei.com>
Thu, 27 Apr 2017 02:27:39 +0000 (02:27 +0000)
committerJing Lu <lvjing5@huawei.com>
Thu, 4 May 2017 01:02:25 +0000 (01:02 +0000)
commit6990400d9c020ed0f600e02141efec883593c6c6
tree189b61d1fd6f7f9a7950d9891db7b2ef38c73d2d
parenta87e2b84d683d10ebace26f4df7a8bbe8a801e60
Bugfix: yardstick env prepare cmd do not support other installer

JIRA: YARDSTICK-629

Currently yardstick env prepare do not support other installer.
I will add follow support:
1. Environment variable already exists: then do not fetch openrc file
and do not add EXTERNAL_NETWORK variable.
2. Already have openrc file in /etc/yardstick/openstack.creds: only
source this file in API.
3.Environment variable not exists and openrc file not in
/etc/yardstick/openstack.creds: fetch openrc file and append
EXTERNAL_NETWORK variable.

Change-Id: I4ce98f2e17ef8e0a0a1c33c3862ca301c53bb6c2
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
(cherry picked from commit 48ad9b5dfa80c8d05d07c6f7fa12d53deddcf3a2)
api/resources/env_action.py