Browse Source

Resync charmhelpers for licensing change

The charm-helpers project have re-licensed to Apache 2.0
inline with the agreed licensing approach to intefaces,
layers and charms generally.

Resync helpers to bring charmhelpers inline with charm
codebase.

Change-Id: Id34d182bd1804072e11c26fd5e426c3be18b1847
changes/34/338334/1
James Page 2 years ago
parent
commit
3a208f359f
60 changed files with 664 additions and 673 deletions
  1. 9
    11
      hooks/charmhelpers/__init__.py
  2. 9
    11
      hooks/charmhelpers/contrib/__init__.py
  3. 9
    11
      hooks/charmhelpers/contrib/hahelpers/__init__.py
  4. 9
    11
      hooks/charmhelpers/contrib/hahelpers/apache.py
  5. 12
    14
      hooks/charmhelpers/contrib/hahelpers/cluster.py
  6. 9
    11
      hooks/charmhelpers/contrib/network/__init__.py
  7. 9
    11
      hooks/charmhelpers/contrib/network/ip.py
  8. 9
    11
      hooks/charmhelpers/contrib/openstack/__init__.py
  9. 9
    11
      hooks/charmhelpers/contrib/openstack/alternatives.py
  10. 9
    11
      hooks/charmhelpers/contrib/openstack/amulet/__init__.py
  11. 9
    11
      hooks/charmhelpers/contrib/openstack/amulet/deployment.py
  12. 9
    11
      hooks/charmhelpers/contrib/openstack/amulet/utils.py
  13. 17
    19
      hooks/charmhelpers/contrib/openstack/context.py
  14. 15
    0
      hooks/charmhelpers/contrib/openstack/exceptions.py
  15. 9
    11
      hooks/charmhelpers/contrib/openstack/files/__init__.py
  16. 13
    0
      hooks/charmhelpers/contrib/openstack/ha/__init__.py
  17. 29
    12
      hooks/charmhelpers/contrib/openstack/ha/utils.py
  18. 9
    12
      hooks/charmhelpers/contrib/openstack/ip.py
  19. 9
    11
      hooks/charmhelpers/contrib/openstack/neutron.py
  20. 9
    11
      hooks/charmhelpers/contrib/openstack/templates/__init__.py
  21. 9
    11
      hooks/charmhelpers/contrib/openstack/templating.py
  22. 86
    30
      hooks/charmhelpers/contrib/openstack/utils.py
  23. 9
    11
      hooks/charmhelpers/contrib/python/__init__.py
  24. 14
    12
      hooks/charmhelpers/contrib/python/packages.py
  25. 9
    11
      hooks/charmhelpers/contrib/storage/__init__.py
  26. 9
    11
      hooks/charmhelpers/contrib/storage/linux/__init__.py
  27. 9
    11
      hooks/charmhelpers/contrib/storage/linux/ceph.py
  28. 9
    11
      hooks/charmhelpers/contrib/storage/linux/loopback.py
  29. 9
    11
      hooks/charmhelpers/contrib/storage/linux/lvm.py
  30. 9
    11
      hooks/charmhelpers/contrib/storage/linux/utils.py
  31. 9
    11
      hooks/charmhelpers/core/__init__.py
  32. 9
    11
      hooks/charmhelpers/core/decorators.py
  33. 9
    11
      hooks/charmhelpers/core/files.py
  34. 9
    11
      hooks/charmhelpers/core/fstab.py
  35. 10
    12
      hooks/charmhelpers/core/hookenv.py
  36. 9
    11
      hooks/charmhelpers/core/host.py
  37. 9
    11
      hooks/charmhelpers/core/hugepage.py
  38. 9
    11
      hooks/charmhelpers/core/kernel.py
  39. 9
    11
      hooks/charmhelpers/core/services/__init__.py
  40. 9
    11
      hooks/charmhelpers/core/services/base.py
  41. 9
    11
      hooks/charmhelpers/core/services/helpers.py
  42. 9
    11
      hooks/charmhelpers/core/strutils.py
  43. 9
    11
      hooks/charmhelpers/core/sysctl.py
  44. 9
    11
      hooks/charmhelpers/core/templating.py
  45. 9
    12
      hooks/charmhelpers/core/unitdata.py
  46. 9
    11
      hooks/charmhelpers/fetch/__init__.py
  47. 9
    11
      hooks/charmhelpers/fetch/archiveurl.py
  48. 9
    11
      hooks/charmhelpers/fetch/bzrurl.py
  49. 9
    11
      hooks/charmhelpers/fetch/giturl.py
  50. 9
    11
      hooks/charmhelpers/payload/__init__.py
  51. 9
    11
      hooks/charmhelpers/payload/execd.py
  52. 9
    11
      tests/charmhelpers/__init__.py
  53. 9
    11
      tests/charmhelpers/contrib/__init__.py
  54. 9
    11
      tests/charmhelpers/contrib/amulet/__init__.py
  55. 9
    11
      tests/charmhelpers/contrib/amulet/deployment.py
  56. 9
    11
      tests/charmhelpers/contrib/amulet/utils.py
  57. 9
    11
      tests/charmhelpers/contrib/openstack/__init__.py
  58. 9
    11
      tests/charmhelpers/contrib/openstack/amulet/__init__.py
  59. 9
    11
      tests/charmhelpers/contrib/openstack/amulet/deployment.py
  60. 9
    11
      tests/charmhelpers/contrib/openstack/amulet/utils.py

