Merge ~cjwatson/ols-charm-deps:apache-license into ols-charm-deps:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: 01cdd7f5d6a4e39affc0f6567806bf9d8341fba1
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/ols-charm-deps:apache-license
Merge into: ols-charm-deps:master
Diff against target: 1227 lines (+843/-1)
46 files modified
LICENSE (+215/-0)
Makefile (+14/-0)
charm-dependencies (+14/-0)
layer/ols-celery/config.yaml (+14/-0)
layer/ols-celery/layer.yaml (+14/-0)
layer/ols-celery/lib/ols/celery.py (+14/-0)
layer/ols-celery/metadata.yaml (+14/-0)
layer/ols-celery/reactive/ols_celery.py (+14/-0)
layer/ols-http/config.yaml (+14/-0)
layer/ols-http/layer.yaml (+14/-0)
layer/ols-http/lib/ols/http.py (+14/-0)
layer/ols-http/metadata.yaml (+14/-0)
layer/ols-http/reactive/ols_http.py (+14/-0)
layer/ols-http/unit_tests/test_ols_http.py (+14/-0)
layer/ols-pg/actions.yaml (+14/-0)
layer/ols-pg/actions/migrate (+14/-0)
layer/ols-pg/config.yaml (+14/-0)
layer/ols-pg/layer.yaml (+15/-1)
layer/ols-pg/lib/ols/postgres.py (+14/-0)
layer/ols-pg/metadata.yaml (+14/-0)
layer/ols-pg/reactive/ols_pg.py (+14/-0)
layer/ols-wsgi/config.yaml (+14/-0)
layer/ols-wsgi/layer.yaml (+14/-0)
layer/ols-wsgi/lib/ols/gunicorn.py (+14/-0)
layer/ols-wsgi/lib/ols/wsgi.py (+14/-0)
layer/ols-wsgi/metadata.yaml (+14/-0)
layer/ols-wsgi/reactive/ols_wsgi.py (+14/-0)
layer/ols-wsgi/unit_tests/test_ols_wsgi.py (+14/-0)
layer/ols/actions.yaml (+14/-0)
layer/ols/actions/debug (+13/-0)
layer/ols/actions/show-config (+14/-0)
layer/ols/config.yaml (+14/-0)
layer/ols/layer.yaml (+14/-0)
layer/ols/lib/ols/base.py (+14/-0)
layer/ols/lib/ols/render.py (+14/-0)
layer/ols/metadata.yaml (+14/-0)
layer/ols/reactive/ols.py (+14/-0)
layer/ols/unit_tests/base_fixtures.py (+14/-0)
layer/ols/unit_tests/test_ols.py (+14/-0)
ols-vms.conf (+14/-0)
pyproject.toml (+14/-0)
setup-container (+14/-0)
stubcharm/files/testservice/webapp.py (+12/-0)
stubcharm/layer.yaml (+14/-0)
stubcharm/metadata.yaml (+14/-0)
stubcharm/reactive/testservice.py (+14/-0)
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Review via email: mp+438196@code.launchpad.net

Commit message

Apply the Apache License, version 2.0

Description of the change

Canonical's internal software licensing documentation says that charms should be licensed under Apache 2.0, so do so here in preparation for open-sourcing. Some of our charm dependencies are under different licenses, so I noted that explicitly in the `LICENSE` file.

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

Do we need to include the license header on each file?

Revision history for this message
Colin Watson (cjwatson) wrote :

https://sites.google.com/a/canonical.com/operations/legal/software-licensing says "Add a notice at the top of each file you create", under "Source files". But I can take it off the YAML files if you like - I suspect it isn't all that vital there?

