blob: ac7b2ca69f69a567b7c4d7dd4464ab1ba674300b [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 = [
92 "ubuntu-0.0.8",
93 "ubuntu-0.0.7",
94 "ubuntu-2020-07-30-013349",
95 "ubuntu-2020-12-14-013755",
Alexdfee5182022-01-20 12:33:08 -060096 "ubuntu-2021-05-27-013023",
97 "ubuntu-2021-09-02-013131",
98 "ubuntu-2021-11-11-014639"
Alexeffa0682021-06-04 12:18:33 -050099]
100mcp_active_tags = [
101 "2019.2.0",
102 "2019.2.10",
103 "2019.2.11",
104 "2019.2.12",
105 "2019.2.13",
106 "2019.2.14",
Alexdfee5182022-01-20 12:33:08 -0600107 "2019.2.15",
108 "2019.2.16",
109 "2019.2.17"
Alexeffa0682021-06-04 12:18:33 -0500110]
Alexd9fd85e2019-05-16 16:58:24 -0500111all_arch = ["amd64"]
112repo_types = {
113 "main": "Officially supported software",
114 "restricted": "Supported software that is not "
115 "available under a completely free license",
116 "universe": "Community maintained software, "
117 "i.e. not officially supported software",
118 "multiverse": "Software that is not free",
119 "contrib": "Free software, but is dependent to non-free software",
120 "uknown": "No specific description available"
121}
122
123_repos_info_archive = "repo.info.tgz"
124_repos_versions_archive = "repo.versions.tgz"
125_pkg_desc_archive = "pkg.descriptions.tgz"
126
127_repos_index_filename = "repoindex.json"
Alex0ed4f762019-05-17 17:55:33 -0500128_mainteiners_index_filename = "mainteiners.json"
129_mirantis_versions_filename = "mirantis_v.json"
130_other_versions_filename = "other_v.json"
Alex9a4ad212020-10-01 18:04:25 -0500131
132all_kube_roles_map = {
133 'node-role.kubernetes.io/master': "k8s-master",
134 'openstack-compute-node': "os-cmp",
135 'openstack-control-plane': "os-ctl",
136 'openstack-gateway': "os-gtw",
137 'openvswitch': "ovs",
138 'local-volume-provisioner': "",
139 'ceph_role_mgr': "ceph-mgr",
140 'ceph_role_mon': "ceph-mon",
141 'com.docker.ucp.collection.shared': "ucp-shared",
142 'com.docker.ucp.collection.system': "ucp-system",
143 'com.docker.ucp.collection.swarm': "ucp-swarm",
144 'com.docker.ucp.collection.root': "ucp-root",
145}
146
147truth = ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']
148
149ubuntu_versions = {
150 "20.10": "Groovy Gorilla",
151 "20.04": "Focal Fossa",
152 "18.04": "Bionic Beaver",
153 "16.04": "Xenial Xerus",
154 "14.04": "Trusty Tahr",
155}
156
157nova_openstack_versions = {
158 "23": "wallaby",
159 "22": "victoria",
160 "21": "ussuri",
161 "20": "train",
162 "19": "stein",
163 "18": "rocky",
Alexccb72e02021-01-20 16:38:03 -0600164 "17": "queens",
165 "00": "not installed"
Alex9a4ad212020-10-01 18:04:25 -0500166}