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