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
diff --git a/README.md b/README.md
index a99f87c..3ed19f3 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
1= Juju Lint =1# Juju Lint
22
3== Introduction ==3## Introduction
44
5This is intended to be run against a yaml or json dump of Juju status, a YAML5This is intended to be run against a yaml or json dump of Juju status, a YAML
6dump of a juju bundle, or a remote cloud or clouds via SSH.6dump of a juju bundle, or a remote cloud or clouds via SSH.
@@ -39,18 +39,18 @@ To use a different rules file:
3939
40For all other options, consult `juju-lint --help`40For all other options, consult `juju-lint --help`
4141
42== Example ==42### Example
4343
44A typical use case is linting an openstack cloud:44A typical use case is linting an openstack cloud:
4545
46 juju status -m openstack --format=json > juju-status.json46 juju status -m openstack --format=json > juju-status.json
47 juju export-bundle --include-charm-defaults -m openstack > bundle.yaml47 juju export-bundle --include-charm-defaults -m openstack > bundle.yaml
48 juju-lint -c /snap/juju-lint/current/contrib/openstack-focal-ovn.yaml \48 juju-lint -c /snap/juju-lint/current/contrib/fcb-ussuri-focal.yaml \
49 -t openstack juju-status.json49 -t openstack juju-status.json
50 juju-lint -c /snap/juju-lint/current/contrib/openstack-focal-ovn.yaml \50 juju-lint -c /snap/juju-lint/current/contrib/fcb-ussuri-focal.yaml \
51 -t openstack bundle.yaml51 -t openstack bundle.yaml
5252
53== Rules File ==53## Rules File
5454
55For an example of a rules file, see `example-lint-rules.yaml`.55For an example of a rules file, see `example-lint-rules.yaml`.
5656
@@ -66,7 +66,23 @@ Supported top-level options for your rules file:
66 mismatches.66 mismatches.
67 8. `!include <relative path>` - Extension to yaml to include files.67 8. `!include <relative path>` - Extension to yaml to include files.
6868
69=== Space checks ===69### Openstack
70
71The snap comes with some standard rules that tries to match the bundles generated on
72[fce-templates](https://launchpad.net/fce-templates/). It's assumed that `ovn` is used
73by default. You can find the rules at `/snap/juju-lint/current/contrib/` and they have
74the following pattern:
75
76```
77fcb-<openstack_release>-<ubuntu-series-feature>.yaml
78```
79
80E.g: fcb-ussuri-focal.yaml, fcb-ussuri-focal-ovs.yaml
81
82#### Note
83The rules starting with `openstack`, e.g: `openstack-bionic-ovn.yaml`, will be deprecated.
84
85## Space checks
7086
71All relations defined within a bundle, except for cross-model relationships,87All relations defined within a bundle, except for cross-model relationships,
72will be checked for mismatches of their space bindings.88will be checked for mismatches of their space bindings.
@@ -86,9 +102,9 @@ to ignore them entirely:
86 2. `enforce relations` - A list of two-item <charm>:<endpoint> string lists,102 2. `enforce relations` - A list of two-item <charm>:<endpoint> string lists,
87 representing the two linked endpoints of a relation. If a mismatch103 representing the two linked endpoints of a relation. If a mismatch
88 matches one of these relations, it will be flagged as an error.104 matches one of these relations, it will be flagged as an error.
89 1. `ignore endpoints` - A list of <charm>:<endpoint> strings. If a mismatch105 3. `ignore endpoints` - A list of <charm>:<endpoint> strings. If a mismatch
90 matches one of these endpoints, it will be ignored.106 matches one of these endpoints, it will be ignored.
91 1. `ignore relations` - A list of two-item <charm>:<endpoint> string lists,107 4. `ignore relations` - A list of two-item <charm>:<endpoint> string lists,
92 representing the two linked endpoints of a relation. If a mismatch108 representing the two linked endpoints of a relation. If a mismatch
93 matches one of these relations, it will be ignored.109 matches one of these relations, it will be ignored.
94110
@@ -98,7 +114,7 @@ rule will "win" and it will be flagged as an error.
98Note that all the above checks use charm names rather than application names114Note that all the above checks use charm names rather than application names
99in their endpoint strings.115in their endpoint strings.
100116
101== License ==117## License
102118
103Copyright 2020 Canonical Limited.119Copyright 2020 Canonical Limited.
104License granted by Canonical Limited.120License granted by Canonical Limited.
diff --git a/contrib/fcb-stein-bionic.yaml b/contrib/fcb-stein-bionic.yaml
105new file mode 100644121new file mode 100644
index 0000000..863058f
--- /dev/null
+++ b/contrib/fcb-stein-bionic.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovn.yaml
3!include includes/database/percona-cluster.yaml
4!include includes/release/stein.yaml
5!include includes/series/bionic.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/fcb-ussuri-bionic-ovs.yaml b/contrib/fcb-ussuri-bionic-ovs.yaml
1new file mode 10064411new file mode 100644
index 0000000..51de731
--- /dev/null
+++ b/contrib/fcb-ussuri-bionic-ovs.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovs.yaml
3!include includes/database/percona-cluster.yaml
4!include includes/release/ussuri.yaml
5!include includes/series/bionic.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/fcb-ussuri-bionic.yaml b/contrib/fcb-ussuri-bionic.yaml
1new file mode 10064411new file mode 100644
index 0000000..6fade6b
--- /dev/null
+++ b/contrib/fcb-ussuri-bionic.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovn.yaml
3!include includes/database/percona-cluster.yaml
4!include includes/release/ussuri.yaml
5!include includes/series/bionic.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/fcb-ussuri-focal-ovs.yaml b/contrib/fcb-ussuri-focal-ovs.yaml
1new file mode 10064411new file mode 100644
index 0000000..a29ed0e
--- /dev/null
+++ b/contrib/fcb-ussuri-focal-ovs.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovs.yaml
3!include includes/database/mysql.yaml
4!include includes/release/ussuri.yaml
5!include includes/series/focal.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/fcb-ussuri-focal.yaml b/contrib/fcb-ussuri-focal.yaml
1new file mode 10064411new file mode 100644
index 0000000..2e6f2eb
--- /dev/null
+++ b/contrib/fcb-ussuri-focal.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovn.yaml
3!include includes/database/mysql.yaml
4!include includes/release/ussuri.yaml
5!include includes/series/focal.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/fcb-yoga-focal.yaml b/contrib/fcb-yoga-focal.yaml
1new file mode 10064411new file mode 100644
index 0000000..4293a7d
--- /dev/null
+++ b/contrib/fcb-yoga-focal.yaml
@@ -0,0 +1,9 @@
1!include includes/base.yaml
2!include includes/networking/ovn.yaml
3!include includes/database/mysql.yaml
4!include includes/release/yoga.yaml
5!include includes/series/focal.yaml
6!include includes/openstack.yaml
7!include includes/operations.yaml
8!include includes/saas.yaml
9!include includes/aggregator-openstack.yaml
0\ No newline at end of file10\ No newline at end of file
diff --git a/contrib/includes/aggregator-openstack.yaml b/contrib/includes/aggregator-openstack.yaml
index 6982a91..58a92fa 100644
--- a/contrib/includes/aggregator-openstack.yaml
+++ b/contrib/includes/aggregator-openstack.yaml
@@ -1,20 +1,22 @@
1operations charms: &operations-charms1operations charms: &operations-charms
2 - *operations-mandatory-charms2 - *operations-mandatory-charms
3 - *operations-mandatory-deps3 - *operations-mandatory-deps
4 - *operations-mandatory-subs4 - *operations-mandatory-subs
5 - *operations-optional-charms5 - *operations-optional-charms
6 - *operations-optional-subs6 - *operations-optional-subs
7 - *operations-openstack-mandatory-charms7 - *operations-openstack-mandatory-charms
8 - *operations-openstack-mandatory-release
89
9openstack charms: &openstack-charms10openstack charms: &openstack-charms
10 - *openstack-mandatory-charms11 - *openstack-mandatory-charms
11 - *openstack-mandatory-deps12 - *openstack-mandatory-deps
12 - *openstack-mandatory-subs13 - *openstack-mandatory-subs
13 - *openstack-optional-charms14 - *openstack-optional-charms
14 - *cisco-aci-charms15 - *openstack-loadbalancer
15 - *trilio-charms16 - *cisco-aci-charms
17 - *trilio-charms
1618
17known charms:19known charms:
18 - ubuntu20 - ubuntu
19 - *openstack-charms21 - *openstack-charms
20 - *operations-charms22 - *operations-charms
diff --git a/contrib/includes/openstack.yaml b/contrib/includes/openstack.yaml
index 5235aea..1b35486 100644
--- a/contrib/includes/openstack.yaml
+++ b/contrib/includes/openstack.yaml
@@ -45,6 +45,7 @@ openstack mandatory: &openstack-mandatory-charms
45 - nova-cloud-controller45 - nova-cloud-controller
46 - nova-compute46 - nova-compute
47 - openstack-dashboard47 - openstack-dashboard
48 - bootstack-charmers-homer-dashboard
48 - *openstack-mandatory-charms-networking49 - *openstack-mandatory-charms-networking
4950
50openstack mandatory deps base: &openstack-mandatory-deps-base51openstack mandatory deps base: &openstack-mandatory-deps-base
diff --git a/contrib/includes/release/stein.yaml b/contrib/includes/release/stein.yaml
51new file mode 10064452new file mode 100644
index 0000000..7319287
--- /dev/null
+++ b/contrib/includes/release/stein.yaml
@@ -0,0 +1,4 @@
1# add prometheus ceph exporter if openstack version is lesser than ussuri
2
3operations openstack mandatory release: &operations-openstack-mandatory-release
4 - prometheus-ceph-exporter
0\ No newline at end of file5\ No newline at end of file
diff --git a/contrib/includes/release/ussuri.yaml b/contrib/includes/release/ussuri.yaml
1new file mode 1006446new file mode 100644
index 0000000..ddf9beb
--- /dev/null
+++ b/contrib/includes/release/ussuri.yaml
@@ -0,0 +1,5 @@
1# Do not add prometheus ceph exporter if openstack version is greater/equal than ussuri
2# Instead, use ceph-dashboard
3
4operations openstack mandatory release: &operations-openstack-mandatory-release
5 - ceph-dashboard
0\ No newline at end of file6\ No newline at end of file
diff --git a/contrib/includes/release/yoga.yaml b/contrib/includes/release/yoga.yaml
1new file mode 1006447new file mode 100644
index 0000000..ddf9beb
--- /dev/null
+++ b/contrib/includes/release/yoga.yaml
@@ -0,0 +1,5 @@
1# Do not add prometheus ceph exporter if openstack version is greater/equal than ussuri
2# Instead, use ceph-dashboard
3
4operations openstack mandatory release: &operations-openstack-mandatory-release
5 - ceph-dashboard
0\ No newline at end of file6\ No newline at end of file
diff --git a/contrib/includes/series/bionic.yaml b/contrib/includes/series/bionic.yaml
1new file mode 1006447new file mode 100644
index 0000000..1a9b536
--- /dev/null
+++ b/contrib/includes/series/bionic.yaml
@@ -0,0 +1,2 @@
1openstack loadbalancer: &openstack-loadbalancer []
2operations openstack mandatory series: &operations-openstack-mandatory-series []
diff --git a/contrib/includes/series/focal.yaml b/contrib/includes/series/focal.yaml
0new file mode 1006443new file mode 100644
index 0000000..4084113
--- /dev/null
+++ b/contrib/includes/series/focal.yaml
@@ -0,0 +1,3 @@
1openstack loadbalancer: &openstack-loadbalancer
2 - openstack-loadbalancer
3operations openstack mandatory series: &operations-openstack-mandatory-series []
0\ No newline at end of file4\ No newline at end of file

Subscribers

People subscribed via source and target branches