summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_salt_minion.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-10-27 19:25:48 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-10-27 19:25:48 -0700
commitaa8b51a48a30e3a3c863ca0ddb8bc4667026d57a (patch)
tree664d7bfb27d2394a02b9a3aeb4f25b8a835f6be5 /cloudinit/config/cc_salt_minion.py
parent71b4108d029fff61ff8183ffbd77917569bea2cd (diff)
downloadvyos-cloud-init-aa8b51a48a30e3a3c863ca0ddb8bc4667026d57a.tar.gz
vyos-cloud-init-aa8b51a48a30e3a3c863ca0ddb8bc4667026d57a.zip
Helpful cleanups.
1. Remove the usage of the path.join function now that all code should be going through the util file methods (and they can be mocked out as needed). 2. Adjust all occurences of the above join function to either not use it or replace it with the standard os.path.join (which can also be mocked out as needed) 3. Fix pylint from complaining about the tests folder 'helpers.py' not being found 4. Add a pylintrc file that is used instead of the options hidden in the 'run_pylint' tool.
Diffstat (limited to 'cloudinit/config/cc_salt_minion.py')
-rw-r--r--cloudinit/config/cc_salt_minion.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cloudinit/config/cc_salt_minion.py b/cloudinit/config/cc_salt_minion.py
index 8a1440d9..f3eede18 100644
--- a/cloudinit/config/cc_salt_minion.py
+++ b/cloudinit/config/cc_salt_minion.py
@@ -34,8 +34,7 @@ def handle(name, cfg, cloud, log, _args):
cloud.distro.install_packages(["salt-minion"])
# Ensure we can configure files at the right dir
- config_dir = cloud.paths.join(False, salt_cfg.get("config_dir",
- '/etc/salt'))
+ config_dir = salt_cfg.get("config_dir", '/etc/salt')
util.ensure_dir(config_dir)
# ... and then update the salt configuration
@@ -47,8 +46,7 @@ def handle(name, cfg, cloud, log, _args):
# ... copy the key pair if specified
if 'public_key' in salt_cfg and 'private_key' in salt_cfg:
- pki_dir = cloud.paths.join(False, salt_cfg.get('pki_dir',
- '/etc/salt/pki'))
+ pki_dir = salt_cfg.get('pki_dir', '/etc/salt/pki')
with util.umask(077):
util.ensure_dir(pki_dir)
pub_name = os.path.join(pki_dir, 'minion.pub')