telemetry: error message handling
[csit.git] / resources / tools / telemetry / constants.py
1 # Copyright (c) 2022 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 """Constants used in telemetry.
15
16 "Constant" means a value that keeps its value since initialization. The value
17 does not need to be hard coded here, but can be read from environment variables.
18 """
19
20 class Constants:
21     """Constants used in telemetry.
22     1-10: Telemetry errors
23     11-50: VPP bundle error
24     51-100: Linux bundle errors"""
25
26     # Failed when processing data
27     err_telemetry_process = 1
28
29     # Could not connect to VPP
30     err_vpp_connect = 11
31
32     # Could not disconnect from VPP
33     err_vpp_disconnect = 12
34
35     # Failed when executing command
36     err_vpp_execute = 13
37