Merge ~gabrielcocenza/juju-lint:bug/1965243 into juju-lint:master

Proposed by Gabriel Cocenza
Status: Merged
Approved by: Martin Kalcok
Approved revision: 8057cda421e447d1a7042de2402ad14732347cc1
Merged at revision: 91c90d311b6b02f3b553a7b9eaa0b7167bab4d97
Proposed branch: ~gabrielcocenza/juju-lint:bug/1965243
Merge into: juju-lint:master
Prerequisite: ~gabrielcocenza/juju-lint:bug/1979382
Diff against target: 285 lines (+117/-25)
14 files modified
README.md (+26/-10)
contrib/fcb-stein-bionic.yaml (+9/-0)
contrib/fcb-ussuri-bionic-ovs.yaml (+9/-0)
contrib/fcb-ussuri-bionic.yaml (+9/-0)
contrib/fcb-ussuri-focal-ovs.yaml (+9/-0)
contrib/fcb-ussuri-focal.yaml (+9/-0)
contrib/fcb-yoga-focal.yaml (+9/-0)
contrib/includes/aggregator-openstack.yaml (+17/-15)
contrib/includes/openstack.yaml (+1/-0)
contrib/includes/release/stein.yaml (+4/-0)
contrib/includes/release/ussuri.yaml (+5/-0)
contrib/includes/release/yoga.yaml (+5/-0)
contrib/includes/series/bionic.yaml (+2/-0)
contrib/includes/series/focal.yaml (+3/-0)
Reviewer Review Type Date Requested Status
Martin Kalcok (community) Approve
Eric Chen Approve
Review via email: mp+427097@code.launchpad.net

Commit message

Added new rules, openstack-loadbalancer and ceph and homer dashboard.

- updated readme
- fcb-stein-bionic
- fcb-ussuri-bionic-ovs
- fcb-ussuri-bionic
- fcb-ussuri-focal-ovs
- fcb-ussuri-focal
- fcb-yoga-focal
- added openstack-loadbalancer for series != bionic
- added ceph-dashboard for openstack releases >= ussuri
- added homer-dashboard as a known charm

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Eric Chen (eric-chen) :
review: Approve
Revision history for this message
Martin Kalcok (martin-kalcok) wrote :