+ 9
- 11
hooks/charmhelpers/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # Bootstrap charm-helpers, installing its dependencies if necessary using
18 16
 # only standard libraries.

+ 9
- 11
hooks/charmhelpers/contrib/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/hahelpers/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/hahelpers/apache.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 #
18 16
 # Copyright 2012 Canonical Ltd.

+ 12
- 14
hooks/charmhelpers/contrib/hahelpers/cluster.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 #
18 16
 # Copyright 2012 Canonical Ltd.
@@ -280,14 +278,14 @@ def get_hacluster_config(exclude_keys=None):
280 278
     for initiating a relation to hacluster:
281 279
 
282 280
         ha-bindiface, ha-mcastport, vip, os-internal-hostname,
283
-        os-admin-hostname, os-public-hostname
281
+        os-admin-hostname, os-public-hostname, os-access-hostname
284 282
 
285 283
     param: exclude_keys: list of setting key(s) to be excluded.
286 284
     returns: dict: A dict containing settings keyed by setting name.
287 285
     raises: HAIncompleteConfig if settings are missing or incorrect.
288 286
     '''
289 287
     settings = ['ha-bindiface', 'ha-mcastport', 'vip', 'os-internal-hostname',
290
-                'os-admin-hostname', 'os-public-hostname']
288
+                'os-admin-hostname', 'os-public-hostname', 'os-access-hostname']
291 289
     conf = {}
292 290
     for setting in settings:
293 291
         if exclude_keys and setting in exclude_keys:
@@ -324,7 +322,7 @@ def valid_hacluster_config():
324 322
     # If dns-ha then one of os-*-hostname must be set
325 323
     if dns:
326 324
         dns_settings = ['os-internal-hostname', 'os-admin-hostname',
327
-                        'os-public-hostname']
325
+                        'os-public-hostname', 'os-access-hostname']
328 326
         # At this point it is unknown if one or all of the possible
329 327
         # network spaces are in HA. Validate at least one is set which is
330 328
         # the minimum required.

+ 9
- 11
hooks/charmhelpers/contrib/network/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/network/ip.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import glob
18 16
 import re

+ 9
- 11
hooks/charmhelpers/contrib/openstack/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/openstack/alternatives.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 ''' Helper for managing alternatives for file conflict resolution '''
18 16
 

+ 9
- 11
hooks/charmhelpers/contrib/openstack/amulet/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/openstack/amulet/deployment.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import logging
18 16
 import re

+ 9
- 11
hooks/charmhelpers/contrib/openstack/amulet/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import amulet
18 16
 import json

+ 17
- 19
hooks/charmhelpers/contrib/openstack/context.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import glob
18 16
 import json
@@ -1438,7 +1436,7 @@ class AppArmorContext(OSContextGenerator):
1438 1436
         :return ctxt: Dictionary of the apparmor profile or None
1439 1437
         """
1440 1438
         if config('aa-profile-mode') in ['disable', 'enforce', 'complain']:
1441
-            ctxt = {'aa-profile-mode': config('aa-profile-mode')}
1439
+            ctxt = {'aa_profile_mode': config('aa-profile-mode')}
1442 1440
         else:
1443 1441
             ctxt = None
1444 1442
         return ctxt
@@ -1482,10 +1480,10 @@ class AppArmorContext(OSContextGenerator):
1482 1480
             log("Not enabling apparmor Profile")
1483 1481
             return
1484 1482
         self.install_aa_utils()
1485
-        cmd = ['aa-{}'.format(self.ctxt['aa-profile-mode'])]
1486
-        cmd.append(self.ctxt['aa-profile'])
1483
+        cmd = ['aa-{}'.format(self.ctxt['aa_profile_mode'])]
1484
+        cmd.append(self.ctxt['aa_profile'])
1487 1485
         log("Setting up the apparmor profile for {} in {} mode."
1488
-            "".format(self.ctxt['aa-profile'], self.ctxt['aa-profile-mode']))
1486
+            "".format(self.ctxt['aa_profile'], self.ctxt['aa_profile_mode']))
1489 1487
         try:
1490 1488
             check_call(cmd)
1491 1489
         except CalledProcessError as e:
@@ -1494,12 +1492,12 @@ class AppArmorContext(OSContextGenerator):
1494 1492
             # apparmor is yet unaware of the profile and aa-disable aa-profile
1495 1493
             # fails. If aa-disable learns to read profile files first this can
1496 1494
             # be removed.
1497
-            if self.ctxt['aa-profile-mode'] == 'disable':
1495
+            if self.ctxt['aa_profile_mode'] == 'disable':
1498 1496
                 log("Manually disabling the apparmor profile for {}."
1499
-                    "".format(self.ctxt['aa-profile']))
1497
+                    "".format(self.ctxt['aa_profile']))
1500 1498
                 self.manually_disable_aa_profile()
1501 1499
                 return
1502 1500
             status_set('blocked', "Apparmor profile {} failed to be set to {}."
1503
-                                  "".format(self.ctxt['aa-profile'],
1504
-                                            self.ctxt['aa-profile-mode']))
1501
+                                  "".format(self.ctxt['aa_profile'],
1502
+                                            self.ctxt['aa_profile_mode']))
1505 1503
             raise e

+ 15
- 0
hooks/charmhelpers/contrib/openstack/exceptions.py View File

@@ -1,3 +1,18 @@
1
+# Copyright 2016 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
+#  http://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
+
15
+
1 16
 class OSContextError(Exception):
2 17
     """Raised when an error occurs during context generation.
3 18
 

+ 9
- 11
hooks/charmhelpers/contrib/openstack/files/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # dummy __init__.py to fool syncer into thinking this is a syncable python
18 16
 # module

+ 13
- 0
hooks/charmhelpers/contrib/openstack/ha/__init__.py View File

@@ -0,0 +1,13 @@
1
+# Copyright 2016 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
+#  http://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.

+ 29
- 12
hooks/charmhelpers/contrib/openstack/ha/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2016 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 #
18 16
 # Copyright 2016 Canonical Ltd.
@@ -36,6 +34,10 @@ from charmhelpers.core.hookenv import (
36 34
     DEBUG,
37 35
 )
38 36
 
37
+from charmhelpers.core.host import (
38
+    lsb_release
39
+)
40
+
39 41
 from charmhelpers.contrib.openstack.ip import (
40 42
     resolve_address,
41 43
 )
@@ -63,8 +65,11 @@ def update_dns_ha_resource_params(resources, resource_params,
63 65
                     DNS HA
64 66
     """
65 67
 
68
+    # Validate the charm environment for DNS HA
69
+    assert_charm_supports_dns_ha()
70
+
66 71
     settings = ['os-admin-hostname', 'os-internal-hostname',
67
-                'os-public-hostname']
72
+                'os-public-hostname', 'os-access-hostname']
68 73
 
69 74
     # Check which DNS settings are set and update dictionaries
70 75
     hostname_group = []
@@ -109,3 +114,15 @@ def update_dns_ha_resource_params(resources, resource_params,
109 114
         msg = 'DNS HA: Hostname group has no members.'
110 115
         status_set('blocked', msg)
111 116
         raise DNSHAException(msg)
117
+
118
+
119
+def assert_charm_supports_dns_ha():
120
+    """Validate prerequisites for DNS HA
121
+    The MAAS client is only available on Xenial or greater
122
+    """
123
+    if lsb_release().get('DISTRIB_RELEASE') < '16.04':
124
+        msg = ('DNS HA is only supported on 16.04 and greater '
125
+               'versions of Ubuntu.')
126
+        status_set('blocked', msg)
127
+        raise DNSHAException(msg)
128
+    return True

+ 9
- 12
hooks/charmhelpers/contrib/openstack/ip.py View File

@@ -1,19 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
16
-
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.
17 14
 
18 15
 from charmhelpers.core.hookenv import (
19 16
     config,

+ 9
- 11
hooks/charmhelpers/contrib/openstack/neutron.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # Various utilies for dealing with Neutron and the renaming from Quantum.
18 16
 

+ 9
- 11
hooks/charmhelpers/contrib/openstack/templates/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # dummy __init__.py to fool syncer into thinking this is a syncable python
18 16
 # module

+ 9
- 11
hooks/charmhelpers/contrib/openstack/templating.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 

+ 86
- 30
hooks/charmhelpers/contrib/openstack/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # Common python helper functions used for OpenStack charms.
18 16
 from collections import OrderedDict
@@ -222,7 +220,6 @@ GIT_DEFAULT_REPOS = {
222 220
 }
223 221
 
224 222
 GIT_DEFAULT_BRANCHES = {
225
-    'icehouse': 'icehouse-eol',
226 223
     'kilo': 'stable/kilo',
227 224
     'liberty': 'stable/liberty',
228 225
     'mitaka': 'stable/mitaka',
@@ -725,14 +722,15 @@ def git_install_requested():
725 722
 requirements_dir = None
726 723
 
727 724
 
728
-def git_default_repos(projects):
725
+def git_default_repos(projects_yaml):
729 726
     """
730 727
     Returns default repos if a default openstack-origin-git value is specified.
731 728
     """
732 729
     service = service_name()
730
+    core_project = service
733 731
 
734 732
     for default, branch in GIT_DEFAULT_BRANCHES.iteritems():
735
-        if projects == default:
733
+        if projects_yaml == default:
736 734
 
737 735
             # add the requirements repo first
738 736
             repo = {
@@ -742,34 +740,47 @@ def git_default_repos(projects):
742 740
             }
743 741
             repos = [repo]
744 742
 
745
-            # neutron and nova charms require some additional repos
746
-            if service == 'neutron':
747
-                for svc in ['neutron-fwaas', 'neutron-lbaas', 'neutron-vpnaas']:
743
+            # NOTE(coreycb): This is a temp work-around until the requirements
744
+            # repo moves from stable/kilo branch to kilo-eol tag. The core
745
+            # repos have already done this.
746
+            if default == 'kilo':
747
+                branch = 'kilo-eol'
748
+
749
+            # neutron-* and nova-* charms require some additional repos
750
+            if service in ['neutron-api', 'neutron-gateway',
751
+                           'neutron-openvswitch']:
752
+                core_project = 'neutron'
753
+                for project in ['neutron-fwaas', 'neutron-lbaas',
754
+                                'neutron-vpnaas', 'nova']:
748 755
                     repo = {
749
-                        'name': svc,
750
-                        'repository': GIT_DEFAULT_REPOS[svc],
756
+                        'name': project,
757
+                        'repository': GIT_DEFAULT_REPOS[project],
751 758
                         'branch': branch,
752 759
                     }
753 760
                     repos.append(repo)
754
-            elif service == 'nova':
761
+
762
+            elif service in ['nova-cloud-controller', 'nova-compute']:
763
+                core_project = 'nova'
755 764
                 repo = {
756 765
                     'name': 'neutron',
757 766
                     'repository': GIT_DEFAULT_REPOS['neutron'],
758 767
                     'branch': branch,
759 768
                 }
760 769
                 repos.append(repo)
770
+            elif service == 'openstack-dashboard':
771
+                core_project = 'horizon'
761 772
 
762
-            # finally add the current service's repo
773
+            # finally add the current service's core project repo
763 774
             repo = {
764
-                'name': service,
765
-                'repository': GIT_DEFAULT_REPOS[service],
775
+                'name': core_project,
776
+                'repository': GIT_DEFAULT_REPOS[core_project],
766 777
                 'branch': branch,
767 778
             }
768 779
             repos.append(repo)
769 780
 
770 781
             return yaml.dump(dict(repositories=repos))
771 782
 
772
-    return projects
783
+    return projects_yaml
773 784
 
774 785
 
775 786
 def _git_yaml_load(projects_yaml):
@@ -829,6 +840,7 @@ def git_clone_and_install(projects_yaml, core_project):
829 840
         pip_install(p, upgrade=True, proxy=http_proxy,
830 841
                     venv=os.path.join(parent_dir, 'venv'))
831 842
 
843
+    constraints = None
832 844
     for p in projects['repositories']:
833 845
         repo = p['repository']
834 846
         branch = p['branch']
@@ -840,10 +852,15 @@ def git_clone_and_install(projects_yaml, core_project):
840 852
                                                      parent_dir, http_proxy,
841 853
                                                      update_requirements=False)
842 854
             requirements_dir = repo_dir
855
+            constraints = os.path.join(repo_dir, "upper-constraints.txt")
856
+            # upper-constraints didn't exist until after icehouse
857
+            if not os.path.isfile(constraints):
858
+                constraints = None
843 859
         else:
844 860
             repo_dir = _git_clone_and_install_single(repo, branch, depth,
845 861
                                                      parent_dir, http_proxy,
846
-                                                     update_requirements=True)
862
+                                                     update_requirements=True,
863
+                                                     constraints=constraints)
847 864
 
848 865
     os.environ = old_environ
849 866
 
@@ -875,7 +892,7 @@ def _git_ensure_key_exists(key, keys):
875 892
 
876 893
 
877 894
 def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy,
878
-                                  update_requirements):
895
+                                  update_requirements, constraints=None):
879 896
     """
880 897
     Clone and install a single git repository.
881 898
     """
@@ -898,9 +915,10 @@ def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy,
898 915
 
899 916
     juju_log('Installing git repo from dir: {}'.format(repo_dir))
900 917
     if http_proxy:
901
-        pip_install(repo_dir, proxy=http_proxy, venv=venv)
918
+        pip_install(repo_dir, proxy=http_proxy, venv=venv,
919
+                    constraints=constraints)
902 920
     else:
903
-        pip_install(repo_dir, venv=venv)
921
+        pip_install(repo_dir, venv=venv, constraints=constraints)
904 922
 
905 923
     return repo_dir
906 924
 
@@ -980,6 +998,7 @@ def git_generate_systemd_init_files(templates_dir):
980 998
     script generation, which is used by the OpenStack packages.
981 999
     """
982 1000
     for f in os.listdir(templates_dir):
1001
+        # Create the init script and systemd unit file from the template
983 1002
         if f.endswith(".init.in"):
984 1003
             init_in_file = f
985 1004
             init_file = f[:-8]
@@ -1005,10 +1024,47 @@ def git_generate_systemd_init_files(templates_dir):
1005 1024
                 os.remove(init_dest)
1006 1025
             if os.path.exists(service_dest):
1007 1026
                 os.remove(service_dest)
1008
-            shutil.move(init_source, init_dest)
1009
-            shutil.move(service_source, service_dest)
1027
+            shutil.copyfile(init_source, init_dest)
1028
+            shutil.copyfile(service_source, service_dest)
1010 1029
             os.chmod(init_dest, 0o755)
1011 1030
 
1031
+    for f in os.listdir(templates_dir):
1032
+        # If there's a service.in file, use it instead of the generated one
1033
+        if f.endswith(".service.in"):
1034
+            service_in_file = f
1035
+            service_file = f[:-3]
1036
+
1037
+            service_in_source = os.path.join(templates_dir, service_in_file)
1038
+            service_source = os.path.join(templates_dir, service_file)
1039
+            service_dest = os.path.join('/lib/systemd/system', service_file)
1040
+
1041
+            shutil.copyfile(service_in_source, service_source)
1042
+
1043
+            if os.path.exists(service_dest):
1044
+                os.remove(service_dest)
1045
+            shutil.copyfile(service_source, service_dest)
1046
+
1047
+    for f in os.listdir(templates_dir):
1048
+        # Generate the systemd unit if there's no existing .service.in
1049
+        if f.endswith(".init.in"):
1050
+            init_in_file = f
1051
+            init_file = f[:-8]
1052
+            service_in_file = "{}.service.in".format(init_file)
1053
+            service_file = "{}.service".format(init_file)
1054
+
1055
+            init_in_source = os.path.join(templates_dir, init_in_file)
1056
+            service_in_source = os.path.join(templates_dir, service_in_file)
1057
+            service_source = os.path.join(templates_dir, service_file)
1058
+            service_dest = os.path.join('/lib/systemd/system', service_file)
1059
+
1060
+            if not os.path.exists(service_in_source):
1061
+                cmd = ['pkgos-gen-systemd-unit', init_in_source]
1062
+                subprocess.check_call(cmd)
1063
+
1064
+                if os.path.exists(service_dest):
1065
+                    os.remove(service_dest)
1066
+                shutil.copyfile(service_source, service_dest)
1067
+
1012 1068
 
1013 1069
 def os_workload_status(configs, required_interfaces, charm_func=None):
1014 1070
     """

+ 9
- 11
hooks/charmhelpers/contrib/python/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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
- 12
hooks/charmhelpers/contrib/python/packages.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 import os
21 19
 import subprocess
@@ -80,7 +78,8 @@ def pip_install_requirements(requirements, constraints=None, **options):
80 78
     pip_execute(command)
81 79
 
82 80
 
83
-def pip_install(package, fatal=False, upgrade=False, venv=None, **options):
81
+def pip_install(package, fatal=False, upgrade=False, venv=None,
82
+                constraints=None, **options):
84 83
     """Install a python package"""
85 84
     if venv:
86 85
         venv_python = os.path.join(venv, 'bin/pip')
@@ -95,6 +94,9 @@ def pip_install(package, fatal=False, upgrade=False, venv=None, **options):
95 94
     if upgrade:
96 95
         command.append('--upgrade')
97 96
 
97
+    if constraints:
98
+        command.extend(['-c', constraints])
99
+
98 100
     if isinstance(package, list):
99 101
         command.extend(package)
100 102
     else:

+ 9
- 11
hooks/charmhelpers/contrib/storage/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/storage/linux/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/contrib/storage/linux/ceph.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 #
18 16
 # Copyright 2012 Canonical Ltd.

+ 9
- 11
hooks/charmhelpers/contrib/storage/linux/loopback.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 import re

+ 9
- 11
hooks/charmhelpers/contrib/storage/linux/lvm.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 from subprocess import (
18 16
     CalledProcessError,

+ 9
- 11
hooks/charmhelpers/contrib/storage/linux/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 import re

+ 9
- 11
hooks/charmhelpers/core/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
hooks/charmhelpers/core/decorators.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 #
18 16
 # Copyright 2014 Canonical Ltd.

+ 9
- 11
hooks/charmhelpers/core/files.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 __author__ = 'Jorge Niedbalski <niedbalski@ubuntu.com>'
21 19
 

+ 9
- 11
hooks/charmhelpers/core/fstab.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 import io
21 19
 import os

+ 10
- 12
hooks/charmhelpers/core/hookenv.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 "Interactions with the Juju environment"
18 16
 # Copyright 2013 Canonical Ltd.
@@ -1006,4 +1004,4 @@ def network_get_primary_address(binding):
1006 1004
     :raise: NotImplementedError if run on Juju < 2.0
1007 1005
     '''
