aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/python_moonclient/tests/unit_python/mock_config.py
diff options
context:
space:
mode:
authorRHE <rebirthmonkey@gmail.com>2017-12-21 10:06:52 +0100
committerThomas Duval <thomas.duval@orange.com>2017-12-21 10:33:15 +0100
commit8b326a5aeb0f9655ff0ebfe0d87ff1ea8f66bc38 (patch)
tree16f319475de8f256914e18a6be0183b48ccc692a /moonv4/python_moonclient/tests/unit_python/mock_config.py
parenta7f99c33c0b2b2c617dd044e658a263ae910b53a (diff)
python_moonclient init
Change-Id: Iaf104b3208a07dc80cc266830be444d019b0f196 Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moonv4/python_moonclient/tests/unit_python/mock_config.py')
-rw-r--r--moonv4/python_moonclient/tests/unit_python/mock_config.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/moonv4/python_moonclient/tests/unit_python/mock_config.py b/moonv4/python_moonclient/tests/unit_python/mock_config.py
new file mode 100644
index 00000000..a3084485
--- /dev/null
+++ b/moonv4/python_moonclient/tests/unit_python/mock_config.py
@@ -0,0 +1,35 @@
+import utilities
+
+
+components_manager_mock = {
+ "port": 8082,
+ "bind": "0.0.0.0",
+ "hostname": "manager",
+ "container": "wukongsun/moon_manager:v4.3.1",
+ "external": {
+ "port": 30001,
+ "hostname": "88.88.88.2"
+ }
+}
+
+
+openstack_keystone_mock = {
+ "url": "http://keystone:5000/v3",
+ "user": "admin",
+ "password": "p4ssw0rd",
+ "domain": "default",
+ "project": "admin",
+ "check_token": False,
+ "certificate": False,
+ "external": {
+ "url": "http://88.88.88.2:30006/v3"
+ }
+}
+
+
+def register_consul(m):
+ for component in utilities.COMPONENTS:
+ m.register_uri(
+ 'GET', 'http://consul:8500/v1/kv/{}'.format(component),
+ json=[{'Key': component, 'Value': utilities.get_b64_conf(component)}]
+ )