Revision history for this message
Guillermo Gonzalez (verterok) wrote :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/LICENSE b/LICENSE
0new file mode 1006440new file mode 100644
index 0000000..142874e
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,215 @@
1ols-layers is Copyright (C) 2019-2023 Canonical Ltd.
2
3Canonical Ltd ("Canonical") distributes the ols-layers source code under the
4Apache License, version 2.0. The full text of this license is given below.
5
6Note that ols-layers incorporates some components that are under different
7licenses. The strictest of these is the GNU Affero General Public License,
8version 3 ("AGPLv3"), used by interfaces/memcache; as a result, the
9effective license of the work as a whole is currently the AGPLv3.
10
11=========================================================================
12
13 Apache License
14 Version 2.0, January 2004
15 http://www.apache.org/licenses/
16
17 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
18
19 1. Definitions.
20
21 "License" shall mean the terms and conditions for use, reproduction,
22 and distribution as defined by Sections 1 through 9 of this document.
23
24 "Licensor" shall mean the copyright owner or entity authorized by
25 the copyright owner that is granting the License.
26
27 "Legal Entity" shall mean the union of the acting entity and all
28 other entities that control, are controlled by, or are under common
29 control with that entity. For the purposes of this definition,
30 "control" means (i) the power, direct or indirect, to cause the
31 direction or management of such entity, whether by contract or
32 otherwise, or (ii) ownership of fifty percent (50%) or more of the
33 outstanding shares, or (iii) beneficial ownership of such entity.
34
35 "You" (or "Your") shall mean an individual or Legal Entity
36 exercising permissions granted by this License.
37
38 "Source" form shall mean the preferred form for making modifications,
39 including but not limited to software source code, documentation
40 source, and configuration files.
41
42 "Object" form shall mean any form resulting from mechanical
43 transformation or translation of a Source form, including but
44 not limited to compiled object code, generated documentation,
45 and conversions to other media types.
46
47 "Work" shall mean the work of authorship, whether in Source or
48 Object form, made available under the License, as indicated by a
49 copyright notice that is included in or attached to the work
50 (an example is provided in the Appendix below).
51
52 "Derivative Works" shall mean any work, whether in Source or Object
53 form, that is based on (or derived from) the Work and for which the
54 editorial revisions, annotations, elaborations, or other modifications
55 represent, as a whole, an original work of authorship. For the purposes
56 of this License, Derivative Works shall not include works that remain
57 separable from, or merely link (or bind by name) to the interfaces of,
58 the Work and Derivative Works thereof.
59
60 "Contribution" shall mean any work of authorship, including
61 the original version of the Work and any modifications or additions
62 to that Work or Derivative Works thereof, that is intentionally
63 submitted to Licensor for inclusion in the Work by the copyright owner
64 or by an individual or Legal Entity authorized to submit on behalf of
65 the copyright owner. For the purposes of this definition, "submitted"
66 means any form of electronic, verbal, or written communication sent
67 to the Licensor or its representatives, including but not limited to
68 communication on electronic mailing lists, source code control systems,
69 and issue tracking systems that are managed by, or on behalf of, the
70 Licensor for the purpose of discussing and improving the Work, but
71 excluding communication that is conspicuously marked or otherwise
72 designated in writing by the copyright owner as "Not a Contribution."
73
74 "Contributor" shall mean Licensor and any individual or Legal Entity
75 on behalf of whom a Contribution has been received by Licensor and
76 subsequently incorporated within the Work.
77
78 2. Grant of Copyright License. Subject to the terms and conditions of
79 this License, each Contributor hereby grants to You a perpetual,
80 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
81 copyright license to reproduce, prepare Derivative Works of,
82 publicly display, publicly perform, sublicense, and distribute the
83 Work and such Derivative Works in Source or Object form.
84
85 3. Grant of Patent License. Subject to the terms and conditions of
86 this License, each Contributor hereby grants to You a perpetual,
87 worldwide, non-exclusive, no-charge, royalty-free, irrevocable
88 (except as stated in this section) patent license to make, have made,
89 use, offer to sell, sell, import, and otherwise transfer the Work,
90 where such license applies only to those patent claims licensable
91 by such Contributor that are necessarily infringed by their
92 Contribution(s) alone or by combination of their Contribution(s)
93 with the Work to which such Contribution(s) was submitted. If You
94 institute patent litigation against any entity (including a
95 cross-claim or counterclaim in a lawsuit) alleging that the Work
96 or a Contribution incorporated within the Work constitutes direct
97 or contributory patent infringement, then any patent licenses
98 granted to You under this License for that Work shall terminate
99 as of the date such litigation is filed.
100
101 4. Redistribution. You may reproduce and distribute copies of the
102 Work or Derivative Works thereof in any medium, with or without
103 modifications, and in Source or Object form, provided that You
104 meet the following conditions:
105
106 (a) You must give any other recipients of the Work or
107 Derivative Works a copy of this License; and
108
109 (b) You must cause any modified files to carry prominent notices
110 stating that You changed the files; and
111
112 (c) You must retain, in the Source form of any Derivative Works
113 that You distribute, all copyright, patent, trademark, and
114 attribution notices from the Source form of the Work,
115 excluding those notices that do not pertain to any part of
116 the Derivative Works; and
117
118 (d) If the Work includes a "NOTICE" text file as part of its
119 distribution, then any Derivative Works that You distribute must
120 include a readable copy of the attribution notices contained
121 within such NOTICE file, excluding those notices that do not
122 pertain to any part of the Derivative Works, in at least one
123 of the following places: within a NOTICE text file distributed
124 as part of the Derivative Works; within the Source form or
125 documentation, if provided along with the Derivative Works; or,
126 within a display generated by the Derivative Works, if and
127 wherever such third-party notices normally appear. The contents
128 of the NOTICE file are for informational purposes only and
129 do not modify the License. You may add Your own attribution
130 notices within Derivative Works that You distribute, alongside
131 or as an addendum to the NOTICE text from the Work, provided
132 that such additional attribution notices cannot be construed
133 as modifying the License.
134
135 You may add Your own copyright statement to Your modifications and
136 may provide additional or different license terms and conditions
137 for use, reproduction, or distribution of Your modifications, or
138 for any such Derivative Works as a whole, provided Your use,
139 reproduction, and distribution of the Work otherwise complies with
140 the conditions stated in this License.
141
142 5. Submission of Contributions. Unless You explicitly state otherwise,
143 any Contribution intentionally submitted for inclusion in the Work
144 by You to the Licensor shall be under the terms and conditions of
145 this License, without any additional terms or conditions.
146 Notwithstanding the above, nothing herein shall supersede or modify
147 the terms of any separate license agreement you may have executed
148 with Licensor regarding such Contributions.
149
150 6. Trademarks. This License does not grant permission to use the trade
151 names, trademarks, service marks, or product names of the Licensor,
152 except as required for reasonable and customary use in describing the
153 origin of the Work and reproducing the content of the NOTICE file.
154
155 7. Disclaimer of Warranty. Unless required by applicable law or
156 agreed to in writing, Licensor provides the Work (and each
157 Contributor provides its Contributions) on an "AS IS" BASIS,
158 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
159 implied, including, without limitation, any warranties or conditions
160 of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
161 PARTICULAR PURPOSE. You are solely responsible for determining the
162 appropriateness of using or redistributing the Work and assume any
163 risks associated with Your exercise of permissions under this License.
164
165 8. Limitation of Liability. In no event and under no legal theory,
166 whether in tort (including negligence), contract, or otherwise,
167 unless required by applicable law (such as deliberate and grossly
168 negligent acts) or agreed to in writing, shall any Contributor be
169 liable to You for damages, including any direct, indirect, special,
170 incidental, or consequential damages of any character arising as a
171 result of this License or out of the use or inability to use the
172 Work (including but not limited to damages for loss of goodwill,
173 work stoppage, computer failure or malfunction, or any and all
174 other commercial damages or losses), even if such Contributor
175 has been advised of the possibility of such damages.
176
177 9. Accepting Warranty or Additional Liability. While redistributing
178 the Work or Derivative Works thereof, You may choose to offer,
179 and charge a fee for, acceptance of support, warranty, indemnity,
180 or other liability obligations and/or rights consistent with this
181 License. However, in accepting such obligations, You may act only
182 on Your own behalf and on Your sole responsibility, not on behalf
183 of any other Contributor, and only if You agree to indemnify,
184 defend, and hold each Contributor harmless for any liability
185 incurred by, or claims asserted against, such Contributor by reason
186 of your accepting any such warranty or additional liability.
187
188 END OF TERMS AND CONDITIONS
189
190 APPENDIX: How to apply the Apache License to your work.
191
192 To apply the Apache License to your work, attach the following
193 boilerplate notice, with the fields enclosed by brackets "[]"
194 replaced with your own identifying information. (Don't include
195 the brackets!) The text should be enclosed in the appropriate
196 comment syntax for the file format. We also recommend that a
197 file or class name and description of purpose be included on the
198 same "printed page" as the copyright notice for easier
199 identification within third-party archives.
200
201 Copyright [yyyy] [name of copyright owner]
202
203 Licensed under the Apache License, Version 2.0 (the "License");
204 you may not use this file except in compliance with the License.
205 You may obtain a copy of the License at
206
207 http://www.apache.org/licenses/LICENSE-2.0
208
209 Unless required by applicable law or agreed to in writing, software
210 distributed under the License is distributed on an "AS IS" BASIS,
211 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
212 See the License for the specific language governing permissions and
213 limitations under the License.
214
215=========================================================================
diff --git a/Makefile b/Makefile
index 0937905..6badd07 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1TEST_TIMEOUT := 90015TEST_TIMEOUT := 900
216
3# /!\ Ensure that errors early in pipes cause failures, rather than17# /!\ Ensure that errors early in pipes cause failures, rather than
diff --git a/charm-dependencies b/charm-dependencies
index a054042..a4de8f2 100644
--- a/charm-dependencies
+++ b/charm-dependencies
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1interface @15interface @
2interface/nrpe-external-master git+https://github.com/canonical-ols/nrpe-external-master-interface.git;revno=274a6fb16interface/nrpe-external-master git+https://github.com/canonical-ols/nrpe-external-master-interface.git;revno=274a6fb
3interface/http git+https://github.com/juju-solutions/interface-http.git;revno=5134e9417interface/http git+https://github.com/juju-solutions/interface-http.git;revno=5134e94
diff --git a/layer/ols-celery/config.yaml b/layer/ols-celery/config.yaml
index 0bcb178..4ab6059 100644
--- a/layer/ols-celery/config.yaml
+++ b/layer/ols-celery/config.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1options:15options:
2 celery_default_worker_concurrency:16 celery_default_worker_concurrency:
3 type: int 17 type: int
diff --git a/layer/ols-celery/layer.yaml b/layer/ols-celery/layer.yaml
index 3efa8df..408cc5e 100644
--- a/layer/ols-celery/layer.yaml
+++ b/layer/ols-celery/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1includes: 15includes:
2 - layer:ols16 - layer:ols
3 - layer:leadership17 - layer:leadership
diff --git a/layer/ols-celery/lib/ols/celery.py b/layer/ols-celery/lib/ols/celery.py
index 7ba1775..978ec9e 100644
--- a/layer/ols-celery/lib/ols/celery.py
+++ b/layer/ols-celery/lib/ols/celery.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from charmhelpers.core import hookenv, host15from charmhelpers.core import hookenv, host
216
3from ols import base17from ols import base
diff --git a/layer/ols-celery/metadata.yaml b/layer/ols-celery/metadata.yaml
index f90a800..efb9a24 100644
--- a/layer/ols-celery/metadata.yaml
+++ b/layer/ols-celery/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: ols-wsgi15name: ols-wsgi
2summary: <Fill in summary here>16summary: <Fill in summary here>
3maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>17maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
diff --git a/layer/ols-celery/reactive/ols_celery.py b/layer/ols-celery/reactive/ols_celery.py
index 95fa1b9..3ce96be 100644
--- a/layer/ols-celery/reactive/ols_celery.py
+++ b/layer/ols-celery/reactive/ols_celery.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import os15import os
2import subprocess16import subprocess
317
diff --git a/layer/ols-http/config.yaml b/layer/ols-http/config.yaml
index c8b894c..69631b5 100644
--- a/layer/ols-http/config.yaml
+++ b/layer/ols-http/config.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1options:15options:
2 # expose haproxy options for ops benefit16 # expose haproxy options for ops benefit
3 haproxy_service_options:17 haproxy_service_options:
diff --git a/layer/ols-http/layer.yaml b/layer/ols-http/layer.yaml
index 222e156..dd91b10 100644
--- a/layer/ols-http/layer.yaml
+++ b/layer/ols-http/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1includes: 15includes:
2 - layer:ols16 - layer:ols
3 - interface:http17 - interface:http
diff --git a/layer/ols-http/lib/ols/http.py b/layer/ols-http/lib/ols/http.py
index aec57f7..7ecc058 100644
--- a/layer/ols-http/lib/ols/http.py
+++ b/layer/ols-http/lib/ols/http.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import time15import time
2import urllib.request16import urllib.request
317
diff --git a/layer/ols-http/metadata.yaml b/layer/ols-http/metadata.yaml
index cf42356..0238aad 100644
--- a/layer/ols-http/metadata.yaml
+++ b/layer/ols-http/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: ols-http15name: ols-http
2summary: <Fill in summary here>16summary: <Fill in summary here>
3maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>17maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
diff --git a/layer/ols-http/reactive/ols_http.py b/layer/ols-http/reactive/ols_http.py
index 64ac372..d04c174 100644
--- a/layer/ols-http/reactive/ols_http.py
+++ b/layer/ols-http/reactive/ols_http.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import yaml15import yaml
216
3from charms.reactive import remove_state, when, when_not17from charms.reactive import remove_state, when, when_not
diff --git a/layer/ols-http/unit_tests/test_ols_http.py b/layer/ols-http/unit_tests/test_ols_http.py
index e40f6c1..f50c5eb 100644
--- a/layer/ols-http/unit_tests/test_ols_http.py
+++ b/layer/ols-http/unit_tests/test_ols_http.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import urllib15import urllib
216
3import yaml17import yaml
diff --git a/layer/ols-pg/actions.yaml b/layer/ols-pg/actions.yaml
index d3846d7..9bd549e 100644
--- a/layer/ols-pg/actions.yaml
+++ b/layer/ols-pg/actions.yaml
@@ -1,2 +1,16 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1migrate:15migrate:
2 description: Run all pending migrations.16 description: Run all pending migrations.
diff --git a/layer/ols-pg/actions/migrate b/layer/ols-pg/actions/migrate
index 5083330..0520d08 100755
--- a/layer/ols-pg/actions/migrate
+++ b/layer/ols-pg/actions/migrate
@@ -1,5 +1,19 @@
1#!/usr/bin/env python31#!/usr/bin/env python3
22
3# Copyright 2019-2023 Canonical Ltd.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# https://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
3# Load modules from $CHARM_DIR/lib17# Load modules from $CHARM_DIR/lib
4import sys18import sys
5sys.path.append('lib')19sys.path.append('lib')
diff --git a/layer/ols-pg/config.yaml b/layer/ols-pg/config.yaml
index 817aeb1..65b4fd3 100644
--- a/layer/ols-pg/config.yaml
+++ b/layer/ols-pg/config.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1options:15options:
2 db_name:16 db_name:
3 type: string17 type: string
diff --git a/layer/ols-pg/layer.yaml b/layer/ols-pg/layer.yaml
index acb1c0a..482ec63 100644
--- a/layer/ols-pg/layer.yaml
+++ b/layer/ols-pg/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1includes: 15includes:
2 - layer:ols16 - layer:ols
3 - interface:pgsql17 - interface:pgsql
@@ -7,4 +21,4 @@ options:
7 - libpq521 - libpq5
8 - libpq-dev22 - libpq-dev
9 - gcc23 - gcc
10 - python3-dev
11\ No newline at end of file24\ No newline at end of file
25 - python3-dev
diff --git a/layer/ols-pg/lib/ols/postgres.py b/layer/ols-pg/lib/ols/postgres.py
index 58d4727..29fc6fa 100644
--- a/layer/ols-pg/lib/ols/postgres.py
+++ b/layer/ols-pg/lib/ols/postgres.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import os15import os
2import yaml16import yaml
3import subprocess17import subprocess
diff --git a/layer/ols-pg/metadata.yaml b/layer/ols-pg/metadata.yaml
index e659b07..d169879 100644
--- a/layer/ols-pg/metadata.yaml
+++ b/layer/ols-pg/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: ols-pg15name: ols-pg
2summary: <Fill in summary here>16summary: <Fill in summary here>
3maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>17maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
diff --git a/layer/ols-pg/reactive/ols_pg.py b/layer/ols-pg/reactive/ols_pg.py
index 9ac4e4c..cd9b0f8 100644
--- a/layer/ols-pg/reactive/ols_pg.py
+++ b/layer/ols-pg/reactive/ols_pg.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from charms.reactive import when_any, RelationBase15from charms.reactive import when_any, RelationBase
2from ols import postgres16from ols import postgres
317
diff --git a/layer/ols-wsgi/config.yaml b/layer/ols-wsgi/config.yaml
index 3c52197..df316d9 100644
--- a/layer/ols-wsgi/config.yaml
+++ b/layer/ols-wsgi/config.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1options:15options:
2 wsgi_workers:16 wsgi_workers:
3 type: int17 type: int
diff --git a/layer/ols-wsgi/layer.yaml b/layer/ols-wsgi/layer.yaml
index 0bd5517..19b7adb 100644
--- a/layer/ols-wsgi/layer.yaml
+++ b/layer/ols-wsgi/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1includes: 15includes:
2 - layer:ols-http16 - layer:ols-http
3options:17options:
diff --git a/layer/ols-wsgi/lib/ols/gunicorn.py b/layer/ols-wsgi/lib/ols/gunicorn.py
index afa315a..b5520db 100755
--- a/layer/ols-wsgi/lib/ols/gunicorn.py
+++ b/layer/ols-wsgi/lib/ols/gunicorn.py
@@ -1,6 +1,20 @@
1#!/usr/bin/env python1#!/usr/bin/env python
2# vim: et ai ts=4 sw=4:2# vim: et ai ts=4 sw=4:
33
4# Copyright 2019-2023 Canonical Ltd.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# https://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17
4import os18import os
5import random19import random
6import subprocess20import subprocess
diff --git a/layer/ols-wsgi/lib/ols/wsgi.py b/layer/ols-wsgi/lib/ols/wsgi.py
index 200e67c..0ec5e9f 100644
--- a/layer/ols-wsgi/lib/ols/wsgi.py
+++ b/layer/ols-wsgi/lib/ols/wsgi.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from ols import base15from ols import base
216
3# derived configs #17# derived configs #
diff --git a/layer/ols-wsgi/metadata.yaml b/layer/ols-wsgi/metadata.yaml
index 2a5c5cb..372f060 100644
--- a/layer/ols-wsgi/metadata.yaml
+++ b/layer/ols-wsgi/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: ols-wsgi15name: ols-wsgi
2summary: <Fill in summary here>16summary: <Fill in summary here>
3maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>17maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
diff --git a/layer/ols-wsgi/reactive/ols_wsgi.py b/layer/ols-wsgi/reactive/ols_wsgi.py
index 5170371..fa1bbfe 100644
--- a/layer/ols-wsgi/reactive/ols_wsgi.py
+++ b/layer/ols-wsgi/reactive/ols_wsgi.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from charms.reactive import helpers, hook, when, set_state, remove_state15from charms.reactive import helpers, hook, when, set_state, remove_state
216
3from ols import gunicorn, wsgi, base, http17from ols import gunicorn, wsgi, base, http
diff --git a/layer/ols-wsgi/unit_tests/test_ols_wsgi.py b/layer/ols-wsgi/unit_tests/test_ols_wsgi.py
index 6fcaf66..2f3f2e7 100644
--- a/layer/ols-wsgi/unit_tests/test_ols_wsgi.py
+++ b/layer/ols-wsgi/unit_tests/test_ols_wsgi.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from unittest.mock import patch, call15from unittest.mock import patch, call
216
3from charms import layer17from charms import layer
diff --git a/layer/ols/actions.yaml b/layer/ols/actions.yaml
index 652a6ef..2bb7002 100644
--- a/layer/ols/actions.yaml
+++ b/layer/ols/actions.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1debug:15debug:
2 description: print the state of all relations16 description: print the state of all relations
3show-config:17show-config:
diff --git a/layer/ols/actions/debug b/layer/ols/actions/debug
index 106d567..f60b16d 100755
--- a/layer/ols/actions/debug
+++ b/layer/ols/actions/debug
@@ -1,6 +1,19 @@
1#!../.venv/bin/python1#!../.venv/bin/python
2# the above is hack. I think reactive should activate the venv before running2# the above is hack. I think reactive should activate the venv before running
3# actions.3# actions.
4# Copyright 2019-2023 Canonical Ltd.
5#
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# https://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
417
5from pprint import pformat18from pprint import pformat
6from charmhelpers.core import hookenv19from charmhelpers.core import hookenv
diff --git a/layer/ols/actions/show-config b/layer/ols/actions/show-config
index 5ea46c2..636e3cf 100755
--- a/layer/ols/actions/show-config
+++ b/layer/ols/actions/show-config
@@ -1,5 +1,19 @@
1#!../.venv/bin/python1#!../.venv/bin/python
2# the above is hack, reactive should activate the venv before running actions.2# the above is hack, reactive should activate the venv before running actions.
3# Copyright 2019-2023 Canonical Ltd.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# https://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
3import os17import os
4import sys18import sys
519
diff --git a/layer/ols/config.yaml b/layer/ols/config.yaml
index c009768..4e0b685 100644
--- a/layer/ols/config.yaml
+++ b/layer/ols/config.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1options:15options:
2 install_sources:16 install_sources:
3 # description and type comes from the apt layer.17 # description and type comes from the apt layer.
diff --git a/layer/ols/layer.yaml b/layer/ols/layer.yaml
index a9ab78c..a923980 100644
--- a/layer/ols/layer.yaml
+++ b/layer/ols/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1includes: 15includes:
2 - layer:basic16 - layer:basic
3 - layer:apt17 - layer:apt
diff --git a/layer/ols/lib/ols/base.py b/layer/ols/lib/ols/base.py
index 5d3b74f..a3c4dc0 100644
--- a/layer/ols/lib/ols/base.py
+++ b/layer/ols/lib/ols/base.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import ast15import ast
2from collections import OrderedDict16from collections import OrderedDict
3import errno17import errno
diff --git a/layer/ols/lib/ols/render.py b/layer/ols/lib/ols/render.py
index 2a6731c..1638811 100644
--- a/layer/ols/lib/ols/render.py
+++ b/layer/ols/lib/ols/render.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import os15import os
2import subprocess16import subprocess
317
diff --git a/layer/ols/metadata.yaml b/layer/ols/metadata.yaml
index 3636e96..14e96ef 100644
--- a/layer/ols/metadata.yaml
+++ b/layer/ols/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: ols15name: ols
2summary: <Fill in summary here>16summary: <Fill in summary here>
3maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>17maintainer: Guillermo Gonzalez <guillermo.gonzalez@canonical.com>
diff --git a/layer/ols/reactive/ols.py b/layer/ols/reactive/ols.py
index 3463b8b..9b6a179 100644
--- a/layer/ols/reactive/ols.py
+++ b/layer/ols/reactive/ols.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import os15import os
2from charms.reactive import hook, when, when_not, set_state, remove_state16from charms.reactive import hook, when, when_not, set_state, remove_state
317
diff --git a/layer/ols/unit_tests/base_fixtures.py b/layer/ols/unit_tests/base_fixtures.py
index cb49df6..33f45d1 100644
--- a/layer/ols/unit_tests/base_fixtures.py
+++ b/layer/ols/unit_tests/base_fixtures.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import os15import os
2import shutil16import shutil
3import sys17import sys
diff --git a/layer/ols/unit_tests/test_ols.py b/layer/ols/unit_tests/test_ols.py
index d0b386f..eede4ad 100644
--- a/layer/ols/unit_tests/test_ols.py
+++ b/layer/ols/unit_tests/test_ols.py
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1import io15import io
2import os16import os
3import subprocess17import subprocess
diff --git a/ols-vms.conf b/ols-vms.conf
index 1451513..ff6add3 100644
--- a/ols-vms.conf
+++ b/ols-vms.conf
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1vm.architecture = amd6415vm.architecture = amd64
2vm.release = focal16vm.release = focal
317
diff --git a/pyproject.toml b/pyproject.toml
index da38ae0..120a19d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,3 +1,17 @@
1# Copyright 2019-2023 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1[tool.black]15[tool.black]
2skip-string-normalization = true16skip-string-normalization = true
3skip-magic-trailing-comma = true17skip-magic-trailing-comma = true
diff --git a/setup-container b/setup-container
index 5a9dfe5..2e4a994 100755
--- a/setup-container
+++ b/setup-container
@@ -1,4 +1,18 @@
1#!/bin/sh1#!/bin/sh
2# Copyright 2019-2023 Canonical Ltd.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
2# Do all the necessary magic to prepare and bootstrap the container16# Do all the necessary magic to prepare and bootstrap the container
317
4# Barf if not uid 018# Barf if not uid 0
diff --git a/stubcharm/files/testservice/webapp.py b/stubcharm/files/testservice/webapp.py
index 0df6e43..b566fb4 100644
--- a/stubcharm/files/testservice/webapp.py
+++ b/stubcharm/files/testservice/webapp.py
@@ -1,5 +1,17 @@
1# -*- coding: utf-8 -*-1# -*- coding: utf-8 -*-
2# Copyright 2019 Canonical Ltd.2# Copyright 2019 Canonical Ltd.
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# https://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
315
416
5def app(env, start_response):17def app(env, start_response):
diff --git a/stubcharm/layer.yaml b/stubcharm/layer.yaml
index 5624641..0d80408 100644
--- a/stubcharm/layer.yaml
+++ b/stubcharm/layer.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1repo: lp:stubcharm15repo: lp:stubcharm
2includes: 16includes:
3 - layer:ols-wsgi17 - layer:ols-wsgi
diff --git a/stubcharm/metadata.yaml b/stubcharm/metadata.yaml
index 5d29f16..4d1c10e 100644
--- a/stubcharm/metadata.yaml
+++ b/stubcharm/metadata.yaml
@@ -1,3 +1,17 @@
1# Copyright 2019 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1name: stubcharm15name: stubcharm
2summary: To test layers16summary: To test layers
3maintainer: Onlines Services <online-services@canonical.com>17maintainer: Onlines Services <online-services@canonical.com>
diff --git a/stubcharm/reactive/testservice.py b/stubcharm/reactive/testservice.py
index ff4e16a..0757645 100644
--- a/stubcharm/reactive/testservice.py
+++ b/stubcharm/reactive/testservice.py
@@ -1,3 +1,17 @@
1# Copyright 2019 Canonical Ltd.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
1from ols import base, postgres, celery15from ols import base, postgres, celery
216
3from charms.reactive import (17from charms.reactive import (

Subscribers

People subscribed via source and target branches