Files
js-openstack-lib/test/functional/helpers/cloudsConfig.js
Corentin Ardeois bf8deba64e Add functional tests for devstack gate
This patch adds 'functional' tests that will be run by DSVM gate.
A 'cloudsConfig.js' file reads 'clouds.yaml' and converts it to json.
'clouds.yaml' file is searched from the following locations:
 - current directory
 - ~/.config/openstack
 - /etc/openstack
The first file found wins.

For browser, webpack uses a 'yaml' loader and rewrites
'helper/cloudsConfig.js' requirement to 'json!yaml!clouds.yaml'.

A dummy test has been added to demonstrate use of devstack config.

Change-Id: I55909862c70a4cbe22b2820e51c2969d68d8154a
2016-08-05 13:27:17 -04:00

9 lines
218 B
JavaScript

/*eslint no-sync: "off"*/
import yaml from 'js-yaml';
import fs from 'fs';
import cloudsYamlPath from './cloudsYamlPath';
const clouds = yaml.safeLoad(fs.readFileSync(cloudsYamlPath, 'utf8'));
export default clouds;