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 | |
Alex | 359e575 | 2021-08-16 17:28:30 -0500 | [diff] [blame] | 57 | ENV_TYPE_GLOB = "MCP" |
| 58 | ENV_TYPE_SALT = "SALT" |
| 59 | ENV_TYPE_KUBE = "KUBE" |
| 60 | ENV_TYPE_LINUX = "LINUX" |
| 61 | ENV_LOCAL = "local" |
| 62 | |
| 63 | supported_envs = [ENV_TYPE_LINUX, ENV_TYPE_SALT, ENV_TYPE_KUBE] |
Alex | 9a4ad21 | 2020-10-01 18:04:25 -0500 | [diff] [blame] | 64 | |
| 65 | all_salt_roles_map = { |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 66 | "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", |
Alex | 26b8a8c | 2019-10-09 17:09:07 -0500 | [diff] [blame] | 80 | "ntw": "contrail_networking", |
| 81 | "nal": "contrail_analytics", |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 82 | "osd": "storage_node", |
| 83 | "prx": "proxy", |
Alex | e0c5b9e | 2019-04-23 18:51:23 -0500 | [diff] [blame] | 84 | "rgw": "storage_rados", |
| 85 | "unk": "uknown" |
savex | 4448e13 | 2018-04-25 15:51:14 +0200 | [diff] [blame] | 86 | } |
Alex | d9fd85e | 2019-05-16 16:58:24 -0500 | [diff] [blame] | 87 | |
Alex | ccb72e0 | 2021-01-20 16:38:03 -0600 | [diff] [blame] | 88 | ubuntu_releases = ["trusty", "xenial", "ubuntu", "bionic", "focal"] |
Alex | effa068 | 2021-06-04 12:18:33 -0500 | [diff] [blame] | 89 | kaas_ubuntu_active = [ |
| 90 | "ubuntu-0.0.8", |
| 91 | "ubuntu-0.0.7", |
| 92 | "ubuntu-2020-07-30-013349", |
| 93 | "ubuntu-2020-12-14-013755", |
Alex | dfee518 | 2022-01-20 12:33:08 -0600 | [diff] [blame] | 94 | "ubuntu-2021-05-27-013023", |
| 95 | "ubuntu-2021-09-02-013131", |
| 96 | "ubuntu-2021-11-11-014639" |
Alex | effa068 | 2021-06-04 12:18:33 -0500 | [diff] [blame] | 97 | ] |
| 98 | mcp_active_tags = [ |
| 99 | "2019.2.0", |
| 100 | "2019.2.10", |
| 101 | "2019.2.11", |
| 102 | "2019.2.12", |
| 103 | "2019.2.13", |
| 104 | "2019.2.14", |
Alex | dfee518 | 2022-01-20 12:33:08 -0600 | [diff] [blame] | 105 | "2019.2.15", |
| 106 | "2019.2.16", |
| 107 | "2019.2.17" |
Alex | effa068 | 2021-06-04 12:18:33 -0500 | [diff] [blame] | 108 | ] |
Alex | d9fd85e | 2019-05-16 16:58:24 -0500 | [diff] [blame] | 109 | all_arch = ["amd64"] |
| 110 | repo_types = { |
| 111 | "main": "Officially supported software", |
| 112 | "restricted": "Supported software that is not " |
| 113 | "available under a completely free license", |
| 114 | "universe": "Community maintained software, " |
| 115 | "i.e. not officially supported software", |
| 116 | "multiverse": "Software that is not free", |
| 117 | "contrib": "Free software, but is dependent to non-free software", |
| 118 | "uknown": "No specific description available" |
| 119 | } |
| 120 | |
| 121 | _repos_info_archive = "repo.info.tgz" |
| 122 | _repos_versions_archive = "repo.versions.tgz" |
| 123 | _pkg_desc_archive = "pkg.descriptions.tgz" |
| 124 | |
| 125 | _repos_index_filename = "repoindex.json" |
Alex | 0ed4f76 | 2019-05-17 17:55:33 -0500 | [diff] [blame] | 126 | _mainteiners_index_filename = "mainteiners.json" |
| 127 | _mirantis_versions_filename = "mirantis_v.json" |
| 128 | _other_versions_filename = "other_v.json" |
Alex | 9a4ad21 | 2020-10-01 18:04:25 -0500 | [diff] [blame] | 129 | |
| 130 | all_kube_roles_map = { |
| 131 | 'node-role.kubernetes.io/master': "k8s-master", |
| 132 | 'openstack-compute-node': "os-cmp", |
| 133 | 'openstack-control-plane': "os-ctl", |
| 134 | 'openstack-gateway': "os-gtw", |
| 135 | 'openvswitch': "ovs", |
| 136 | 'local-volume-provisioner': "", |
| 137 | 'ceph_role_mgr': "ceph-mgr", |
| 138 | 'ceph_role_mon': "ceph-mon", |
| 139 | 'com.docker.ucp.collection.shared': "ucp-shared", |
| 140 | 'com.docker.ucp.collection.system': "ucp-system", |
| 141 | 'com.docker.ucp.collection.swarm': "ucp-swarm", |
| 142 | 'com.docker.ucp.collection.root': "ucp-root", |
| 143 | } |
| 144 | |
| 145 | truth = ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh'] |
| 146 | |
| 147 | ubuntu_versions = { |
| 148 | "20.10": "Groovy Gorilla", |
| 149 | "20.04": "Focal Fossa", |
| 150 | "18.04": "Bionic Beaver", |
| 151 | "16.04": "Xenial Xerus", |
| 152 | "14.04": "Trusty Tahr", |
| 153 | } |
| 154 | |
| 155 | nova_openstack_versions = { |
| 156 | "23": "wallaby", |
| 157 | "22": "victoria", |
| 158 | "21": "ussuri", |
| 159 | "20": "train", |
| 160 | "19": "stein", |
| 161 | "18": "rocky", |
Alex | ccb72e0 | 2021-01-20 16:38:03 -0600 | [diff] [blame] | 162 | "17": "queens", |
| 163 | "00": "not installed" |
Alex | 9a4ad21 | 2020-10-01 18:04:25 -0500 | [diff] [blame] | 164 | } |