Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1"""Constants that is not to be changed and used in all other files 

2""" 

3 

4from __future__ import absolute_import, print_function 

5 

6import itertools 

7 

8_cnt = itertools.count() 

9NODE_DOWN = next(_cnt) 

10NODE_UP = next(_cnt) 

11 

12# 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) 

18VERSION_WARN = next(_cnt) 

19VERSION_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 

29del _cnt 

30 

31all_actions = { 

32 ACT_UPGRADE: "upgrade possible", 

33 ACT_NEED_UP: "needs upgrade", 

34 ACT_NEED_DOWN: "needs downgrade", 

35 ACT_REPO: "repo update", 

36 ACT_NA: "" 

37} 

38 

39all_pkg_statuses = { 

40 VERSION_OK: "ok", 

41 VERSION_UP: "upgraded", 

42 VERSION_DOWN: "downgraded", 

43 VERSION_WARN: "warning", 

44 VERSION_ERR: "error", 

45 VERSION_NA: "no status" 

46} 

47 

48node_status = { 

49 NODE_UP: "up", 

50 NODE_DOWN: "down" 

51} 

52 

53uknown_code = "unk" 

54 

55all_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", 

70 "ntw": "contrail_networking", 

71 "nal": "contrail_analytics", 

72 "osd": "storage_node", 

73 "prx": "proxy", 

74 "rgw": "storage_rados", 

75 "unk": "uknown" 

76} 

77 

78ubuntu_releases = ["trusty", "xenial", "ubuntu"] 

79all_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" 

96_mainteiners_index_filename = "mainteiners.json" 

97_mirantis_versions_filename = "mirantis_v.json" 

98_other_versions_filename = "other_v.json"