1008 1006
     cmd = ['network-get', '--primary-address', binding]
1009
-    return subprocess.check_output(cmd).strip()
1007
+    return subprocess.check_output(cmd).decode('UTF-8').strip()

+ 9
- 11
hooks/charmhelpers/core/host.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 """Tools for working with the host system"""
18 16
 # Copyright 2012 Canonical Ltd.

+ 9
- 11
hooks/charmhelpers/core/hugepage.py View File

@@ -2,19 +2,17 @@
2 2
 
3 3
 # Copyright 2014-2015 Canonical Limited.
4 4
 #
5
-# This file is part of charm-helpers.
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
6 8
 #
7
-# charm-helpers is free software: you can redistribute it and/or modify
8
-# it under the terms of the GNU Lesser General Public License version 3 as
9
-# published by the Free Software Foundation.
9
+#  http://www.apache.org/licenses/LICENSE-2.0
10 10
 #
11
-# charm-helpers is distributed in the hope that it will be useful,
12
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
-# GNU Lesser General Public License for more details.
15
-#
16
-# You should have received a copy of the GNU Lesser General Public License
17
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
18 16
 
19 17
 import yaml
20 18
 from charmhelpers.core import fstab

+ 9
- 11
hooks/charmhelpers/core/kernel.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 __author__ = "Jorge Niedbalski <jorge.niedbalski@canonical.com>"
21 19
 

