blob: b5bd764550b85e73c1dd718aceecdd620782b312 [file] [log] [blame]
Alex0989ecf2022-03-29 13:43:21 -05001# Author: Alex Savatieiev (osavatieiev@mirantis.com; a.savex@gmail.com)
2# Copyright 2019-2022 Mirantis, Inc.
savex4448e132018-04-25 15:51:14 +02003"""Constants that is not to be changed and used in all other files
4"""
5
Alex3ebc5632019-04-18 16:47:18 -05006from __future__ import absolute_import, print_function
savex4448e132018-04-25 15:51:14 +02007
8import itertools
9
10_cnt = itertools.count()
11NODE_DOWN = next(_cnt)
12NODE_UP = next(_cnt)
Alexe9908f72020-05-19 16:04:53 -050013NODE_SKIP = next(_cnt)
savex4448e132018-04-25 15:51:14 +020014
Alex41485522019-04-12 17:26:18 -050015# version const order is important!
16# biggest get shown in report top row
17VERSION_NA = next(_cnt)
18VERSION_OK = next(_cnt)
19VERSION_UP = next(_cnt)
20VERSION_DOWN = next(_cnt)
Alex26b8a8c2019-10-09 17:09:07 -050021VERSION_WARN = next(_cnt)
Alex41485522019-04-12 17:26:18 -050022VERSION_ERR = next(_cnt)
23
24# action const order is important!
25# biggest get shown in report top row
26ACT_NA = next(_cnt)
27ACT_UPGRADE = next(_cnt)
28ACT_NEED_UP = next(_cnt)
29ACT_NEED_DOWN = next(_cnt)
30ACT_REPO = next(_cnt)
31
savex4448e132018-04-25 15:51:14 +020032del _cnt
33
Alex41485522019-04-12 17:26:18 -050034all_actions = {
35 ACT_UPGRADE: "upgrade possible",
36 ACT_NEED_UP: "needs upgrade",
37 ACT_NEED_DOWN: "needs downgrade",
Alex9e4bfaf2019-06-11 15:21:59 -050038 ACT_REPO: "repo update",
Alex41485522019-04-12 17:26:18 -050039 ACT_NA: ""
40}
41
Alex836fac82019-08-22 13:36:16 -050042all_pkg_statuses = {
Alex41485522019-04-12 17:26:18 -050043 VERSION_OK: "ok",
44 VERSION_UP: "upgraded",
45 VERSION_DOWN: "downgraded",
Alex26b8a8c2019-10-09 17:09:07 -050046 VERSION_WARN: "warning",
Alex41485522019-04-12 17:26:18 -050047 VERSION_ERR: "error",
Alexe9908f72020-05-19 16:04:53 -050048 VERSION_NA: "nostatus"
Alex41485522019-04-12 17:26:18 -050049}
50
Alex836fac82019-08-22 13:36:16 -050051node_status = {
52 NODE_UP: "up",
Alexe9908f72020-05-19 16:04:53 -050053 NODE_DOWN: "down",
54 NODE_SKIP: "skip"
Alex836fac82019-08-22 13:36:16 -050055}
56
Alexe0c5b9e2019-04-23 18:51:23 -050057uknown_code = "unk"
58
Alex359e5752021-08-16 17:28:30 -050059ENV_TYPE_GLOB = "MCP"
60ENV_TYPE_SALT = "SALT"
61ENV_TYPE_KUBE = "KUBE"
62ENV_TYPE_LINUX = "LINUX"
63ENV_LOCAL = "local"
64
65supported_envs = [ENV_TYPE_LINUX, ENV_TYPE_SALT, ENV_TYPE_KUBE]
Alex9a4ad212020-10-01 18:04:25 -050066
67all_salt_roles_map = {
savex4448e132018-04-25 15:51:14 +020068 "apt": "repository",
69 "bmk": "validation",
70 "cfg": "master",
71 "cid": "cicd",
72 "cmn": "storage_monitor",
73 "cmp": "compute",
74 "ctl": "openstack_controller",
75 "dbs": "database",
76 "gtw": "openstack_gateway",
77 "kvm": "foundation",
78 "log": "stacklight_logger",
79 "mon": "monitoring",
80 "msg": "messaging",
81 "mtr": "stacklight_metering",
Alex26b8a8c2019-10-09 17:09:07 -050082 "ntw": "contrail_networking",
83 "nal": "contrail_analytics",
savex4448e132018-04-25 15:51:14 +020084 "osd": "storage_node",
85 "prx": "proxy",
Alexe0c5b9e2019-04-23 18:51:23 -050086 "rgw": "storage_rados",
87 "unk": "uknown"
savex4448e132018-04-25 15:51:14 +020088}
Alexd9fd85e2019-05-16 16:58:24 -050089
Alexccb72e02021-01-20 16:38:03 -060090ubuntu_releases = ["trusty", "xenial", "ubuntu", "bionic", "focal"]
Alexeffa0682021-06-04 12:18:33 -050091kaas_ubuntu_active = [
Alexcdf24b42022-09-22 10:38:22 -050092 "ubuntu-0.0.9",
Alexeffa0682021-06-04 12:18:33 -050093 "ubuntu-0.0.8",
94 "ubuntu-0.0.7",
Alexcdf24b42022-09-22 10:38:22 -050095 "ubuntu-2021-11-11-014639",
96 "ubuntu-2022-05-03-013543",
97 "ubuntu-2022-05-26-013636",
98 "ubuntu-2022-06-16-015242",
99 "ubuntu-2022-07-13-020010",
100 "ubuntu-2022-09-15-014207"
Alexeffa0682021-06-04 12:18:33 -0500101]
102mcp_active_tags = [
103 "2019.2.0",
Alexcdf24b42022-09-22 10:38:22 -0500104 "2019.2.21"
Alexeffa0682021-06-04 12:18:33 -0500105]
Alexd9fd85e2019-05-16 16:58:24 -0500106all_arch = ["amd64"]
107repo_types = {
108 "main": "Officially supported software",
109 "restricted": "Supported software that is not "
110 "available under a completely free license",
111 "universe": "Community maintained software, "
112 "i.e. not officially supported software",
113 "multiverse": "Software that is not free",
114 "contrib": "Free software, but is dependent to non-free software",
115 "uknown": "No specific description available"
116}
117
118_repos_info_archive = "repo.info.tgz"
119_repos_versions_archive = "repo.versions.tgz"
120_pkg_desc_archive = "pkg.descriptions.tgz"
121
122_repos_index_filename = "repoindex.json"
Alex0ed4f762019-05-17 17:55:33 -0500123_mainteiners_index_filename = "mainteiners.json"
124_mirantis_versions_filename = "mirantis_v.json"
125_other_versions_filename = "other_v.json"
Alex9a4ad212020-10-01 18:04:25 -0500126
127all_kube_roles_map = {
128 'node-role.kubernetes.io/master': "k8s-master",
129 'openstack-compute-node': "os-cmp",
130 'openstack-control-plane': "os-ctl",
131 'openstack-gateway': "os-gtw",
132 'openvswitch': "ovs",
133 'local-volume-provisioner': "",
134 'ceph_role_mgr': "ceph-mgr",
135 'ceph_role_mon': "ceph-mon",
136 'com.docker.ucp.collection.shared': "ucp-shared",
137 'com.docker.ucp.collection.system': "ucp-system",
138 'com.docker.ucp.collection.swarm': "ucp-swarm",
139 'com.docker.ucp.collection.root': "ucp-root",
140}
141
142truth = ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']
143
144ubuntu_versions = {
145 "20.10": "Groovy Gorilla",
146 "20.04": "Focal Fossa",
147 "18.04": "Bionic Beaver",
148 "16.04": "Xenial Xerus",
149 "14.04": "Trusty Tahr",
150}
151
152nova_openstack_versions = {
153 "23": "wallaby",
154 "22": "victoria",
155 "21": "ussuri",
156 "20": "train",
157 "19": "stein",
158 "18": "rocky",
Alexccb72e02021-01-20 16:38:03 -0600159 "17": "queens",
160 "00": "not installed"
Alex9a4ad212020-10-01 18:04:25 -0500161}