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: I2f0d52c539a7edbbf806c7ab7a4679274fd095d8
This commit is contained in:
James Page 2016-07-06 15:57:41 +01:00
parent b5af23bd20
commit f4bdaea664
95 changed files with 936 additions and 1042 deletions

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# Bootstrap charm-helpers, installing its dependencies if necessary using # Bootstrap charm-helpers, installing its dependencies if necessary using
# only standard libraries. # only standard libraries.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import inspect import inspect
import argparse import argparse

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from . import cmdline from . import cmdline
from charmhelpers.contrib.benchmark import Benchmark from charmhelpers.contrib.benchmark import Benchmark

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
""" """
This module loads sub-modules into the python runtime so they can be This module loads sub-modules into the python runtime so they can be

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from . import cmdline from . import cmdline
from charmhelpers.core import hookenv from charmhelpers.core import hookenv

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from . import cmdline from . import cmdline
from charmhelpers.core import host from charmhelpers.core import host

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from . import cmdline from . import cmdline
from charmhelpers.core import unitdata from charmhelpers.core import unitdata

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
"""Compatibility with the nrpe-external-master charm""" """Compatibility with the nrpe-external-master charm"""
# Copyright 2012 Canonical Ltd. # Copyright 2012 Canonical Ltd.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
''' '''
Functions for managing volumes in juju units. One volume is supported per unit. Functions for managing volumes in juju units. One volume is supported per unit.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Copyright 2012 Canonical Ltd. # Copyright 2012 Canonical Ltd.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Copyright 2012 Canonical Ltd. # Copyright 2012 Canonical Ltd.

View File