+ 9
- 11
hooks/charmhelpers/core/services/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 from .base import *  # NOQA
18 16
 from .helpers import *  # NOQA

+ 9
- 11
hooks/charmhelpers/core/services/base.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 import json

+ 9
- 11
hooks/charmhelpers/core/services/helpers.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 import yaml

+ 9
- 11
hooks/charmhelpers/core/strutils.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 import six
21 19
 import re

+ 9
- 11
hooks/charmhelpers/core/sysctl.py View File

@@ -3,19 +3,17 @@
3 3
 
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
11 11
 #
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
19 17
 
20 18
 import yaml
21 19
 

+ 9
- 11
hooks/charmhelpers/core/templating.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 

+ 9
- 12
hooks/charmhelpers/core/unitdata.py View File

@@ -3,20 +3,17 @@
3 3
 #
4 4
 # Copyright 2014-2015 Canonical Limited.
5 5
 #
6
-# This file is part of charm-helpers.
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
7 9
 #
8
-# charm-helpers is free software: you can redistribute it and/or modify
9
-# it under the terms of the GNU Lesser General Public License version 3 as
10
-# published by the Free Software Foundation.
11
-#
12
-# charm-helpers is distributed in the hope that it will be useful,
13
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-# GNU Lesser General Public License for more details.
16
-#
17
-# You should have received a copy of the GNU Lesser General Public License
18
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
10
+#  http://www.apache.org/licenses/LICENSE-2.0
19 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.
20 17
 #
