savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 1 | """Constants that is not to be changed and used in all other files |
| 2 | """ |
| 3 | |
Alex | 3ebc563 | 2019-04-18 16:47:18 -0500 | [diff] [blame] | 4 | from __future__ import absolute_import, print_function |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 5 | |
| 6 | import itertools |
| 7 | |
| 8 | _cnt = itertools.count() |
| 9 | NODE_DOWN = next(_cnt) |
| 10 | NODE_UP = next(_cnt) |
Alex | e9908f7 | 2020-05-19 16:04:53 -0500 | [diff] [blame^] | 11 | NODE_SKIP = next(_cnt) |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 12 | |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 13 | # version const order is important! |
| 14 | # biggest get shown in report top row |
| 15 | VERSION_NA = next(_cnt) |
| 16 | VERSION_OK = next(_cnt) |
| 17 | VERSION_UP = next(_cnt) |
| 18 | VERSION_DOWN = next(_cnt) |
Alex | 26b8a8c | 2019-10-09 17:09:07 -0500 | [diff] [blame] | 19 | VERSION_WARN = next(_cnt) |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 20 | VERSION_ERR = next(_cnt) |
| 21 | |
| 22 | # action const order is important! |
| 23 | # biggest get shown in report top row |
| 24 | ACT_NA = next(_cnt) |
| 25 | ACT_UPGRADE = next(_cnt) |
| 26 | ACT_NEED_UP = next(_cnt) |
| 27 | ACT_NEED_DOWN = next(_cnt) |
| 28 | ACT_REPO = next(_cnt) |
| 29 | |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 30 | del _cnt |
| 31 | |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 32 | all_actions = { |
| 33 | ACT_UPGRADE: "upgrade possible", |
| 34 | ACT_NEED_UP: "needs upgrade", |
| 35 | ACT_NEED_DOWN: "needs downgrade", |
Alex | 9e4bfaf | 2019-06-11 15:21:59 -0500 | [diff] [blame] | 36 | ACT_REPO: "repo update", |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 37 | ACT_NA: "" |
| 38 | } |
| 39 | |
Alex | 836fac8 | 2019-08-22 13:36:16 -0500 | [diff] [blame] | 40 | all_pkg_statuses = { |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 41 | VERSION_OK: "ok", |
| 42 | VERSION_UP: "upgraded", |
| 43 | VERSION_DOWN: "downgraded", |
Alex | 26b8a8c | 2019-10-09 17:09:07 -0500 | [diff] [blame] | 44 | VERSION_WARN: "warning", |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 45 | VERSION_ERR: "error", |
Alex | e9908f7 | 2020-05-19 16:04:53 -0500 | [diff] [blame^] | 46 | VERSION_NA: "nostatus" |
Alex | 4148552 | 2019-04-12 17:26:18 -0500 | [diff] [blame] | 47 | } |
| 48 | |
Alex | 836fac8 | 2019-08-22 13:36:16 -0500 | [diff] [blame] | 49 | node_status = { |
| 50 | NODE_UP: "up", |
Alex | e9908f7 | 2020-05-19 16:04:53 -0500 | [diff] [blame^] | 51 | NODE_DOWN: "down", |
| 52 | NODE_SKIP: "skip" |
Alex | 836fac8 | 2019-08-22 13:36:16 -0500 | [diff] [blame] | 53 | } |
| 54 | |
Alex | e0c5b9e | 2019-04-23 18:51:23 -0500 | [diff] [blame] | 55 | uknown_code = "unk" |
| 56 | |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 57 | all_roles_map = { |
| 58 | "apt": "repository", |
| 59 | "bmk": "validation", |
| 60 | "cfg": "master", |
| 61 | "cid": "cicd", |
| 62 | "cmn": "storage_monitor", |
| 63 | "cmp": "compute", |
| 64 | "ctl": "openstack_controller", |
| 65 | "dbs": "database", |
| 66 | "gtw": "openstack_gateway", |
| 67 | "kvm": "foundation", |
| 68 | "log": "stacklight_logger", |
| 69 | "mon": "monitoring", |
| 70 | "msg": "messaging", |
| 71 | "mtr": "stacklight_metering", |
Alex | 26b8a8c | 2019-10-09 17:09:07 -0500 | [diff] [blame] | 72 | "ntw": "contrail_networking", |
| 73 | "nal": "contrail_analytics", |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 74 | "osd": "storage_node", |
| 75 | "prx": "proxy", |
Alex | e0c5b9e | 2019-04-23 18:51:23 -0500 | [diff] [blame] | 76 | "rgw": "storage_rados", |
| 77 | "unk": "uknown" |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 78 | } |
Alex | d9fd85e | 2019-05-16 16:58:24 -0500 | [diff] [blame] | 79 | |
Alex | 3bc95f6 | 2020-03-05 17:00:04 -0600 | [diff] [blame] | 80 | ubuntu_releases = ["trusty", "xenial", "ubuntu", "bionic"] |
Alex | d9fd85e | 2019-05-16 16:58:24 -0500 | [diff] [blame] | 81 | all_arch = ["amd64"] |
| 82 | repo_types = { |
| 83 | "main": "Officially supported software", |
| 84 | "restricted": "Supported software that is not " |
| 85 | "available under a completely free license", |
| 86 | "universe": "Community maintained software, " |
| 87 | "i.e. not officially supported software", |
| 88 | "multiverse": "Software that is not free", |
| 89 | "contrib": "Free software, but is dependent to non-free software", |
| 90 | "uknown": "No specific description available" |
| 91 | } |
| 92 | |
| 93 | _repos_info_archive = "repo.info.tgz" |
| 94 | _repos_versions_archive = "repo.versions.tgz" |
| 95 | _pkg_desc_archive = "pkg.descriptions.tgz" |
| 96 | |
| 97 | _repos_index_filename = "repoindex.json" |
Alex | 0ed4f76 | 2019-05-17 17:55:33 -0500 | [diff] [blame] | 98 | _mainteiners_index_filename = "mainteiners.json" |
| 99 | _mirantis_versions_filename = "mirantis_v.json" |
| 100 | _other_versions_filename = "other_v.json" |