Add API to update openrc variable 07/34807/6
authorchenjiankun <chenjiankun1@huawei.com>
Tue, 16 May 2017 01:59:06 +0000 (01:59 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Sat, 24 Jun 2017 02:16:10 +0000 (02:16 +0000)
commit674a9902d40aef9a4c80669a0d00fc47447a806e
tree2796b0f5f3661f9bae95ff0805cd0becaf8ace5d
parent417df8187c1ddb04066409db6b2360b85c894b65
Add API to update openrc variable

JIRA: YARDSTICK-651

Currently we source openrc variable manually or use yardstick env
prepare to get openrc file.
We need API to update the openrc variable.

api: /yardstick/env/action
description: source environment variable
method: POST

parameters:
{
    'action': 'update_openrc',
    'args':{
        'openrc': {
            'OS_USERNAME': 'admin',
            'OS_PASSWORD': 'console',
            'OS_TENANT_NAME': 'admin',
            'OS_AUTH_URL': 'http://192.168.131.222:5000/v2.0',
            'EXTERNAL_NETWORK': 'ext-net'
        }
    }
}

Change-Id: I680a7249116c8ff0c1a9e7d5089538d935240c80
Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
api/resources/env_action.py
yardstick/common/constants.py