LGTM, thanks for the update.

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 91c90d311b6b02f3b553a7b9eaa0b7167bab4d97

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/README.md b/README.md
2index a99f87c..3ed19f3 100644
3--- a/README.md
4+++ b/README.md
5@@ -1,6 +1,6 @@
6-= Juju Lint =
7+# Juju Lint
8
9-== Introduction ==
10+## Introduction
11
12 This is intended to be run against a yaml or json dump of Juju status, a YAML
13 dump of a juju bundle, or a remote cloud or clouds via SSH.
14@@ -39,18 +39,18 @@ To use a different rules file:
15
16 For all other options, consult `juju-lint --help`
17
18-== Example ==
19+### Example
20
21 A typical use case is linting an openstack cloud:
22
23 juju status -m openstack --format=json > juju-status.json
24 juju export-bundle --include-charm-defaults -m openstack > bundle.yaml
25- juju-lint -c /snap/juju-lint/current/contrib/openstack-focal-ovn.yaml \
26+ juju-lint -c /snap/juju-lint/current/contrib/fcb-ussuri-focal.yaml \
27 -t openstack juju-status.json
28- juju-lint -c /snap/juju-lint/current/contrib/openstack-focal-ovn.yaml \
29+ juju-lint -c /snap/juju-lint/current/contrib/fcb-ussuri-focal.yaml \
30 -t openstack bundle.yaml
31
32-== Rules File ==
33+## Rules File
34
35 For an example of a rules file, see `example-lint-rules.yaml`.
36
37@@ -66,7 +66,23 @@ Supported top-level options for your rules file:
38 mismatches.
39 8. `!include <relative path>` - Extension to yaml to include files.
40
41-=== Space checks ===
42+### Openstack
43+
44+The snap comes with some standard rules that tries to match the bundles generated on
45+[fce-templates](https://launchpad.net/fce-templates/). It's assumed that `ovn` is used
46+by default. You can find the rules at `/snap/juju-lint/current/contrib/` and they have
47+the following pattern:
48+
49+```
50+fcb-<openstack_release>-<ubuntu-series-feature>.yaml
51+```
52+
53+E.g: fcb-ussuri-focal.yaml, fcb-ussuri-focal-ovs.yaml
54+
55+#### Note
56+The rules starting with `openstack`, e.g: `openstack-bionic-ovn.yaml`, will be deprecated.
57+
58+## Space checks
59
60 All relations defined within a bundle, except for cross-model relationships,
61 will be checked for mismatches of their space bindings.
62@@ -86,9 +102,9 @@ to ignore them entirely:
63 2. `enforce relations` - A list of two-item <charm>:<endpoint> string lists,
64 representing the two linked endpoints of a relation. If a mismatch
65 matches one of these relations, it will be flagged as an error.
66- 1. `ignore endpoints` - A list of <charm>:<endpoint> strings. If a mismatch
67+ 3. `ignore endpoints` - A list of <charm>:<endpoint> strings. If a mismatch
68 matches one of these endpoints, it will be ignored.
69- 1. `ignore relations` - A list of two-item <charm>:<endpoint> string lists,
70+ 4. `ignore relations` - A list of two-item <charm>:<endpoint> string lists,
71 representing the two linked endpoints of a relation. If a mismatch
72 matches one of these relations, it will be ignored.
73
74@@ -98,7 +114,7 @@ rule will "win" and it will be flagged as an error.
75 Note that all the above checks use charm names rather than application names
76 in their endpoint strings.
77
78-== License ==
79+## License
80
81 Copyright 2020 Canonical Limited.
82 License granted by Canonical Limited.
83diff --git a/contrib/fcb-stein-bionic.yaml b/contrib/fcb-stein-bionic.yaml
84new file mode 100644
85index 0000000..863058f
86--- /dev/null
87+++ b/contrib/fcb-stein-bionic.yaml
88@@ -0,0 +1,9 @@
89+!include includes/base.yaml
90+!include includes/networking/ovn.yaml
91+!include includes/database/percona-cluster.yaml
92+!include includes/release/stein.yaml
93+!include includes/series/bionic.yaml
94+!include includes/openstack.yaml
95+!include includes/operations.yaml
96+!include includes/saas.yaml
97+!include includes/aggregator-openstack.yaml
98\ No newline at end of file
99diff --git a/contrib/fcb-ussuri-bionic-ovs.yaml b/contrib/fcb-ussuri-bionic-ovs.yaml
100new file mode 100644
101index 0000000..51de731
102--- /dev/null
103+++ b/contrib/fcb-ussuri-bionic-ovs.yaml
104@@ -0,0 +1,9 @@
105+!include includes/base.yaml
106+!include includes/networking/ovs.yaml
107+!include includes/database/percona-cluster.yaml
108+!include includes/release/ussuri.yaml
109+!include includes/series/bionic.yaml
110+!include includes/openstack.yaml
111+!include includes/operations.yaml
112+!include includes/saas.yaml
113+!include includes/aggregator-openstack.yaml
114\ No newline at end of file
115diff --git a/contrib/fcb-ussuri-bionic.yaml b/contrib/fcb-ussuri-bionic.yaml
116new file mode 100644
117index 0000000..6fade6b
118--- /dev/null
119+++ b/contrib/fcb-ussuri-bionic.yaml
120@@ -0,0 +1,9 @@
121+!include includes/base.yaml
122+!include includes/networking/ovn.yaml
123+!include includes/database/percona-cluster.yaml
124+!include includes/release/ussuri.yaml
125+!include includes/series/bionic.yaml
126+!include includes/openstack.yaml
127+!include includes/operations.yaml
128+!include includes/saas.yaml
129+!include includes/aggregator-openstack.yaml
130\ No newline at end of file
131diff --git a/contrib/fcb-ussuri-focal-ovs.yaml b/contrib/fcb-ussuri-focal-ovs.yaml
132new file mode 100644
133index 0000000..a29ed0e
134--- /dev/null
135+++ b/contrib/fcb-ussuri-focal-ovs.yaml
136@@ -0,0 +1,9 @@
137+!include includes/base.yaml
138+!include includes/networking/ovs.yaml
139+!include includes/database/mysql.yaml
140+!include includes/release/ussuri.yaml
141+!include includes/series/focal.yaml
142+!include includes/openstack.yaml
143+!include includes/operations.yaml
144+!include includes/saas.yaml
145+!include includes/aggregator-openstack.yaml
146\ No newline at end of file
147diff --git a/contrib/fcb-ussuri-focal.yaml b/contrib/fcb-ussuri-focal.yaml
148new file mode 100644
149index 0000000..2e6f2eb
150--- /dev/null
151+++ b/contrib/fcb-ussuri-focal.yaml
152@@ -0,0 +1,9 @@
153+!include includes/base.yaml
154+!include includes/networking/ovn.yaml
155+!include includes/database/mysql.yaml
156+!include includes/release/ussuri.yaml
157+!include includes/series/focal.yaml
158+!include includes/openstack.yaml
159+!include includes/operations.yaml
160+!include includes/saas.yaml
161+!include includes/aggregator-openstack.yaml
162\ No newline at end of file
163diff --git a/contrib/fcb-yoga-focal.yaml b/contrib/fcb-yoga-focal.yaml
164new file mode 100644
165index 0000000..4293a7d
166--- /dev/null
167+++ b/contrib/fcb-yoga-focal.yaml
168@@ -0,0 +1,9 @@
169+!include includes/base.yaml
170+!include includes/networking/ovn.yaml
171+!include includes/database/mysql.yaml
172+!include includes/release/yoga.yaml
173+!include includes/series/focal.yaml
174+!include includes/openstack.yaml
175+!include includes/operations.yaml
176+!include includes/saas.yaml
177+!include includes/aggregator-openstack.yaml
178\ No newline at end of file
179diff --git a/contrib/includes/aggregator-openstack.yaml b/contrib/includes/aggregator-openstack.yaml
180index 6982a91..58a92fa 100644
181--- a/contrib/includes/aggregator-openstack.yaml
182+++ b/contrib/includes/aggregator-openstack.yaml
183@@ -1,20 +1,22 @@
184 operations charms: &operations-charms
185- - *operations-mandatory-charms
186- - *operations-mandatory-deps
187- - *operations-mandatory-subs
188- - *operations-optional-charms
189- - *operations-optional-subs
190- - *operations-openstack-mandatory-charms
191+ - *operations-mandatory-charms
192+ - *operations-mandatory-deps
193+ - *operations-mandatory-subs
194+ - *operations-optional-charms
195+ - *operations-optional-subs
196+ - *operations-openstack-mandatory-charms
197+ - *operations-openstack-mandatory-release
198
199 openstack charms: &openstack-charms
200- - *openstack-mandatory-charms
201- - *openstack-mandatory-deps
202- - *openstack-mandatory-subs
203- - *openstack-optional-charms
204- - *cisco-aci-charms
205- - *trilio-charms
206+ - *openstack-mandatory-charms
207+ - *openstack-mandatory-deps
208+ - *openstack-mandatory-subs
209+ - *openstack-optional-charms
210+ - *openstack-loadbalancer
211+ - *cisco-aci-charms
212+ - *trilio-charms
213
214 known charms:
215- - ubuntu
216- - *openstack-charms
217- - *operations-charms
218+ - ubuntu
219+ - *openstack-charms
220+ - *operations-charms
221diff --git a/contrib/includes/openstack.yaml b/contrib/includes/openstack.yaml
222index 5235aea..1b35486 100644
223--- a/contrib/includes/openstack.yaml
224+++ b/contrib/includes/openstack.yaml
225@@ -45,6 +45,7 @@ openstack mandatory: &openstack-mandatory-charms
226 - nova-cloud-controller
227 - nova-compute
228 - openstack-dashboard
229+ - bootstack-charmers-homer-dashboard
230 - *openstack-mandatory-charms-networking
231
232 openstack mandatory deps base: &openstack-mandatory-deps-base
233diff --git a/contrib/includes/release/stein.yaml b/contrib/includes/release/stein.yaml
234new file mode 100644
235index 0000000..7319287
236--- /dev/null
237+++ b/contrib/includes/release/stein.yaml
238@@ -0,0 +1,4 @@
239+# add prometheus ceph exporter if openstack version is lesser than ussuri
240+
241+operations openstack mandatory release: &operations-openstack-mandatory-release
242+ - prometheus-ceph-exporter
243\ No newline at end of file
244diff --git a/contrib/includes/release/ussuri.yaml b/contrib/includes/release/ussuri.yaml
245new file mode 100644
246index 0000000..ddf9beb
247--- /dev/null
248+++ b/contrib/includes/release/ussuri.yaml
249@@ -0,0 +1,5 @@
250+# Do not add prometheus ceph exporter if openstack version is greater/equal than ussuri
251+# Instead, use ceph-dashboard
252+
253+operations openstack mandatory release: &operations-openstack-mandatory-release
254+ - ceph-dashboard
255\ No newline at end of file
256diff --git a/contrib/includes/release/yoga.yaml b/contrib/includes/release/yoga.yaml
257new file mode 100644
258index 0000000..ddf9beb
259--- /dev/null
260+++ b/contrib/includes/release/yoga.yaml
261@@ -0,0 +1,5 @@
262+# Do not add prometheus ceph exporter if openstack version is greater/equal than ussuri
263+# Instead, use ceph-dashboard
264+
265+operations openstack mandatory release: &operations-openstack-mandatory-release
266+ - ceph-dashboard
267\ No newline at end of file
268diff --git a/contrib/includes/series/bionic.yaml b/contrib/includes/series/bionic.yaml
269new file mode 100644
270index 0000000..1a9b536
271--- /dev/null
272+++ b/contrib/includes/series/bionic.yaml
273@@ -0,0 +1,2 @@
274+openstack loadbalancer: &openstack-loadbalancer []
275+operations openstack mandatory series: &operations-openstack-mandatory-series []
276diff --git a/contrib/includes/series/focal.yaml b/contrib/includes/series/focal.yaml
277new file mode 100644
278index 0000000..4084113
279--- /dev/null
280+++ b/contrib/includes/series/focal.yaml
281@@ -0,0 +1,3 @@
282+openstack loadbalancer: &openstack-loadbalancer
283+ - openstack-loadbalancer
284+operations openstack mandatory series: &operations-openstack-mandatory-series []
285\ No newline at end of file

Subscribers

People subscribed via source and target branches