blob: f2b3d3f21e5bedd2e23d6505f2089b72f11edb34 [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",
Ievgeniia Zadorozhnaefff0ab2023-11-20 15:57:55 +010094 "ubuntu-2023-09-13-015824",
Ievgeniia Zadorozhna47030ce2024-01-03 22:18:38 +010095 "ubuntu-2023-10-11-015021",
96 "ubuntu-2023-11-23-015533"
Alexeffa0682021-06-04 12:18:33 -050097]
98mcp_active_tags = [
99 "2019.2.0",
Ievgeniia Zadorozhna47030ce2024-01-03 22:18:38 +0100100 "2019.2.25",
101 "2019.2.26"
Alexeffa0682021-06-04 12:18:33 -0500102]
Alexd9fd85e2019-05-16 16:58:24 -0500103all_arch = ["amd64"]
104repo_types = {
105 "main": "Officially supported software",
106 "restricted": "Supported software that is not "
107 "available under a completely free license",
108 "universe": "Community maintained software, "
109 "i.e. not officially supported software",
110 "multiverse": "Software that is not free",
111 "contrib": "Free software, but is dependent to non-free software",
112 "uknown": "No specific description available"
113}
114
115_repos_info_archive = "repo.info.tgz"
116_repos_versions_archive = "repo.versions.tgz"
117_pkg_desc_archive = "pkg.descriptions.tgz"
118
119_repos_index_filename = "repoindex.json"
Alex0ed4f762019-05-17 17:55:33 -0500120_mainteiners_index_filename = "mainteiners.json"
121_mirantis_versions_filename = "mirantis_v.json"
122_other_versions_filename = "other_v.json"
Alex9a4ad212020-10-01 18:04:25 -0500123
124all_kube_roles_map = {
125 'node-role.kubernetes.io/master': "k8s-master",
126 'openstack-compute-node': "os-cmp",
127 'openstack-control-plane': "os-ctl",
128 'openstack-gateway': "os-gtw",
129 'openvswitch': "ovs",
130 'local-volume-provisioner': "",
131 'ceph_role_mgr': "ceph-mgr",
132 'ceph_role_mon': "ceph-mon",
133 'com.docker.ucp.collection.shared': "ucp-shared",
134 'com.docker.ucp.collection.system': "ucp-system",
135 'com.docker.ucp.collection.swarm': "ucp-swarm",
136 'com.docker.ucp.collection.root': "ucp-root",
137}
138
139truth = ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']
140
141ubuntu_versions = {
142 "20.10": "Groovy Gorilla",
143 "20.04": "Focal Fossa",
144 "18.04": "Bionic Beaver",
145 "16.04": "Xenial Xerus",
146 "14.04": "Trusty Tahr",
147}
148
149nova_openstack_versions = {
Ievgeniia Zadorozhna13251f62024-01-04 21:22:59 +0100150 "28": "Bobcat",
151 "27": "Antelope",
Alexde190702022-12-21 12:08:35 -0600152 "26": "Zed",
153 "25": "Yoga",
154 "24": "Xena",
Alex9a4ad212020-10-01 18:04:25 -0500155 "23": "wallaby",
156 "22": "victoria",
157 "21": "ussuri",
158 "20": "train",
159 "19": "stein",
160 "18": "rocky",
Alexccb72e02021-01-20 16:38:03 -0600161 "17": "queens",
162 "00": "not installed"
Alex9a4ad212020-10-01 18:04:25 -0500163}