Merge ~ec0/juju-lint:add-policy-routing into juju-lint:master

Proposed by James Hebden
Status: Merged
Approved by: James Troup
Approved revision: f34c37bc4d0842c2b801659d6b1df287080ef4cd
Merged at revision: b8b40d11bf5d7629659dff20e94cc933e091a403
Proposed branch: ~ec0/juju-lint:add-policy-routing
Merge into: juju-lint:master
Diff against target: 97 lines (+28/-4)
4 files modified
contrib/canonical-rules.yaml (+18/-1)
jujulint/lint.py (+7/-0)
requirements.txt (+1/-0)
snap/snapcraft.yaml (+2/-3)
Reviewer Review Type Date Requested Status
Juju Lint maintainers Pending
Review via email: mp+390003@code.launchpad.net

Commit message

Add policy routing and other optional subordinates to optional subordinates and openstack operations charms the the contrib Canonical rules

Description of the change

Update optional and mandatory operations and OpenStack-specific operational charms in the Canonical contributed rules

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
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision b8b40d11bf5d7629659dff20e94cc933e091a403

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/contrib/canonical-rules.yaml b/contrib/canonical-rules.yaml
2index 1d9c07c..8e7a250 100644
3--- a/contrib/canonical-rules.yaml
4+++ b/contrib/canonical-rules.yaml
5@@ -88,8 +88,16 @@ operations mandatory: &operations-mandatory-charms
6 - graylog
7 - landscape-server
8 - nagios
9- - openstack-service-checks
10 - prometheus2
11+
12+operations optional: &operations-optional-charms
13+ - infra-node
14+ - hw-health
15+ - cloudstats
16+
17+operations openstack mandatory: &operations-openstack-mandatory-charms
18+ - openstack-service-checks
19+ - prometheus-libvirt-exporter
20 - prometheus-openstack-exporter
21 - prometheus-ceph-exporter
22
23@@ -107,10 +115,19 @@ operations subordinates: &operations-mandatory-subs
24 - telegraf
25 - thruk-agent
26
27+operations optional subordinates: &operations-optional-subs
28+ - policy-routing
29+ - bcache-tuning
30+ - sysconfig
31+ - logrotate-charm
32+
33 operations charms: &operations-charms
34 - *operations-mandatory-charms
35 - *operations-mandatory-deps
36 - *operations-mandatory-subs
37+ - *operations-optional-charms
38+ - *operations-optional-subs
39+ - *operations-openstack-mandatory-charms
40
41 openstack mandatory: &openstack-mandatory-charms
42 - ceilometer
43diff --git a/jujulint/lint.py b/jujulint/lint.py
44index a132541..6e6a1b0 100755
45--- a/jujulint/lint.py
46+++ b/jujulint/lint.py
47@@ -569,6 +569,13 @@ class Linter:
48 self.controller_name,
49 )
50 )
51+ for charm in self.lint_rules["operations openstack mandatory"]:
52+ if charm not in self.model.charms:
53+ self.logger.error(
54+ "[{}] Ops charm '{}' in OpenStack model {} on controller {} not found".format(
55+ self.cloud_name, charm, self.model_name, self.controller_name
56+ )
57+ )
58 elif self.cloud_type == "kubernetes":
59 for charm in self.lint_rules["kubernetes mandatory"]:
60 if charm not in self.model.charms:
61diff --git a/requirements.txt b/requirements.txt
62index 9527545..5b51974 100644
63--- a/requirements.txt
64+++ b/requirements.txt
65@@ -1,3 +1,4 @@
66+paramiko>=2.7.2
67 attrs>=18.1.0
68 colorlog>=4.1.0
69 confuse>=1.1.0
70diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
71index 9ec50ef..a24b8d2 100644
72--- a/snap/snapcraft.yaml
73+++ b/snap/snapcraft.yaml
74@@ -1,6 +1,6 @@
75 ---
76 name: juju-lint
77-base: core18
78+base: core20
79 summary: Linter for Juju models to compare deployments with configurable policy
80 adopt-info: juju-lint
81 description: |
82@@ -11,14 +11,13 @@ grade: stable
83 confinement: classic
84 apps:
85 juju-lint:
86- command: juju-lint
87+ command: bin/juju-lint
88 environment:
89 PATH: "/snap/juju-lint/current/bin:/snap/juju-lint/current/usr/bin:/bin:/usr/bin:"
90 PYTHONPATH: $SNAP/usr/lib/python3.6/site-packages:$SNAP/usr/lib/python3.6/dist-packages:$PYTHONPATH
91 parts:
92 juju-lint:
93 plugin: python
94- python-version: python3
95 requirements:
96 - requirements.txt
97 source: .

Subscribers

People subscribed via source and target branches