aboutsummaryrefslogtreecommitdiffstats
path: root/app/test/api/responders_test/test_data/aggregates.py
diff options
context:
space:
mode:
authorYaron Yogev <yaronyogev@gmail.com>2017-07-27 09:02:54 +0300
committerYaron Yogev <yaronyogev@gmail.com>2017-07-27 14:56:25 +0300
commit7e83d0876ddb84a45e130eeba28bc40ef53c074b (patch)
tree47d76239ae7658d87c66abd142df92709427e7dd /app/test/api/responders_test/test_data/aggregates.py
parent378ecbd8947589b9cbb39013a0c2e2aa201e03bd (diff)
Calipso initial release for OPNFV
Change-Id: I7210c244b0c10fa80bfa8c77cb86c9d6ddf8bc88 Signed-off-by: Yaron Yogev <yaronyogev@gmail.com>
Diffstat (limited to 'app/test/api/responders_test/test_data/aggregates.py')
-rw-r--r--app/test/api/responders_test/test_data/aggregates.py67
1 files changed, 67 insertions, 0 deletions
diff --git a/app/test/api/responders_test/test_data/aggregates.py b/app/test/api/responders_test/test_data/aggregates.py
new file mode 100644
index 0000000..52ce985
--- /dev/null
+++ b/app/test/api/responders_test/test_data/aggregates.py
@@ -0,0 +1,67 @@
+###############################################################################
+# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) #
+# and others #
+# #
+# All rights reserved. This program and the accompanying materials #
+# are made available under the terms of the Apache License, Version 2.0 #
+# which accompanies this distribution, and is available at #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+###############################################################################
+URL = "/aggregates"
+
+CONSTANT_TYPE = "constant"
+ENV_TYPE = "environment"
+MESSAGE_TYPE = "message"
+UNKNOWN_TYPE = "unknown"
+
+CONSTANT_AGGREGATES = [
+ {"name": "type_drivers", "total": 5},
+ {"name": "environment_monitoring_types", "total": 1},
+ {"name": "link_states", "total": 2}
+]
+ENVIRONMENT_AGGREGATES = [
+ {'_id': 'otep', 'total': 3},
+ {'_id': 'instance', 'total': 2},
+ {'_id': 'network_agent', 'total': 6}
+]
+MESSAGE_ENV_AGGREGATES = [
+ {'_id': 'Mirantis-Liberty-API', 'total': 15}
+]
+MESSAGE_LEVEL_AGGREGATES = [
+ {'_id': 'info', 'total': 15}
+]
+
+CONSTANT_AGGREGATES_RESPONSE = {
+ "type": "constant",
+ "aggregates": {
+ "names": {
+ "type_drivers": 5,
+ "environment_monitoring_types": 1,
+ "link_states": 2
+ }
+ }
+ }
+
+ENVIRONMENT_AGGREGATES_RESPONSE = {
+ "aggregates": {
+ "object_types": {
+ "otep": 3,
+ "instance": 2,
+ "network_agent": 6
+ }
+ },
+ "env_name": "Mirantis-Liberty-API",
+ "type": "environment"
+}
+
+MESSAGE_AGGREGATES_RESPONSE = {
+ "aggregates": {
+ "environments": {
+ "Mirantis-Liberty-API": 15
+ },
+ "levels": {
+ "info": 15
+ }
+ },
+ "type": "message"
+ }