blob: b629eb6e72aadc9baa8702b33051e3616f94e885 [file] [log] [blame]
savex4448e132018-04-25 15:51:14 +02001"""Constants that is not to be changed and used in all other files
2"""
3
Alex3ebc5632019-04-18 16:47:18 -05004from __future__ import absolute_import, print_function
savex4448e132018-04-25 15:51:14 +02005
6import itertools
7
8_cnt = itertools.count()
9NODE_DOWN = next(_cnt)
10NODE_UP = next(_cnt)
Alexe9908f72020-05-19 16:04:53 -050011NODE_SKIP = next(_cnt)
savex4448e132018-04-25 15:51:14 +020012
Alex41485522019-04-12 17:26:18 -050013# version const order is important!
14# biggest get shown in report top row
15VERSION_NA = next(_cnt)
16VERSION_OK = next(_cnt)
17VERSION_UP = next(_cnt)
18VERSION_DOWN = next(_cnt)
Alex26b8a8c2019-10-09 17:09:07 -050019VERSION_WARN = next(_cnt)
Alex41485522019-04-12 17:26:18 -050020VERSION_ERR = next(_cnt)
21
22# action const order is important!
23# biggest get shown in report top row
24ACT_NA = next(_cnt)
25ACT_UPGRADE = next(_cnt)
26ACT_NEED_UP = next(_cnt)
27ACT_NEED_DOWN = next(_cnt)
28ACT_REPO = next(_cnt)
29
savex4448e132018-04-25 15:51:14 +020030del _cnt
31
Alex41485522019-04-12 17:26:18 -050032all_actions = {
33 ACT_UPGRADE: "upgrade possible",
34 ACT_NEED_UP: "needs upgrade",
35 ACT_NEED_DOWN: "needs downgrade",
Alex9e4bfaf2019-06-11 15:21:59 -050036 ACT_REPO: "repo update",
Alex41485522019-04-12 17:26:18 -050037 ACT_NA: ""
38}
39
Alex836fac82019-08-22 13:36:16 -050040all_pkg_statuses = {
Alex41485522019-04-12 17:26:18 -050041 VERSION_OK: "ok",
42 VERSION_UP: "upgraded",
43 VERSION_DOWN: "downgraded",
Alex26b8a8c2019-10-09 17:09:07 -050044 VERSION_WARN: "warning",
Alex41485522019-04-12 17:26:18 -050045 VERSION_ERR: "error",
Alexe9908f72020-05-19 16:04:53 -050046 VERSION_NA: "nostatus"
Alex41485522019-04-12 17:26:18 -050047}
48
Alex836fac82019-08-22 13:36:16 -050049node_status = {
50 NODE_UP: "up",
Alexe9908f72020-05-19 16:04:53 -050051 NODE_DOWN: "down",
52 NODE_SKIP: "skip"
Alex836fac82019-08-22 13:36:16 -050053}
54
Alexe0c5b9e2019-04-23 18:51:23 -050055uknown_code = "unk"
56
Alex359e5752021-08-16 17:28:30 -050057ENV_TYPE_GLOB = "MCP"
58ENV_TYPE_SALT = "SALT"
59ENV_TYPE_KUBE = "KUBE"
60ENV_TYPE_LINUX = "LINUX"
61ENV_LOCAL = "local"
62
63supported_envs = [ENV_TYPE_LINUX, ENV_TYPE_SALT, ENV_TYPE_KUBE]
Alex9a4ad212020-10-01 18:04:25 -050064
65all_salt_roles_map = {
savex4448e132018-04-25 15:51:14 +020066 "apt": "repository",
67 "bmk": "validation",
68 "cfg": "master",
69 "cid": "cicd",
70 "cmn": "storage_monitor",
71 "cmp": "compute",
72 "ctl": "openstack_controller",
73 "dbs": "database",
74 "gtw": "openstack_gateway",
75 "kvm": "foundation",
76 "log": "stacklight_logger",
77 "mon": "monitoring",
78 "msg": "messaging",
79 "mtr": "stacklight_metering",
Alex26b8a8c2019-10-09 17:09:07 -050080 "ntw": "contrail_networking",
81 "nal": "contrail_analytics",
savex4448e132018-04-25 15:51:14 +020082 "osd": "storage_node",
83 "prx": "proxy",
Alexe0c5b9e2019-04-23 18:51:23 -050084 "rgw": "storage_rados",
85 "unk": "uknown"
savex4448e132018-04-25 15:51:14 +020086}
Alexd9fd85e2019-05-16 16:58:24 -050087
Alexccb72e02021-01-20 16:38:03 -060088ubuntu_releases = ["trusty", "xenial", "ubuntu", "bionic", "focal"]
Alexeffa0682021-06-04 12:18:33 -050089kaas_ubuntu_active = [
90 "ubuntu-0.0.8",
91 "ubuntu-0.0.7",
92 "ubuntu-2020-07-30-013349",
93 "ubuntu-2020-12-14-013755",
94 "ubuntu-2021-05-27-013023"
95]
96mcp_active_tags = [
97 "2019.2.0",
98 "2019.2.10",
99 "2019.2.11",
100 "2019.2.12",
101 "2019.2.13",
102 "2019.2.14",
103]
Alexd9fd85e2019-05-16 16:58:24 -0500104all_arch = ["amd64"]
105repo_types = {
106 "main": "Officially supported software",
107 "restricted": "Supported software that is not "
108 "available under a completely free license",
109 "universe": "Community maintained software, "
110 "i.e. not officially supported software",
111 "multiverse": "Software that is not free",
112 "contrib": "Free software, but is dependent to non-free software",
113 "uknown": "No specific description available"
114}
115
116_repos_info_archive = "repo.info.tgz"
117_repos_versions_archive = "repo.versions.tgz"
118_pkg_desc_archive = "pkg.descriptions.tgz"
119
120_repos_index_filename = "repoindex.json"
Alex0ed4f762019-05-17 17:55:33 -0500121_mainteiners_index_filename = "mainteiners.json"
122_mirantis_versions_filename = "mirantis_v.json"
123_other_versions_filename = "other_v.json"
Alex9a4ad212020-10-01 18:04:25 -0500124
125all_kube_roles_map = {
126 'node-role.kubernetes.io/master': "k8s-master",
127 'openstack-compute-node': "os-cmp",
128 'openstack-control-plane': "os-ctl",
129 'openstack-gateway': "os-gtw",
130 'openvswitch': "ovs",
131 'local-volume-provisioner': "",
132 'ceph_role_mgr': "ceph-mgr",
133 'ceph_role_mon': "ceph-mon",
134 'com.docker.ucp.collection.shared': "ucp-shared",
135 'com.docker.ucp.collection.system': "ucp-system",
136 'com.docker.ucp.collection.swarm': "ucp-swarm",
137 'com.docker.ucp.collection.root': "ucp-root",
138}
139
140truth = ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']
141
142ubuntu_versions = {
143 "20.10": "Groovy Gorilla",
144 "20.04": "Focal Fossa",
145 "18.04": "Bionic Beaver",
146 "16.04": "Xenial Xerus",
147 "14.04": "Trusty Tahr",
148}
149
150nova_openstack_versions = {
151 "23": "wallaby",
152 "22": "victoria",
153 "21": "ussuri",
154 "20": "train",
155 "19": "stein",
156 "18": "rocky",
Alexccb72e02021-01-20 16:38:03 -0600157 "17": "queens",
158 "00": "not installed"
Alex9a4ad212020-10-01 18:04:25 -0500159}