21 18
 # Authors:
22 19
 #  Kapil Thangavelu <kapil.foss@gmail.com>

+ 9
- 11
hooks/charmhelpers/fetch/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import importlib
18 16
 from tempfile import NamedTemporaryFile

+ 9
- 11
hooks/charmhelpers/fetch/archiveurl.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 import hashlib

+ 9
- 11
hooks/charmhelpers/fetch/bzrurl.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 from subprocess import check_call

+ 9
- 11
hooks/charmhelpers/fetch/giturl.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import os
18 16
 from subprocess import check_call, CalledProcessError

+ 9
- 11
hooks/charmhelpers/payload/__init__.py View File

@@ -1,17 +1,15 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 "Tools for working with files injected into a charm just before deployment."

+ 9
- 11
hooks/charmhelpers/payload/execd.py View File

@@ -2,19 +2,17 @@
2 2
 
3 3
 # Copyright 2014-2015 Canonical Limited.
4 4
 #
5
-# This file is part of charm-helpers.
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
6 8
 #
7
-# charm-helpers is free software: you can redistribute it and/or modify
8
-# it under the terms of the GNU Lesser General Public License version 3 as
9
-# published by the Free Software Foundation.
9
+#  http://www.apache.org/licenses/LICENSE-2.0
10 10
 #
