summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2016-07-06 15:57:02 +0100
committerJames Page <james.page@ubuntu.com>2016-07-06 16:32:17 +0100
commit3a208f359fb7090bab69e7e3a26584d4afd2565a (patch)
tree36e18355a9c14a5ccc09f44880a950f074069c0b
parentaa57d5f48e8c659df17bf625cd0f4d45a7133e03 (diff)
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
Notes
Notes (review): Verified+1: Canonical CI <uosci-testing-bot@ubuntu.com> Code-Review+2: Ryan Beisner <ryan.beisner@canonical.com> Workflow+1: Ryan Beisner <ryan.beisner@canonical.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 06 Jul 2016 16:54:14 +0000 Reviewed-on: https://review.openstack.org/338334 Project: openstack/charm-cinder-backup Branch: refs/heads/master
-rw-r--r--hooks/charmhelpers/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/hahelpers/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/hahelpers/apache.py20
-rw-r--r--hooks/charmhelpers/contrib/hahelpers/cluster.py26
-rw-r--r--hooks/charmhelpers/contrib/network/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/network/ip.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/alternatives.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/amulet/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/amulet/deployment.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/amulet/utils.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/context.py36
-rw-r--r--hooks/charmhelpers/contrib/openstack/exceptions.py15
-rw-r--r--hooks/charmhelpers/contrib/openstack/files/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/ha/__init__.py13
-rw-r--r--hooks/charmhelpers/contrib/openstack/ha/utils.py41
-rw-r--r--hooks/charmhelpers/contrib/openstack/ip.py21
-rw-r--r--hooks/charmhelpers/contrib/openstack/neutron.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/templates/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/templating.py20
-rw-r--r--hooks/charmhelpers/contrib/openstack/utils.py116
-rw-r--r--hooks/charmhelpers/contrib/python/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/python/packages.py26
-rw-r--r--hooks/charmhelpers/contrib/storage/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/storage/linux/__init__.py20
-rw-r--r--hooks/charmhelpers/contrib/storage/linux/ceph.py20
-rw-r--r--hooks/charmhelpers/contrib/storage/linux/loopback.py20
-rw-r--r--hooks/charmhelpers/contrib/storage/linux/lvm.py20
-rw-r--r--hooks/charmhelpers/contrib/storage/linux/utils.py20
-rw-r--r--hooks/charmhelpers/core/__init__.py20
-rw-r--r--hooks/charmhelpers/core/decorators.py20
-rw-r--r--hooks/charmhelpers/core/files.py20
-rw-r--r--hooks/charmhelpers/core/fstab.py20
-rw-r--r--hooks/charmhelpers/core/hookenv.py22
-rw-r--r--hooks/charmhelpers/core/host.py20
-rw-r--r--hooks/charmhelpers/core/hugepage.py20
-rw-r--r--hooks/charmhelpers/core/kernel.py20
-rw-r--r--hooks/charmhelpers/core/services/__init__.py20
-rw-r--r--hooks/charmhelpers/core/services/base.py20
-rw-r--r--hooks/charmhelpers/core/services/helpers.py20
-rw-r--r--hooks/charmhelpers/core/strutils.py20
-rw-r--r--hooks/charmhelpers/core/sysctl.py20
-rw-r--r--hooks/charmhelpers/core/templating.py20
-rw-r--r--hooks/charmhelpers/core/unitdata.py21
-rw-r--r--hooks/charmhelpers/fetch/__init__.py20
-rw-r--r--hooks/charmhelpers/fetch/archiveurl.py20
-rw-r--r--hooks/charmhelpers/fetch/bzrurl.py20
-rw-r--r--hooks/charmhelpers/fetch/giturl.py20
-rw-r--r--hooks/charmhelpers/payload/__init__.py20
-rw-r--r--hooks/charmhelpers/payload/execd.py20
-rw-r--r--tests/charmhelpers/__init__.py20
-rw-r--r--tests/charmhelpers/contrib/__init__.py20
-rw-r--r--tests/charmhelpers/contrib/amulet/__init__.py20
-rw-r--r--tests/charmhelpers/contrib/amulet/deployment.py20
-rw-r--r--tests/charmhelpers/contrib/amulet/utils.py20
-rw-r--r--tests/charmhelpers/contrib/openstack/__init__.py20
-rw-r--r--tests/charmhelpers/contrib/openstack/amulet/__init__.py20
-rw-r--r--tests/charmhelpers/contrib/openstack/amulet/deployment.py20
-rw-r--r--tests/charmhelpers/contrib/openstack/amulet/utils.py20
60 files changed, 664 insertions, 673 deletions
diff --git a/hooks/charmhelpers/__init__.py b/hooks/charmhelpers/__init__.py
index f72e7f8..4886788 100644
--- a/hooks/charmhelpers/__init__.py
+++ b/hooks/charmhelpers/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# Bootstrap charm-helpers, installing its dependencies if necessary using 15# Bootstrap charm-helpers, installing its dependencies if necessary using
18# only standard libraries. 16# only standard libraries.
diff --git a/hooks/charmhelpers/contrib/__init__.py b/hooks/charmhelpers/contrib/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/__init__.py
+++ b/hooks/charmhelpers/contrib/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/hahelpers/__init__.py b/hooks/charmhelpers/contrib/hahelpers/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/hahelpers/__init__.py
+++ b/hooks/charmhelpers/contrib/hahelpers/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/hahelpers/apache.py b/hooks/charmhelpers/contrib/hahelpers/apache.py
index 0091719..3313aba 100644
--- a/hooks/charmhelpers/contrib/hahelpers/apache.py
+++ b/hooks/charmhelpers/contrib/hahelpers/apache.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# 15#
18# Copyright 2012 Canonical Ltd. 16# Copyright 2012 Canonical Ltd.
diff --git a/hooks/charmhelpers/contrib/hahelpers/cluster.py b/hooks/charmhelpers/contrib/hahelpers/cluster.py
index 92325a9..e02350e 100644
--- a/hooks/charmhelpers/contrib/hahelpers/cluster.py
+++ b/hooks/charmhelpers/contrib/hahelpers/cluster.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# 15#
18# Copyright 2012 Canonical Ltd. 16# Copyright 2012 Canonical Ltd.
@@ -280,14 +278,14 @@ def get_hacluster_config(exclude_keys=None):
280 for initiating a relation to hacluster: 278 for initiating a relation to hacluster:
281 279
282 ha-bindiface, ha-mcastport, vip, os-internal-hostname, 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 param: exclude_keys: list of setting key(s) to be excluded. 283 param: exclude_keys: list of setting key(s) to be excluded.
286 returns: dict: A dict containing settings keyed by setting name. 284 returns: dict: A dict containing settings keyed by setting name.
287 raises: HAIncompleteConfig if settings are missing or incorrect. 285 raises: HAIncompleteConfig if settings are missing or incorrect.
288 ''' 286 '''
289 settings = ['ha-bindiface', 'ha-mcastport', 'vip', 'os-internal-hostname', 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 conf = {} 289 conf = {}
292 for setting in settings: 290 for setting in settings:
293 if exclude_keys and setting in exclude_keys: 291 if exclude_keys and setting in exclude_keys:
@@ -324,7 +322,7 @@ def valid_hacluster_config():
324 # If dns-ha then one of os-*-hostname must be set 322 # If dns-ha then one of os-*-hostname must be set
325 if dns: 323 if dns:
326 dns_settings = ['os-internal-hostname', 'os-admin-hostname', 324 dns_settings = ['os-internal-hostname', 'os-admin-hostname',
327 'os-public-hostname'] 325 'os-public-hostname', 'os-access-hostname']
328 # At this point it is unknown if one or all of the possible 326 # At this point it is unknown if one or all of the possible
329 # network spaces are in HA. Validate at least one is set which is 327 # network spaces are in HA. Validate at least one is set which is
330 # the minimum required. 328 # the minimum required.
diff --git a/hooks/charmhelpers/contrib/network/__init__.py b/hooks/charmhelpers/contrib/network/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/network/__init__.py
+++ b/hooks/charmhelpers/contrib/network/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/network/ip.py b/hooks/charmhelpers/contrib/network/ip.py
index 99d78f2..b5f457c 100644
--- a/hooks/charmhelpers/contrib/network/ip.py
+++ b/hooks/charmhelpers/contrib/network/ip.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import glob 15import glob
18import re 16import re
diff --git a/hooks/charmhelpers/contrib/openstack/__init__.py b/hooks/charmhelpers/contrib/openstack/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/openstack/__init__.py
+++ b/hooks/charmhelpers/contrib/openstack/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/openstack/alternatives.py b/hooks/charmhelpers/contrib/openstack/alternatives.py
index ef77caf..1501641 100644
--- a/hooks/charmhelpers/contrib/openstack/alternatives.py
+++ b/hooks/charmhelpers/contrib/openstack/alternatives.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17''' Helper for managing alternatives for file conflict resolution ''' 15''' Helper for managing alternatives for file conflict resolution '''
18 16
diff --git a/hooks/charmhelpers/contrib/openstack/amulet/__init__.py b/hooks/charmhelpers/contrib/openstack/amulet/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/openstack/amulet/__init__.py
+++ b/hooks/charmhelpers/contrib/openstack/amulet/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/openstack/amulet/deployment.py b/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
index 6b917d0..f7220f3 100644
--- a/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
+++ b/hooks/charmhelpers/contrib/openstack/amulet/deployment.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import logging 15import logging
18import re 16import re
diff --git a/hooks/charmhelpers/contrib/openstack/amulet/utils.py b/hooks/charmhelpers/contrib/openstack/amulet/utils.py
index ef3bdcc..8040b57 100644
--- a/hooks/charmhelpers/contrib/openstack/amulet/utils.py
+++ b/hooks/charmhelpers/contrib/openstack/amulet/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import amulet 15import amulet
18import json 16import json
diff --git a/hooks/charmhelpers/contrib/openstack/context.py b/hooks/charmhelpers/contrib/openstack/context.py
index 5faa7ed..7cbdc03 100644
--- a/hooks/charmhelpers/contrib/openstack/context.py
+++ b/hooks/charmhelpers/contrib/openstack/context.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import glob 15import glob
18import json 16import json
@@ -1438,7 +1436,7 @@ class AppArmorContext(OSContextGenerator):
1438 :return ctxt: Dictionary of the apparmor profile or None 1436 :return ctxt: Dictionary of the apparmor profile or None
1439 """ 1437 """
1440 if config('aa-profile-mode') in ['disable', 'enforce', 'complain']: 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 else: 1440 else:
1443 ctxt = None 1441 ctxt = None
1444 return ctxt 1442 return ctxt
@@ -1482,10 +1480,10 @@ class AppArmorContext(OSContextGenerator):
1482 log("Not enabling apparmor Profile") 1480 log("Not enabling apparmor Profile")
1483 return 1481 return
1484 self.install_aa_utils() 1482 self.install_aa_utils()
1485 cmd = ['aa-{}'.format(self.ctxt['aa-profile-mode'])] 1483 cmd = ['aa-{}'.format(self.ctxt['aa_profile_mode'])]
1486 cmd.append(self.ctxt['aa-profile']) 1484 cmd.append(self.ctxt['aa_profile'])
1487 log("Setting up the apparmor profile for {} in {} mode." 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 try: 1487 try:
1490 check_call(cmd) 1488 check_call(cmd)
1491 except CalledProcessError as e: 1489 except CalledProcessError as e:
@@ -1494,12 +1492,12 @@ class AppArmorContext(OSContextGenerator):
1494 # apparmor is yet unaware of the profile and aa-disable aa-profile 1492 # apparmor is yet unaware of the profile and aa-disable aa-profile
1495 # fails. If aa-disable learns to read profile files first this can 1493 # fails. If aa-disable learns to read profile files first this can
1496 # be removed. 1494 # be removed.
1497 if self.ctxt['aa-profile-mode'] == 'disable': 1495 if self.ctxt['aa_profile_mode'] == 'disable':
1498 log("Manually disabling the apparmor profile for {}." 1496 log("Manually disabling the apparmor profile for {}."
1499 "".format(self.ctxt['aa-profile'])) 1497 "".format(self.ctxt['aa_profile']))
1500 self.manually_disable_aa_profile() 1498 self.manually_disable_aa_profile()
1501 return 1499 return
1502 status_set('blocked', "Apparmor profile {} failed to be set to {}." 1500 status_set('blocked', "Apparmor profile {} failed to be set to {}."
1503 "".format(self.ctxt['aa-profile'], 1501 "".format(self.ctxt['aa_profile'],
1504 self.ctxt['aa-profile-mode'])) 1502 self.ctxt['aa_profile_mode']))
1505 raise e 1503 raise e
diff --git a/hooks/charmhelpers/contrib/openstack/exceptions.py b/hooks/charmhelpers/contrib/openstack/exceptions.py
index ea4eb68..f85ae4f 100644
--- a/hooks/charmhelpers/contrib/openstack/exceptions.py
+++ b/hooks/charmhelpers/contrib/openstack/exceptions.py
@@ -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
1class OSContextError(Exception): 16class OSContextError(Exception):
2 """Raised when an error occurs during context generation. 17 """Raised when an error occurs during context generation.
3 18
diff --git a/hooks/charmhelpers/contrib/openstack/files/__init__.py b/hooks/charmhelpers/contrib/openstack/files/__init__.py
index 7587679..9df5f74 100644
--- a/hooks/charmhelpers/contrib/openstack/files/__init__.py
+++ b/hooks/charmhelpers/contrib/openstack/files/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# dummy __init__.py to fool syncer into thinking this is a syncable python 15# dummy __init__.py to fool syncer into thinking this is a syncable python
18# module 16# module
diff --git a/hooks/charmhelpers/contrib/openstack/ha/__init__.py b/hooks/charmhelpers/contrib/openstack/ha/__init__.py
index e69de29..9b088de 100644
--- a/hooks/charmhelpers/contrib/openstack/ha/__init__.py
+++ b/hooks/charmhelpers/contrib/openstack/ha/__init__.py
@@ -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.
diff --git a/hooks/charmhelpers/contrib/openstack/ha/utils.py b/hooks/charmhelpers/contrib/openstack/ha/utils.py
index 3406423..1f5310b 100644
--- a/hooks/charmhelpers/contrib/openstack/ha/utils.py
+++ b/hooks/charmhelpers/contrib/openstack/ha/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2016 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# 15#
18# Copyright 2016 Canonical Ltd. 16# Copyright 2016 Canonical Ltd.
@@ -36,6 +34,10 @@ from charmhelpers.core.hookenv import (
36 DEBUG, 34 DEBUG,
37) 35)
38 36
37from charmhelpers.core.host import (
38 lsb_release
39)
40
39from charmhelpers.contrib.openstack.ip import ( 41from charmhelpers.contrib.openstack.ip import (
40 resolve_address, 42 resolve_address,
41) 43)
@@ -63,8 +65,11 @@ def update_dns_ha_resource_params(resources, resource_params,
63 DNS HA 65 DNS HA
64 """ 66 """
65 67
68 # Validate the charm environment for DNS HA
69 assert_charm_supports_dns_ha()
70
66 settings = ['os-admin-hostname', 'os-internal-hostname', 71 settings = ['os-admin-hostname', 'os-internal-hostname',
67 'os-public-hostname'] 72 'os-public-hostname', 'os-access-hostname']
68 73
69 # Check which DNS settings are set and update dictionaries 74 # Check which DNS settings are set and update dictionaries
70 hostname_group = [] 75 hostname_group = []
@@ -109,3 +114,15 @@ def update_dns_ha_resource_params(resources, resource_params,
109 msg = 'DNS HA: Hostname group has no members.' 114 msg = 'DNS HA: Hostname group has no members.'
110 status_set('blocked', msg) 115 status_set('blocked', msg)
111 raise DNSHAException(msg) 116 raise DNSHAException(msg)
117
118
119def 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
diff --git a/hooks/charmhelpers/contrib/openstack/ip.py b/hooks/charmhelpers/contrib/openstack/ip.py
index 7875b99..0fd3ac2 100644
--- a/hooks/charmhelpers/contrib/openstack/ip.py
+++ b/hooks/charmhelpers/contrib/openstack/ip.py
@@ -1,19 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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
17 14
18from charmhelpers.core.hookenv import ( 15from charmhelpers.core.hookenv import (
19 config, 16 config,
diff --git a/hooks/charmhelpers/contrib/openstack/neutron.py b/hooks/charmhelpers/contrib/openstack/neutron.py
index d057ea6..03427b4 100644
--- a/hooks/charmhelpers/contrib/openstack/neutron.py
+++ b/hooks/charmhelpers/contrib/openstack/neutron.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# Various utilies for dealing with Neutron and the renaming from Quantum. 15# Various utilies for dealing with Neutron and the renaming from Quantum.
18 16
diff --git a/hooks/charmhelpers/contrib/openstack/templates/__init__.py b/hooks/charmhelpers/contrib/openstack/templates/__init__.py
index 7587679..9df5f74 100644
--- a/hooks/charmhelpers/contrib/openstack/templates/__init__.py
+++ b/hooks/charmhelpers/contrib/openstack/templates/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# dummy __init__.py to fool syncer into thinking this is a syncable python 15# dummy __init__.py to fool syncer into thinking this is a syncable python
18# module 16# module
diff --git a/hooks/charmhelpers/contrib/openstack/templating.py b/hooks/charmhelpers/contrib/openstack/templating.py
index e5e3cb1..8958895 100644
--- a/hooks/charmhelpers/contrib/openstack/templating.py
+++ b/hooks/charmhelpers/contrib/openstack/templating.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18 16
diff --git a/hooks/charmhelpers/contrib/openstack/utils.py b/hooks/charmhelpers/contrib/openstack/utils.py
index 53e5842..f440191 100644
--- a/hooks/charmhelpers/contrib/openstack/utils.py
+++ b/hooks/charmhelpers/contrib/openstack/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# Common python helper functions used for OpenStack charms. 15# Common python helper functions used for OpenStack charms.
18from collections import OrderedDict 16from collections import OrderedDict
@@ -222,7 +220,6 @@ GIT_DEFAULT_REPOS = {
222} 220}
223 221
224GIT_DEFAULT_BRANCHES = { 222GIT_DEFAULT_BRANCHES = {
225 'icehouse': 'icehouse-eol',
226 'kilo': 'stable/kilo', 223 'kilo': 'stable/kilo',
227 'liberty': 'stable/liberty', 224 'liberty': 'stable/liberty',
228 'mitaka': 'stable/mitaka', 225 'mitaka': 'stable/mitaka',
@@ -725,14 +722,15 @@ def git_install_requested():
725requirements_dir = None 722requirements_dir = None
726 723
727 724
728def git_default_repos(projects): 725def git_default_repos(projects_yaml):
729 """ 726 """
730 Returns default repos if a default openstack-origin-git value is specified. 727 Returns default repos if a default openstack-origin-git value is specified.
731 """ 728 """
732 service = service_name() 729 service = service_name()
730 core_project = service
733 731
734 for default, branch in GIT_DEFAULT_BRANCHES.iteritems(): 732 for default, branch in GIT_DEFAULT_BRANCHES.iteritems():
735 if projects == default: 733 if projects_yaml == default:
736 734
737 # add the requirements repo first 735 # add the requirements repo first
738 repo = { 736 repo = {
@@ -742,34 +740,47 @@ def git_default_repos(projects):
742 } 740 }
743 repos = [repo] 741 repos = [repo]
744 742
745 # neutron and nova charms require some additional repos 743 # NOTE(coreycb): This is a temp work-around until the requirements
746 if service == 'neutron': 744 # repo moves from stable/kilo branch to kilo-eol tag. The core
747 for svc in ['neutron-fwaas', 'neutron-lbaas', 'neutron-vpnaas']: 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 repo = { 755 repo = {
749 'name': svc, 756 'name': project,
750 'repository': GIT_DEFAULT_REPOS[svc], 757 'repository': GIT_DEFAULT_REPOS[project],
751 'branch': branch, 758 'branch': branch,
752 } 759 }
753 repos.append(repo) 760 repos.append(repo)
754 elif service == 'nova': 761
762 elif service in ['nova-cloud-controller', 'nova-compute']:
763 core_project = 'nova'
755 repo = { 764 repo = {
756 'name': 'neutron', 765 'name': 'neutron',
757 'repository': GIT_DEFAULT_REPOS['neutron'], 766 'repository': GIT_DEFAULT_REPOS['neutron'],
758 'branch': branch, 767 'branch': branch,
759 } 768 }
760 repos.append(repo) 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 repo = { 774 repo = {
764 'name': service, 775 'name': core_project,
765 'repository': GIT_DEFAULT_REPOS[service], 776 'repository': GIT_DEFAULT_REPOS[core_project],
766 'branch': branch, 777 'branch': branch,
767 } 778 }
768 repos.append(repo) 779 repos.append(repo)
769 780
770 return yaml.dump(dict(repositories=repos)) 781 return yaml.dump(dict(repositories=repos))
771 782
772 return projects 783 return projects_yaml
773 784
774 785
775def _git_yaml_load(projects_yaml): 786def _git_yaml_load(projects_yaml):
@@ -829,6 +840,7 @@ def git_clone_and_install(projects_yaml, core_project):
829 pip_install(p, upgrade=True, proxy=http_proxy, 840 pip_install(p, upgrade=True, proxy=http_proxy,
830 venv=os.path.join(parent_dir, 'venv')) 841 venv=os.path.join(parent_dir, 'venv'))
831 842
843 constraints = None
832 for p in projects['repositories']: 844 for p in projects['repositories']:
833 repo = p['repository'] 845 repo = p['repository']
834 branch = p['branch'] 846 branch = p['branch']
@@ -840,10 +852,15 @@ def git_clone_and_install(projects_yaml, core_project):
840 parent_dir, http_proxy, 852 parent_dir, http_proxy,
841 update_requirements=False) 853 update_requirements=False)
842 requirements_dir = repo_dir 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 else: 859 else:
844 repo_dir = _git_clone_and_install_single(repo, branch, depth, 860 repo_dir = _git_clone_and_install_single(repo, branch, depth,
845 parent_dir, http_proxy, 861 parent_dir, http_proxy,
846 update_requirements=True) 862 update_requirements=True,
863 constraints=constraints)
847 864
848 os.environ = old_environ 865 os.environ = old_environ
849 866
@@ -875,7 +892,7 @@ def _git_ensure_key_exists(key, keys):
875 892
876 893
877def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy, 894def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy,
878 update_requirements): 895 update_requirements, constraints=None):
879 """ 896 """
880 Clone and install a single git repository. 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 juju_log('Installing git repo from dir: {}'.format(repo_dir)) 916 juju_log('Installing git repo from dir: {}'.format(repo_dir))
900 if http_proxy: 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 else: 920 else:
903 pip_install(repo_dir, venv=venv) 921 pip_install(repo_dir, venv=venv, constraints=constraints)
904 922
905 return repo_dir 923 return repo_dir
906 924
@@ -980,6 +998,7 @@ def git_generate_systemd_init_files(templates_dir):
980 script generation, which is used by the OpenStack packages. 998 script generation, which is used by the OpenStack packages.
981 """ 999 """
982 for f in os.listdir(templates_dir): 1000 for f in os.listdir(templates_dir):
1001 # Create the init script and systemd unit file from the template
983 if f.endswith(".init.in"): 1002 if f.endswith(".init.in"):
984 init_in_file = f 1003 init_in_file = f
985 init_file = f[:-8] 1004 init_file = f[:-8]
@@ -1005,10 +1024,47 @@ def git_generate_systemd_init_files(templates_dir):
1005 os.remove(init_dest) 1024 os.remove(init_dest)
1006 if os.path.exists(service_dest): 1025 if os.path.exists(service_dest):
1007 os.remove(service_dest) 1026 os.remove(service_dest)
1008 shutil.move(init_source, init_dest) 1027 shutil.copyfile(init_source, init_dest)
1009 shutil.move(service_source, service_dest) 1028 shutil.copyfile(service_source, service_dest)
1010 os.chmod(init_dest, 0o755) 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
1013def os_workload_status(configs, required_interfaces, charm_func=None): 1069def os_workload_status(configs, required_interfaces, charm_func=None):
1014 """ 1070 """
diff --git a/hooks/charmhelpers/contrib/python/__init__.py b/hooks/charmhelpers/contrib/python/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/python/__init__.py
+++ b/hooks/charmhelpers/contrib/python/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/python/packages.py b/hooks/charmhelpers/contrib/python/packages.py
index a2411c3..e29bd1b 100644
--- a/hooks/charmhelpers/contrib/python/packages.py
+++ b/hooks/charmhelpers/contrib/python/packages.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20import os 18import os
21import subprocess 19import subprocess
@@ -80,7 +78,8 @@ def pip_install_requirements(requirements, constraints=None, **options):
80 pip_execute(command) 78 pip_execute(command)
81 79
82 80
83def pip_install(package, fatal=False, upgrade=False, venv=None, **options): 81def pip_install(package, fatal=False, upgrade=False, venv=None,
82 constraints=None, **options):
84 """Install a python package""" 83 """Install a python package"""
85 if venv: 84 if venv:
86 venv_python = os.path.join(venv, 'bin/pip') 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 if upgrade: 94 if upgrade:
96 command.append('--upgrade') 95 command.append('--upgrade')
97 96
97 if constraints:
98 command.extend(['-c', constraints])
99
98 if isinstance(package, list): 100 if isinstance(package, list):
99 command.extend(package) 101 command.extend(package)
100 else: 102 else:
diff --git a/hooks/charmhelpers/contrib/storage/__init__.py b/hooks/charmhelpers/contrib/storage/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/storage/__init__.py
+++ b/hooks/charmhelpers/contrib/storage/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/storage/linux/__init__.py b/hooks/charmhelpers/contrib/storage/linux/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/contrib/storage/linux/__init__.py
+++ b/hooks/charmhelpers/contrib/storage/linux/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/contrib/storage/linux/ceph.py b/hooks/charmhelpers/contrib/storage/linux/ceph.py
index b2484e7..8a9b948 100644
--- a/hooks/charmhelpers/contrib/storage/linux/ceph.py
+++ b/hooks/charmhelpers/contrib/storage/linux/ceph.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# 15#
18# Copyright 2012 Canonical Ltd. 16# Copyright 2012 Canonical Ltd.
diff --git a/hooks/charmhelpers/contrib/storage/linux/loopback.py b/hooks/charmhelpers/contrib/storage/linux/loopback.py
index 3a3f514..1d6ae6f 100644
--- a/hooks/charmhelpers/contrib/storage/linux/loopback.py
+++ b/hooks/charmhelpers/contrib/storage/linux/loopback.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18import re 16import re
diff --git a/hooks/charmhelpers/contrib/storage/linux/lvm.py b/hooks/charmhelpers/contrib/storage/linux/lvm.py
index 34b5f71..4719f53 100644
--- a/hooks/charmhelpers/contrib/storage/linux/lvm.py
+++ b/hooks/charmhelpers/contrib/storage/linux/lvm.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17from subprocess import ( 15from subprocess import (
18 CalledProcessError, 16 CalledProcessError,
diff --git a/hooks/charmhelpers/contrib/storage/linux/utils.py b/hooks/charmhelpers/contrib/storage/linux/utils.py
index 4e35c29..3dc0df6 100644
--- a/hooks/charmhelpers/contrib/storage/linux/utils.py
+++ b/hooks/charmhelpers/contrib/storage/linux/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18import re 16import re
diff --git a/hooks/charmhelpers/core/__init__.py b/hooks/charmhelpers/core/__init__.py
index d1400a0..d7567b8 100644
--- a/hooks/charmhelpers/core/__init__.py
+++ b/hooks/charmhelpers/core/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/hooks/charmhelpers/core/decorators.py b/hooks/charmhelpers/core/decorators.py
index bb05620..6ad41ee 100644
--- a/hooks/charmhelpers/core/decorators.py
+++ b/hooks/charmhelpers/core/decorators.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# 15#
18# Copyright 2014 Canonical Ltd. 16# Copyright 2014 Canonical Ltd.
diff --git a/hooks/charmhelpers/core/files.py b/hooks/charmhelpers/core/files.py
index 0f12d32..fdd82b7 100644
--- a/hooks/charmhelpers/core/files.py
+++ b/hooks/charmhelpers/core/files.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20__author__ = 'Jorge Niedbalski <niedbalski@ubuntu.com>' 18__author__ = 'Jorge Niedbalski <niedbalski@ubuntu.com>'
21 19
diff --git a/hooks/charmhelpers/core/fstab.py b/hooks/charmhelpers/core/fstab.py
index 3056fba..d9fa915 100644
--- a/hooks/charmhelpers/core/fstab.py
+++ b/hooks/charmhelpers/core/fstab.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20import io 18import io
21import os 19import os
diff --git a/hooks/charmhelpers/core/hookenv.py b/hooks/charmhelpers/core/hookenv.py
index 0132129..48b2b9d 100644
--- a/hooks/charmhelpers/core/hookenv.py
+++ b/hooks/charmhelpers/core/hookenv.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17"Interactions with the Juju environment" 15"Interactions with the Juju environment"
18# Copyright 2013 Canonical Ltd. 16# Copyright 2013 Canonical Ltd.
@@ -1006,4 +1004,4 @@ def network_get_primary_address(binding):
1006 :raise: NotImplementedError if run on Juju < 2.0 1004 :raise: NotImplementedError if run on Juju < 2.0
1007 ''' 1005 '''
1008 cmd = ['network-get', '--primary-address', binding] 1006 cmd = ['network-get', '--primary-address', binding]
1009 return subprocess.check_output(cmd).strip() 1007 return subprocess.check_output(cmd).decode('UTF-8').strip()
diff --git a/hooks/charmhelpers/core/host.py b/hooks/charmhelpers/core/host.py
index e367e45..35817b0 100644
--- a/hooks/charmhelpers/core/host.py
+++ b/hooks/charmhelpers/core/host.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17"""Tools for working with the host system""" 15"""Tools for working with the host system"""
18# Copyright 2012 Canonical Ltd. 16# Copyright 2012 Canonical Ltd.
diff --git a/hooks/charmhelpers/core/hugepage.py b/hooks/charmhelpers/core/hugepage.py
index a783ad9..54b5b5e 100644
--- a/hooks/charmhelpers/core/hugepage.py
+++ b/hooks/charmhelpers/core/hugepage.py
@@ -2,19 +2,17 @@
2 2
3# Copyright 2014-2015 Canonical Limited. 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 9# http://www.apache.org/licenses/LICENSE-2.0
8# it under the terms of the GNU Lesser General Public License version 3 as
9# published by the Free Software Foundation.
10# 10#
11# charm-helpers is distributed in the hope that it will be useful, 11# Unless required by applicable law or agreed to in writing, software
12# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# distributed under the License is distributed on an "AS IS" BASIS,
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# GNU Lesser General Public License for more details. 14# See the License for the specific language governing permissions and
15# 15# limitations under the License.
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/>.
18 16
19import yaml 17import yaml
20from charmhelpers.core import fstab 18from charmhelpers.core import fstab
diff --git a/hooks/charmhelpers/core/kernel.py b/hooks/charmhelpers/core/kernel.py
index 5dc6495..b166efe 100644
--- a/hooks/charmhelpers/core/kernel.py
+++ b/hooks/charmhelpers/core/kernel.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20__author__ = "Jorge Niedbalski <jorge.niedbalski@canonical.com>" 18__author__ = "Jorge Niedbalski <jorge.niedbalski@canonical.com>"
21 19
diff --git a/hooks/charmhelpers/core/services/__init__.py b/hooks/charmhelpers/core/services/__init__.py
index 0928158..61fd074 100644
--- a/hooks/charmhelpers/core/services/__init__.py
+++ b/hooks/charmhelpers/core/services/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17from .base import * # NOQA 15from .base import * # NOQA
18from .helpers import * # NOQA 16from .helpers import * # NOQA
diff --git a/hooks/charmhelpers/core/services/base.py b/hooks/charmhelpers/core/services/base.py
index a42660c..ca9dc99 100644
--- a/hooks/charmhelpers/core/services/base.py
+++ b/hooks/charmhelpers/core/services/base.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18import json 16import json
diff --git a/hooks/charmhelpers/core/services/helpers.py b/hooks/charmhelpers/core/services/helpers.py
index 2423704..3e6e30d 100644
--- a/hooks/charmhelpers/core/services/helpers.py
+++ b/hooks/charmhelpers/core/services/helpers.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18import yaml 16import yaml
diff --git a/hooks/charmhelpers/core/strutils.py b/hooks/charmhelpers/core/strutils.py
index 7e3f969..dd9b971 100644
--- a/hooks/charmhelpers/core/strutils.py
+++ b/hooks/charmhelpers/core/strutils.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20import six 18import six
21import re 19import re
diff --git a/hooks/charmhelpers/core/sysctl.py b/hooks/charmhelpers/core/sysctl.py
index 21cc8ab..6e413e3 100644
--- a/hooks/charmhelpers/core/sysctl.py
+++ b/hooks/charmhelpers/core/sysctl.py
@@ -3,19 +3,17 @@
3 3
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
9# it under the terms of the GNU Lesser General Public License version 3 as
10# published by the Free Software Foundation.
11# 11#
12# charm-helpers is distributed in the hope that it will be useful, 12# Unless required by applicable law or agreed to in writing, software
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 13# distributed under the License is distributed on an "AS IS" BASIS,
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# GNU Lesser General Public License for more details. 15# See the License for the specific language governing permissions and
16# 16# limitations under the License.
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/>.
19 17
20import yaml 18import yaml
21 19
diff --git a/hooks/charmhelpers/core/templating.py b/hooks/charmhelpers/core/templating.py
index d2d8eaf..0a7560f 100644
--- a/hooks/charmhelpers/core/templating.py
+++ b/hooks/charmhelpers/core/templating.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18 16
diff --git a/hooks/charmhelpers/core/unitdata.py b/hooks/charmhelpers/core/unitdata.py
index 338104e..54ec969 100644
--- a/hooks/charmhelpers/core/unitdata.py
+++ b/hooks/charmhelpers/core/unitdata.py
@@ -3,20 +3,17 @@
3# 3#
4# Copyright 2014-2015 Canonical Limited. 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 10# http://www.apache.org/licenses/LICENSE-2.0
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/>.
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# Authors: 18# Authors:
22# Kapil Thangavelu <kapil.foss@gmail.com> 19# Kapil Thangavelu <kapil.foss@gmail.com>
diff --git a/hooks/charmhelpers/fetch/__init__.py b/hooks/charmhelpers/fetch/__init__.py
index 68b0f94..8f39f2f 100644
--- a/hooks/charmhelpers/fetch/__init__.py
+++ b/hooks/charmhelpers/fetch/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import importlib 15import importlib
18from tempfile import NamedTemporaryFile 16from tempfile import NamedTemporaryFile
diff --git a/hooks/charmhelpers/fetch/archiveurl.py b/hooks/charmhelpers/fetch/archiveurl.py
index b8e0943..dd24f9e 100644
--- a/hooks/charmhelpers/fetch/archiveurl.py
+++ b/hooks/charmhelpers/fetch/archiveurl.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18import hashlib 16import hashlib
diff --git a/hooks/charmhelpers/fetch/bzrurl.py b/hooks/charmhelpers/fetch/bzrurl.py
index b743753..b3404d8 100644
--- a/hooks/charmhelpers/fetch/bzrurl.py
+++ b/hooks/charmhelpers/fetch/bzrurl.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18from subprocess import check_call 16from subprocess import check_call
diff --git a/hooks/charmhelpers/fetch/giturl.py b/hooks/charmhelpers/fetch/giturl.py
index 65ed531..f708d1e 100644
--- a/hooks/charmhelpers/fetch/giturl.py
+++ b/hooks/charmhelpers/fetch/giturl.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import os 15import os
18from subprocess import check_call, CalledProcessError 16from subprocess import check_call, CalledProcessError
diff --git a/hooks/charmhelpers/payload/__init__.py b/hooks/charmhelpers/payload/__init__.py
index e6f4249..ee55cb3 100644
--- a/hooks/charmhelpers/payload/__init__.py
+++ b/hooks/charmhelpers/payload/__init__.py
@@ -1,17 +1,15 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17"Tools for working with files injected into a charm just before deployment." 15"Tools for working with files injected into a charm just before deployment."
diff --git a/hooks/charmhelpers/payload/execd.py b/hooks/charmhelpers/payload/execd.py
index 4d4d81a..0c42090 100644
--- a/hooks/charmhelpers/payload/execd.py
+++ b/hooks/charmhelpers/payload/execd.py
@@ -2,19 +2,17 @@
2 2
3# Copyright 2014-2015 Canonical Limited. 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 9# http://www.apache.org/licenses/LICENSE-2.0
8# it under the terms of the GNU Lesser General Public License version 3 as
9# published by the Free Software Foundation.
10# 10#
11# charm-helpers is distributed in the hope that it will be useful, 11# Unless required by applicable law or agreed to in writing, software
12# but WITHOUT ANY WARRANTY; without even the implied warranty of 12# distributed under the License is distributed on an "AS IS" BASIS,
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# GNU Lesser General Public License for more details. 14# See the License for the specific language governing permissions and
15# 15# limitations under the License.
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/>.
18 16
19import os 17import os
20import sys 18import sys
diff --git a/tests/charmhelpers/__init__.py b/tests/charmhelpers/__init__.py
index f72e7f8..4886788 100644
--- a/tests/charmhelpers/__init__.py
+++ b/tests/charmhelpers/__init__.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17# Bootstrap charm-helpers, installing its dependencies if necessary using 15# Bootstrap charm-helpers, installing its dependencies if necessary using
18# only standard libraries. 16# only standard libraries.
diff --git a/tests/charmhelpers/contrib/__init__.py b/tests/charmhelpers/contrib/__init__.py
index d1400a0..d7567b8 100644
--- a/tests/charmhelpers/contrib/__init__.py
+++ b/tests/charmhelpers/contrib/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/tests/charmhelpers/contrib/amulet/__init__.py b/tests/charmhelpers/contrib/amulet/__init__.py
index d1400a0..d7567b8 100644
--- a/tests/charmhelpers/contrib/amulet/__init__.py
+++ b/tests/charmhelpers/contrib/amulet/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/tests/charmhelpers/contrib/amulet/deployment.py b/tests/charmhelpers/contrib/amulet/deployment.py
index d451698..0146236 100644
--- a/tests/charmhelpers/contrib/amulet/deployment.py
+++ b/tests/charmhelpers/contrib/amulet/deployment.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import amulet 15import amulet
18import os 16import os
diff --git a/tests/charmhelpers/contrib/amulet/utils.py b/tests/charmhelpers/contrib/amulet/utils.py
index 7e5c25a..a39ed4c 100644
--- a/tests/charmhelpers/contrib/amulet/utils.py
+++ b/tests/charmhelpers/contrib/amulet/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import io 15import io
18import json 16import json
diff --git a/tests/charmhelpers/contrib/openstack/__init__.py b/tests/charmhelpers/contrib/openstack/__init__.py
index d1400a0..d7567b8 100644
--- a/tests/charmhelpers/contrib/openstack/__init__.py
+++ b/tests/charmhelpers/contrib/openstack/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/tests/charmhelpers/contrib/openstack/amulet/__init__.py b/tests/charmhelpers/contrib/openstack/amulet/__init__.py
index d1400a0..d7567b8 100644
--- a/tests/charmhelpers/contrib/openstack/amulet/__init__.py
+++ b/tests/charmhelpers/contrib/openstack/amulet/__init__.py
@@ -1,15 +1,13 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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/>.
diff --git a/tests/charmhelpers/contrib/openstack/amulet/deployment.py b/tests/charmhelpers/contrib/openstack/amulet/deployment.py
index 6b917d0..f7220f3 100644
--- a/tests/charmhelpers/contrib/openstack/amulet/deployment.py
+++ b/tests/charmhelpers/contrib/openstack/amulet/deployment.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import logging 15import logging
18import re 16import re
diff --git a/tests/charmhelpers/contrib/openstack/amulet/utils.py b/tests/charmhelpers/contrib/openstack/amulet/utils.py
index ef3bdcc..8040b57 100644
--- a/tests/charmhelpers/contrib/openstack/amulet/utils.py
+++ b/tests/charmhelpers/contrib/openstack/amulet/utils.py
@@ -1,18 +1,16 @@
1# Copyright 2014-2015 Canonical Limited. 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 7# http://www.apache.org/licenses/LICENSE-2.0
6# it under the terms of the GNU Lesser General Public License version 3 as
7# published by the Free Software Foundation.
8# 8#
9# charm-helpers is distributed in the hope that it will be useful, 9# Unless required by applicable law or agreed to in writing, software
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# distributed under the License is distributed on an "AS IS" BASIS,
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# GNU Lesser General Public License for more details. 12# See the License for the specific language governing permissions and
13# 13# limitations under the License.
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 14
17import amulet 15import amulet
18import json 16import json