summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cloudinit/config/cc_byobu.py4
-rw-r--r--cloudinit/config/cc_set_passwords.py4
-rw-r--r--cloudinit/config/cc_ssh.py4
-rw-r--r--cloudinit/config/cc_ssh_authkey_fingerprints.py8
-rw-r--r--cloudinit/config/cc_ssh_import_id.py4
-rw-r--r--cloudinit/config/cc_users_groups.py3
6 files changed, 25 insertions, 2 deletions
diff --git a/cloudinit/config/cc_byobu.py b/cloudinit/config/cc_byobu.py
index e1ec5af5..e38fccdd 100644
--- a/cloudinit/config/cc_byobu.py
+++ b/cloudinit/config/cc_byobu.py
@@ -18,7 +18,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
from cloudinit import distros as ds
+
from cloudinit import util
distros = ['ubuntu', 'debian']
diff --git a/cloudinit/config/cc_set_passwords.py b/cloudinit/config/cc_set_passwords.py
index bb95f948..26c558ad 100644
--- a/cloudinit/config/cc_set_passwords.py
+++ b/cloudinit/config/cc_set_passwords.py
@@ -20,7 +20,11 @@
import sys
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
from cloudinit import distros as ds
+
from cloudinit import ssh_util
from cloudinit import util
diff --git a/cloudinit/config/cc_ssh.py b/cloudinit/config/cc_ssh.py
index c2ee4635..32e48c30 100644
--- a/cloudinit/config/cc_ssh.py
+++ b/cloudinit/config/cc_ssh.py
@@ -21,7 +21,11 @@
import glob
import os
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
from cloudinit import distros as ds
+
from cloudinit import ssh_util
from cloudinit import util
diff --git a/cloudinit/config/cc_ssh_authkey_fingerprints.py b/cloudinit/config/cc_ssh_authkey_fingerprints.py
index 32214fba..8c9a8806 100644
--- a/cloudinit/config/cc_ssh_authkey_fingerprints.py
+++ b/cloudinit/config/cc_ssh_authkey_fingerprints.py
@@ -21,7 +21,11 @@ import hashlib
from prettytable import PrettyTable
-from cloudinit import distros
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
+from cloudinit import distros as ds
+
from cloudinit import ssh_util
from cloudinit import util
@@ -94,7 +98,7 @@ def handle(name, cfg, cloud, log, _args):
hash_meth = util.get_cfg_option_str(cfg, "authkey_hash", "md5")
extract_func = ssh_util.extract_authorized_keys
- (users, _groups) = distros.normalize_users_groups(cfg, cloud.distro)
+ (users, _groups) = ds.normalize_users_groups(cfg, cloud.distro)
for (user_name, _cfg) in users.items():
(auth_key_fn, auth_key_entries) = extract_func(user_name, cloud.paths)
_pprint_key_entries(user_name, auth_key_fn,
diff --git a/cloudinit/config/cc_ssh_import_id.py b/cloudinit/config/cc_ssh_import_id.py
index a781cd7c..83af36e9 100644
--- a/cloudinit/config/cc_ssh_import_id.py
+++ b/cloudinit/config/cc_ssh_import_id.py
@@ -18,7 +18,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
from cloudinit import distros as ds
+
from cloudinit import util
import pwd
diff --git a/cloudinit/config/cc_users_groups.py b/cloudinit/config/cc_users_groups.py
index da587fb3..bf5b4581 100644
--- a/cloudinit/config/cc_users_groups.py
+++ b/cloudinit/config/cc_users_groups.py
@@ -16,6 +16,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Ensure this is aliased to a name not 'distros'
+# since the module attribute 'distros'
+# is a list of distros that are supported, not a sub-module
from cloudinit import distros as ds
from cloudinit.settings import PER_INSTANCE