blob: 685c79a37a8dde836bf549195844c08558b285aa [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)
11
Alex41485522019-04-12 17:26:18 -050012# version const order is important!
13# biggest get shown in report top row
14VERSION_NA = next(_cnt)
15VERSION_OK = next(_cnt)
16VERSION_UP = next(_cnt)
17VERSION_DOWN = next(_cnt)
Alex26b8a8c2019-10-09 17:09:07 -050018VERSION_WARN = next(_cnt)
Alex41485522019-04-12 17:26:18 -050019VERSION_ERR = next(_cnt)
20
21# action const order is important!
22# biggest get shown in report top row
23ACT_NA = next(_cnt)
24ACT_UPGRADE = next(_cnt)
25ACT_NEED_UP = next(_cnt)
26ACT_NEED_DOWN = next(_cnt)
27ACT_REPO = next(_cnt)
28
savex4448e132018-04-25 15:51:14 +020029del _cnt
30
Alex41485522019-04-12 17:26:18 -050031all_actions = {
32 ACT_UPGRADE: "upgrade possible",
33 ACT_NEED_UP: "needs upgrade",
34 ACT_NEED_DOWN: "needs downgrade",
Alex9e4bfaf2019-06-11 15:21:59 -050035 ACT_REPO: "repo update",
Alex41485522019-04-12 17:26:18 -050036 ACT_NA: ""
37}
38
Alex836fac82019-08-22 13:36:16 -050039all_pkg_statuses = {
Alex41485522019-04-12 17:26:18 -050040 VERSION_OK: "ok",
41 VERSION_UP: "upgraded",
42 VERSION_DOWN: "downgraded",
Alex26b8a8c2019-10-09 17:09:07 -050043 VERSION_WARN: "warning",
Alex41485522019-04-12 17:26:18 -050044 VERSION_ERR: "error",
45 VERSION_NA: "no status"
46}
47
Alex836fac82019-08-22 13:36:16 -050048node_status = {
49 NODE_UP: "up",
50 NODE_DOWN: "down"
51}
52
Alexe0c5b9e2019-04-23 18:51:23 -050053uknown_code = "unk"
54
savex4448e132018-04-25 15:51:14 +020055all_roles_map = {
56 "apt": "repository",
57 "bmk": "validation",
58 "cfg": "master",
59 "cid": "cicd",
60 "cmn": "storage_monitor",
61 "cmp": "compute",
62 "ctl": "openstack_controller",
63 "dbs": "database",
64 "gtw": "openstack_gateway",
65 "kvm": "foundation",
66 "log": "stacklight_logger",
67 "mon": "monitoring",
68 "msg": "messaging",
69 "mtr": "stacklight_metering",
Alex26b8a8c2019-10-09 17:09:07 -050070 "ntw": "contrail_networking",
71 "nal": "contrail_analytics",
savex4448e132018-04-25 15:51:14 +020072 "osd": "storage_node",
73 "prx": "proxy",
Alexe0c5b9e2019-04-23 18:51:23 -050074 "rgw": "storage_rados",
75 "unk": "uknown"
savex4448e132018-04-25 15:51:14 +020076}
Alexd9fd85e2019-05-16 16:58:24 -050077
Alex3bc95f62020-03-05 17:00:04 -060078ubuntu_releases = ["trusty", "xenial", "ubuntu", "bionic"]
Alexd9fd85e2019-05-16 16:58:24 -050079all_arch = ["amd64"]
80repo_types = {
81 "main": "Officially supported software",
82 "restricted": "Supported software that is not "
83 "available under a completely free license",
84 "universe": "Community maintained software, "
85 "i.e. not officially supported software",
86 "multiverse": "Software that is not free",
87 "contrib": "Free software, but is dependent to non-free software",
88 "uknown": "No specific description available"
89}
90
91_repos_info_archive = "repo.info.tgz"
92_repos_versions_archive = "repo.versions.tgz"
93_pkg_desc_archive = "pkg.descriptions.tgz"
94
95_repos_index_filename = "repoindex.json"
Alex0ed4f762019-05-17 17:55:33 -050096_mainteiners_index_filename = "mainteiners.json"
97_mirantis_versions_filename = "mirantis_v.json"
98_other_versions_filename = "other_v.json"