11
-# charm-helpers is distributed in the hope that it will be useful,
12
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
-# GNU Lesser General Public License for more details.
15
-#
16
-# You should have received a copy of the GNU Lesser General Public License
17
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
18 16
 
19 17
 import os
20 18
 import sys

+ 9
- 11
tests/charmhelpers/__init__.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 # Bootstrap charm-helpers, installing its dependencies if necessary using
18 16
 # only standard libraries.

+ 9
- 11
tests/charmhelpers/contrib/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
tests/charmhelpers/contrib/amulet/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
tests/charmhelpers/contrib/amulet/deployment.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import amulet
18 16
 import os

+ 9
- 11
tests/charmhelpers/contrib/amulet/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import io
18 16
 import json

+ 9
- 11
tests/charmhelpers/contrib/openstack/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
tests/charmhelpers/contrib/openstack/amulet/__init__.py View File

@@ -1,15 +1,13 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.

+ 9
- 11
tests/charmhelpers/contrib/openstack/amulet/deployment.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import logging
18 16
 import re

+ 9
- 11
tests/charmhelpers/contrib/openstack/amulet/utils.py View File

@@ -1,18 +1,16 @@
1 1
 # Copyright 2014-2015 Canonical Limited.
2 2
 #
3
-# This file is part of charm-helpers.
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
4 6
 #
5
-# charm-helpers is free software: you can redistribute it and/or modify
6
-# it under the terms of the GNU Lesser General Public License version 3 as
7
-# published by the Free Software Foundation.
7
+#  http://www.apache.org/licenses/LICENSE-2.0
8 8
 #
9
-# charm-helpers is distributed in the hope that it will be useful,
10
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-# GNU Lesser General Public License for more details.
13
-#
14
-# You should have received a copy of the GNU Lesser General Public License
15
-# along with charm-helpers.  If not, see <http://www.gnu.org/licenses/>.
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.
16 14
 
17 15
 import amulet
18 16
 import json

Loading…
Cancel
Save