@ -1,15 +1,13 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from os import path from os import path

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
log, log,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import re import re

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
class BaseAudit(object): # NO-QA class BaseAudit(object): # NO-QA

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import re import re
import subprocess import subprocess

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from __future__ import absolute_import # required for external apt import from __future__ import absolute_import # required for external apt import
from apt import apt_pkg from apt import apt_pkg

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import grp import grp
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import six import six

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from os import path from os import path

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
log, log,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.contrib.hardening.utils import get_settings from charmhelpers.contrib.hardening.utils import get_settings
from charmhelpers.contrib.hardening.audits.apt import ( from charmhelpers.contrib.hardening.audits.apt import (

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.contrib.hardening.audits.file import ( from charmhelpers.contrib.hardening.audits.file import (
DirectoryPermissionAudit, DirectoryPermissionAudit,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from six import string_types from six import string_types

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.contrib.hardening.audits.file import ( from charmhelpers.contrib.hardening.audits.file import (
FilePermissionAudit, FilePermissionAudit,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from subprocess import ( from subprocess import (
check_output, check_output,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.contrib.hardening.audits.file import TemplatedFile from charmhelpers.contrib.hardening.audits.file import TemplatedFile
from charmhelpers.contrib.hardening.host import TEMPLATES_DIR from charmhelpers.contrib.hardening.host import TEMPLATES_DIR

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.contrib.hardening.audits.file import TemplatedFile from charmhelpers.contrib.hardening.audits.file import TemplatedFile
from charmhelpers.contrib.hardening.host import TEMPLATES_DIR from charmhelpers.contrib.hardening.host import TEMPLATES_DIR

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import subprocess import subprocess

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import platform import platform

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from os import path from os import path

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
log, log,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import six import six
import subprocess import subprocess

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from os import path from os import path

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
log, log,

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2016 Canonical Limited. # Copyright 2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import glob import glob
import grp import grp

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import glob import glob
import re import re

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
''' Helper for managing alternatives for file conflict resolution ''' ''' Helper for managing alternatives for file conflict resolution '''

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import re import re

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import amulet import amulet
import json import json

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import glob import glob
import json import json
@ -1438,7 +1436,7 @@ class AppArmorContext(OSContextGenerator):
:return ctxt: Dictionary of the apparmor profile or None :return ctxt: Dictionary of the apparmor profile or None
""" """
if config('aa-profile-mode') in ['disable', 'enforce', 'complain']: if config('aa-profile-mode') in ['disable', 'enforce', 'complain']:
ctxt = {'aa-profile-mode': config('aa-profile-mode')} ctxt = {'aa_profile_mode': config('aa-profile-mode')}
else: else:
ctxt = None ctxt = None
return ctxt return ctxt
@ -1482,10 +1480,10 @@ class AppArmorContext(OSContextGenerator):
log("Not enabling apparmor Profile") log("Not enabling apparmor Profile")
return return
self.install_aa_utils() self.install_aa_utils()
cmd = ['aa-{}'.format(self.ctxt['aa-profile-mode'])] cmd = ['aa-{}'.format(self.ctxt['aa_profile_mode'])]
cmd.append(self.ctxt['aa-profile']) cmd.append(self.ctxt['aa_profile'])
log("Setting up the apparmor profile for {} in {} mode." log("Setting up the apparmor profile for {} in {} mode."
"".format(self.ctxt['aa-profile'], self.ctxt['aa-profile-mode'])) "".format(self.ctxt['aa_profile'], self.ctxt['aa_profile_mode']))
try: try:
check_call(cmd) check_call(cmd)
except CalledProcessError as e: except CalledProcessError as e:
@ -1494,12 +1492,12 @@ class AppArmorContext(OSContextGenerator):
# apparmor is yet unaware of the profile and aa-disable aa-profile # apparmor is yet unaware of the profile and aa-disable aa-profile
# fails. If aa-disable learns to read profile files first this can # fails. If aa-disable learns to read profile files first this can
# be removed. # be removed.
if self.ctxt['aa-profile-mode'] == 'disable': if self.ctxt['aa_profile_mode'] == 'disable':
log("Manually disabling the apparmor profile for {}." log("Manually disabling the apparmor profile for {}."
"".format(self.ctxt['aa-profile'])) "".format(self.ctxt['aa_profile']))
self.manually_disable_aa_profile() self.manually_disable_aa_profile()
return return
status_set('blocked', "Apparmor profile {} failed to be set to {}." status_set('blocked', "Apparmor profile {} failed to be set to {}."
"".format(self.ctxt['aa-profile'], "".format(self.ctxt['aa_profile'],
self.ctxt['aa-profile-mode'])) self.ctxt['aa_profile_mode']))
raise e raise e

View File

@ -1,3 +1,18 @@
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
class OSContextError(Exception): class OSContextError(Exception):
"""Raised when an error occurs during context generation. """Raised when an error occurs during context generation.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# dummy __init__.py to fool syncer into thinking this is a syncable python # dummy __init__.py to fool syncer into thinking this is a syncable python
# module # module

View File

@ -0,0 +1,13 @@
# Copyright 2016 Canonical Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2016 Canonical Limited. # Copyright 2014-2016 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Copyright 2016 Canonical Ltd. # Copyright 2016 Canonical Ltd.

View File

@ -1,19 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from charmhelpers.core.hookenv import ( from charmhelpers.core.hookenv import (
config, config,

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# Various utilies for dealing with Neutron and the renaming from Quantum. # Various utilies for dealing with Neutron and the renaming from Quantum.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# dummy __init__.py to fool syncer into thinking this is a syncable python # dummy __init__.py to fool syncer into thinking this is a syncable python
# module # module

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# Common python helper functions used for OpenStack charms. # Common python helper functions used for OpenStack charms.
from collections import OrderedDict from collections import OrderedDict
@ -222,7 +220,6 @@ GIT_DEFAULT_REPOS = {
} }
GIT_DEFAULT_BRANCHES = { GIT_DEFAULT_BRANCHES = {
'icehouse': 'icehouse-eol',
'kilo': 'stable/kilo', 'kilo': 'stable/kilo',
'liberty': 'stable/liberty', 'liberty': 'stable/liberty',
'mitaka': 'stable/mitaka', 'mitaka': 'stable/mitaka',
@ -743,12 +740,18 @@ def git_default_repos(projects_yaml):
} }
repos = [repo] repos = [repo]
# NOTE(coreycb): This is a temp work-around until the requirements
# repo moves from stable/kilo branch to kilo-eol tag. The core
# repos have already done this.
if default == 'kilo':
branch = 'kilo-eol'
# neutron-* and nova-* charms require some additional repos # neutron-* and nova-* charms require some additional repos
if service in ['neutron-api', 'neutron-gateway', if service in ['neutron-api', 'neutron-gateway',
'neutron-openvswitch']: 'neutron-openvswitch']:
core_project = 'neutron' core_project = 'neutron'
for project in ['neutron-fwaas', 'neutron-lbaas', for project in ['neutron-fwaas', 'neutron-lbaas',
'neutron-vpnaas']: 'neutron-vpnaas', 'nova']:
repo = { repo = {
'name': project, 'name': project,
'repository': GIT_DEFAULT_REPOS[project], 'repository': GIT_DEFAULT_REPOS[project],
@ -837,6 +840,7 @@ def git_clone_and_install(projects_yaml, core_project):
pip_install(p, upgrade=True, proxy=http_proxy, pip_install(p, upgrade=True, proxy=http_proxy,
venv=os.path.join(parent_dir, 'venv')) venv=os.path.join(parent_dir, 'venv'))
constraints = None
for p in projects['repositories']: for p in projects['repositories']:
repo = p['repository'] repo = p['repository']
branch = p['branch'] branch = p['branch']
@ -848,10 +852,15 @@ def git_clone_and_install(projects_yaml, core_project):
parent_dir, http_proxy, parent_dir, http_proxy,
update_requirements=False) update_requirements=False)
requirements_dir = repo_dir requirements_dir = repo_dir
constraints = os.path.join(repo_dir, "upper-constraints.txt")
# upper-constraints didn't exist until after icehouse
if not os.path.isfile(constraints):
constraints = None
else: else:
repo_dir = _git_clone_and_install_single(repo, branch, depth, repo_dir = _git_clone_and_install_single(repo, branch, depth,
parent_dir, http_proxy, parent_dir, http_proxy,
update_requirements=True) update_requirements=True,
constraints=constraints)
os.environ = old_environ os.environ = old_environ
@ -883,7 +892,7 @@ def _git_ensure_key_exists(key, keys):
def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy, def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy,
update_requirements): update_requirements, constraints=None):
""" """
Clone and install a single git repository. Clone and install a single git repository.
""" """
@ -906,9 +915,10 @@ def _git_clone_and_install_single(repo, branch, depth, parent_dir, http_proxy,
juju_log('Installing git repo from dir: {}'.format(repo_dir)) juju_log('Installing git repo from dir: {}'.format(repo_dir))
if http_proxy: if http_proxy:
pip_install(repo_dir, proxy=http_proxy, venv=venv) pip_install(repo_dir, proxy=http_proxy, venv=venv,
constraints=constraints)
else: else:
pip_install(repo_dir, venv=venv) pip_install(repo_dir, venv=venv, constraints=constraints)
return repo_dir return repo_dir
@ -988,6 +998,7 @@ def git_generate_systemd_init_files(templates_dir):
script generation, which is used by the OpenStack packages. script generation, which is used by the OpenStack packages.
""" """
for f in os.listdir(templates_dir): for f in os.listdir(templates_dir):
# Create the init script and systemd unit file from the template
if f.endswith(".init.in"): if f.endswith(".init.in"):
init_in_file = f init_in_file = f
init_file = f[:-8] init_file = f[:-8]
@ -1013,10 +1024,47 @@ def git_generate_systemd_init_files(templates_dir):
os.remove(init_dest) os.remove(init_dest)
if os.path.exists(service_dest): if os.path.exists(service_dest):
os.remove(service_dest) os.remove(service_dest)
shutil.move(init_source, init_dest) shutil.copyfile(init_source, init_dest)
shutil.move(service_source, service_dest) shutil.copyfile(service_source, service_dest)
os.chmod(init_dest, 0o755) os.chmod(init_dest, 0o755)
for f in os.listdir(templates_dir):
# If there's a service.in file, use it instead of the generated one
if f.endswith(".service.in"):
service_in_file = f
service_file = f[:-3]
service_in_source = os.path.join(templates_dir, service_in_file)
service_source = os.path.join(templates_dir, service_file)
service_dest = os.path.join('/lib/systemd/system', service_file)
shutil.copyfile(service_in_source, service_source)
if os.path.exists(service_dest):
os.remove(service_dest)
shutil.copyfile(service_source, service_dest)
for f in os.listdir(templates_dir):
# Generate the systemd unit if there's no existing .service.in
if f.endswith(".init.in"):
init_in_file = f
init_file = f[:-8]
service_in_file = "{}.service.in".format(init_file)
service_file = "{}.service".format(init_file)
init_in_source = os.path.join(templates_dir, init_in_file)
service_in_source = os.path.join(templates_dir, service_in_file)
service_source = os.path.join(templates_dir, service_file)
service_dest = os.path.join('/lib/systemd/system', service_file)
if not os.path.exists(service_in_source):
cmd = ['pkgos-gen-systemd-unit', init_in_source]
subprocess.check_call(cmd)
if os.path.exists(service_dest):
os.remove(service_dest)
shutil.copyfile(service_source, service_dest)
def os_workload_status(configs, required_interfaces, charm_func=None): def os_workload_status(configs, required_interfaces, charm_func=None):
""" """

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import subprocess import subprocess
@ -80,7 +78,8 @@ def pip_install_requirements(requirements, constraints=None, **options):
pip_execute(command) pip_execute(command)
def pip_install(package, fatal=False, upgrade=False, venv=None, **options): def pip_install(package, fatal=False, upgrade=False, venv=None,
constraints=None, **options):
"""Install a python package""" """Install a python package"""
if venv: if venv:
venv_python = os.path.join(venv, 'bin/pip') venv_python = os.path.join(venv, 'bin/pip')
@ -95,6 +94,9 @@ def pip_install(package, fatal=False, upgrade=False, venv=None, **options):
if upgrade: if upgrade:
command.append('--upgrade') command.append('--upgrade')
if constraints:
command.extend(['-c', constraints])
if isinstance(package, list): if isinstance(package, list):
command.extend(package) command.extend(package)
else: else:

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Copyright 2012 Canonical Ltd. # Copyright 2012 Canonical Ltd.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Copyright 2014 Canonical Ltd. # Copyright 2014 Canonical Ltd.

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
__author__ = 'Jorge Niedbalski <niedbalski@ubuntu.com>' __author__ = 'Jorge Niedbalski <niedbalski@ubuntu.com>'

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import io import io
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
"Interactions with the Juju environment" "Interactions with the Juju environment"
# Copyright 2013 Canonical Ltd. # Copyright 2013 Canonical Ltd.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
"""Tools for working with the host system""" """Tools for working with the host system"""
# Copyright 2012 Canonical Ltd. # Copyright 2012 Canonical Ltd.

View File

@ -2,19 +2,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import yaml import yaml
from charmhelpers.core import fstab from charmhelpers.core import fstab

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
__author__ = "Jorge Niedbalski <jorge.niedbalski@canonical.com>" __author__ = "Jorge Niedbalski <jorge.niedbalski@canonical.com>"

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
from .base import * # NOQA from .base import * # NOQA
from .helpers import * # NOQA from .helpers import * # NOQA

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import json import json

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import yaml import yaml

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import six import six
import re import re

View File

@ -3,19 +3,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import yaml import yaml

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os

View File

@ -3,20 +3,17 @@
# #
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
#
# charm-helpers is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# #
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# #
# Authors: # Authors:
# Kapil Thangavelu <kapil.foss@gmail.com> # Kapil Thangavelu <kapil.foss@gmail.com>

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import importlib import importlib
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import hashlib import hashlib

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
from subprocess import check_call from subprocess import check_call

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
from subprocess import check_call, CalledProcessError from subprocess import check_call, CalledProcessError

View File

@ -1,17 +1,15 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
"Tools for working with files injected into a charm just before deployment." "Tools for working with files injected into a charm just before deployment."

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import tarfile import tarfile

View File

@ -2,19 +2,17 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys import sys

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
# Bootstrap charm-helpers, installing its dependencies if necessary using # Bootstrap charm-helpers, installing its dependencies if necessary using
# only standard libraries. # only standard libraries.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import amulet import amulet
import os import os

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import io import io
import json import json

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,15 +1,13 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import logging import logging
import re import re

View File

@ -1,18 +1,16 @@
# Copyright 2014-2015 Canonical Limited. # Copyright 2014-2015 Canonical Limited.
# #
# This file is part of charm-helpers. # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# #
# charm-helpers is free software: you can redistribute it and/or modify # http://www.apache.org/licenses/LICENSE-2.0
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
# #
# charm-helpers is distributed in the hope that it will be useful, # Unless required by applicable law or agreed to in writing, software
# but WITHOUT ANY WARRANTY; without even the implied warranty of # distributed under the License is distributed on an "AS IS" BASIS,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# GNU Lesser General Public License for more details. # See the License for the specific language governing permissions and
# # limitations under the License.
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www.gnu.org/licenses/>.
import amulet import amulet
import json import json