Feature 8720: instantiate parameters config-units
[osm/NBI.git] / osm_nbi / tests / pmjob_mocks / response.py
1 # Copyright 2019 Preethika P(Tata Elxsi)
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12 # implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 __author__ = "Preethika P,preethika.p@tataelxsi.co.in"
17
18 """Excepted results for pmjob functions and prometheus"""
19
20
21 show_res = """
22 ---
23 entries:
24 - objectInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
25 performanceMetric: osm_users
26 performanceValue:
27 performanceValue:
28 performanceValue: '1'
29 vduName: test_metric-1-ubuntuvdu1-1
30 vnfMemberIndex: '1'
31 timestamp: 1573552141.409
32 - objectInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
33 performanceMetric: osm_cpu_utilization
34 performanceValue:
35 performanceValue:
36 performanceValue: '0.7622979249'
37 vduName: test_metric-1-ubuntuvdu1-1
38 vnfMemberIndex: '1'
39 timestamp: 1573556383.439
40 - objectInstanceId: f48163a6-c807-47bc-9682-f72caef5af85
41 performanceMetric: osm_load
42 performanceValue:
43 performanceValue:
44 performanceValue: '0'
45 vduName: test_metric-1-ubuntuvdu1-1
46 vnfMemberIndex: '1'
47 timestamp: 1573552060.035
48 """
49 prom_res = """
50 ---
51 - - metric:
52 __name__: osm_users
53 instance: mon:8000
54 job: prometheus
55 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
56 vdu_name: test_metric-1-ubuntuvdu1-1
57 vnf_member_index: '1'
58 value:
59 - 1573552141.409
60 - '1'
61 - - metric:
62 __name__: osm_load
63 instance: mon:8000
64 job: prometheus
65 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
66 vdu_name: test_metric-1-ubuntuvdu1-1
67 vnf_member_index: '1'
68 value:
69 - 1573552060.035
70 - '0'
71 - - metric:
72 __name__: osm_cpu_utilization
73 instance: mon:8000
74 job: prometheus
75 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
76 vdu_name: test_metric-1-ubuntuvdu1-1
77 vnf_member_index: '1'
78 value:
79 - 1573556383.439
80 - '0.7622979249'
81 """
82 cpu_utilization = """
83 ---
84 status: success
85 data:
86 resultType: vector
87 result:
88 - metric:
89 __name__: osm_cpu_utilization
90 instance: mon:8000
91 job: prometheus
92 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
93 vdu_name: test_metric-1-ubuntuvdu1-1
94 vnf_member_index: '1'
95 value:
96 - 1573556383.439
97 - '0.7622979249'
98 """
99 users = """
100 ---
101 status: success
102 data:
103 resultType: vector
104 result:
105 - metric:
106 __name__: osm_users
107 instance: mon:8000
108 job: prometheus
109 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
110 vdu_name: test_metric-1-ubuntuvdu1-1
111 vnf_member_index: '1'
112 value:
113 - 1573552141.409
114 - '1'
115 """
116 load = """
117 ---
118 status: success
119 data:
120 resultType: vector
121 result:
122 - metric:
123 __name__: osm_load
124 instance: mon:8000
125 job: prometheus
126 ns_id: f48163a6-c807-47bc-9682-f72caef5af85
127 vdu_name: test_metric-1-ubuntuvdu1-1
128 vnf_member_index: '1'
129 value:
130 - 1573552060.035
131 - '0'
132 """
133 empty = """
134 ---
135 status: success
136 data:
137 resultType: vector
138 result: []
139 """