summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-12 16:51:47 +0100
committerScott Moser <smoser@ubuntu.com>2012-01-12 16:51:47 +0100
commit234cefd314a7e1cfb51fad3bdf344d801a8b238d (patch)
treedadad683214756e91e9a15c5ad88a9f89f8cf572 /cloudinit/CloudConfig
parentdf5d51c25523ea04d45f5f077e94885d1847e526 (diff)
downloadvyos-cloud-init-234cefd314a7e1cfb51fad3bdf344d801a8b238d.tar.gz
vyos-cloud-init-234cefd314a7e1cfb51fad3bdf344d801a8b238d.zip
[PATCH 05/13] Fix pylint warnings W0613 (unused argument)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloudinit/CloudConfig')
-rw-r--r--cloudinit/CloudConfig/cc_apt_update_upgrade.py2
-rw-r--r--cloudinit/CloudConfig/cc_bootcmd.py2
-rw-r--r--cloudinit/CloudConfig/cc_byobu.py2
-rw-r--r--cloudinit/CloudConfig/cc_chef.py2
-rw-r--r--cloudinit/CloudConfig/cc_disable_ec2_metadata.py2
-rw-r--r--cloudinit/CloudConfig/cc_final_message.py2
-rw-r--r--cloudinit/CloudConfig/cc_foo.py2
-rw-r--r--cloudinit/CloudConfig/cc_grub_dpkg.py2
-rw-r--r--cloudinit/CloudConfig/cc_keys_to_console.py2
-rw-r--r--cloudinit/CloudConfig/cc_landscape.py2
-rw-r--r--cloudinit/CloudConfig/cc_locale.py2
-rw-r--r--cloudinit/CloudConfig/cc_mcollective.py2
-rw-r--r--cloudinit/CloudConfig/cc_mounts.py2
-rw-r--r--cloudinit/CloudConfig/cc_phone_home.py2
-rw-r--r--cloudinit/CloudConfig/cc_puppet.py2
-rw-r--r--cloudinit/CloudConfig/cc_resizefs.py2
-rw-r--r--cloudinit/CloudConfig/cc_rightscale_userdata.py2
-rw-r--r--cloudinit/CloudConfig/cc_rsyslog.py2
-rw-r--r--cloudinit/CloudConfig/cc_runcmd.py2
-rw-r--r--cloudinit/CloudConfig/cc_scripts_per_boot.py2
-rw-r--r--cloudinit/CloudConfig/cc_scripts_per_instance.py2
-rw-r--r--cloudinit/CloudConfig/cc_scripts_per_once.py2
-rw-r--r--cloudinit/CloudConfig/cc_scripts_user.py2
-rw-r--r--cloudinit/CloudConfig/cc_set_hostname.py2
-rw-r--r--cloudinit/CloudConfig/cc_set_passwords.py2
-rw-r--r--cloudinit/CloudConfig/cc_ssh.py2
-rw-r--r--cloudinit/CloudConfig/cc_ssh_import_id.py2
-rw-r--r--cloudinit/CloudConfig/cc_timezone.py2
-rw-r--r--cloudinit/CloudConfig/cc_update_etc_hosts.py4
-rw-r--r--cloudinit/CloudConfig/cc_update_hostname.py2
30 files changed, 31 insertions, 31 deletions
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
index 0677ceb5..e9fd2c07 100644
--- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py
+++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
@@ -22,7 +22,7 @@ import os
import glob
import cloudinit.CloudConfig as cc
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
update = util.get_cfg_option_bool(cfg, 'apt_update', False)
upgrade = util.get_cfg_option_bool(cfg, 'apt_upgrade', False)
diff --git a/cloudinit/CloudConfig/cc_bootcmd.py b/cloudinit/CloudConfig/cc_bootcmd.py
index 5a9e4356..fc925447 100644
--- a/cloudinit/CloudConfig/cc_bootcmd.py
+++ b/cloudinit/CloudConfig/cc_bootcmd.py
@@ -21,7 +21,7 @@ import tempfile
from cloudinit.CloudConfig import per_always
frequency = per_always
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
if not cfg.has_key("bootcmd"):
return
diff --git a/cloudinit/CloudConfig/cc_byobu.py b/cloudinit/CloudConfig/cc_byobu.py
index 406a1f67..dd510dda 100644
--- a/cloudinit/CloudConfig/cc_byobu.py
+++ b/cloudinit/CloudConfig/cc_byobu.py
@@ -19,7 +19,7 @@ import cloudinit.util as util
import subprocess
import traceback
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
value = args[0]
else:
diff --git a/cloudinit/CloudConfig/cc_chef.py b/cloudinit/CloudConfig/cc_chef.py
index 08a9f40e..6b8e3825 100644
--- a/cloudinit/CloudConfig/cc_chef.py
+++ b/cloudinit/CloudConfig/cc_chef.py
@@ -23,7 +23,7 @@ import cloudinit.util as util
ruby_version_default = "1.8"
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
# If there isn't a chef key in the configuration don't do anything
if not cfg.has_key('chef'): return
chef_cfg = cfg['chef']
diff --git a/cloudinit/CloudConfig/cc_disable_ec2_metadata.py b/cloudinit/CloudConfig/cc_disable_ec2_metadata.py
index 5cd1d1c1..f06d4dfc 100644
--- a/cloudinit/CloudConfig/cc_disable_ec2_metadata.py
+++ b/cloudinit/CloudConfig/cc_disable_ec2_metadata.py
@@ -21,7 +21,7 @@ from cloudinit.CloudConfig import per_always
frequency = per_always
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,_log,_args):
if util.get_cfg_option_bool(cfg, "disable_ec2_metadata", False):
fwall="route add -host 169.254.169.254 reject"
subprocess.call(fwall.split(' '))
diff --git a/cloudinit/CloudConfig/cc_final_message.py b/cloudinit/CloudConfig/cc_final_message.py
index fbdb5c94..c8631d01 100644
--- a/cloudinit/CloudConfig/cc_final_message.py
+++ b/cloudinit/CloudConfig/cc_final_message.py
@@ -24,7 +24,7 @@ frequency = per_always
final_message = "cloud-init boot finished at $TIMESTAMP. Up $UPTIME seconds"
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
msg_in = args[0]
else:
diff --git a/cloudinit/CloudConfig/cc_foo.py b/cloudinit/CloudConfig/cc_foo.py
index c15e8d75..48d20e5b 100644
--- a/cloudinit/CloudConfig/cc_foo.py
+++ b/cloudinit/CloudConfig/cc_foo.py
@@ -22,5 +22,5 @@ from cloudinit.CloudConfig import per_instance
frequency = per_instance
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,_cloud,_log,_args):
print "hi"
diff --git a/cloudinit/CloudConfig/cc_grub_dpkg.py b/cloudinit/CloudConfig/cc_grub_dpkg.py
index 588f1403..97d79bdb 100644
--- a/cloudinit/CloudConfig/cc_grub_dpkg.py
+++ b/cloudinit/CloudConfig/cc_grub_dpkg.py
@@ -20,7 +20,7 @@ import cloudinit.util as util
import traceback
import os
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,_args):
idevs=None
idevs_empty=None
diff --git a/cloudinit/CloudConfig/cc_keys_to_console.py b/cloudinit/CloudConfig/cc_keys_to_console.py
index 79dd2ea9..08e8f085 100644
--- a/cloudinit/CloudConfig/cc_keys_to_console.py
+++ b/cloudinit/CloudConfig/cc_keys_to_console.py
@@ -21,7 +21,7 @@ import subprocess
frequency = per_instance
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,_args):
cmd = [ '/usr/lib/cloud-init/write-ssh-key-fingerprints' ]
fp_blacklist = util.get_cfg_option_list_or_str(cfg, "ssh_fp_console_blacklist", [])
key_blacklist = util.get_cfg_option_list_or_str(cfg, "ssh_key_console_blacklist", ["ssh-dss"])
diff --git a/cloudinit/CloudConfig/cc_landscape.py b/cloudinit/CloudConfig/cc_landscape.py
index e3e4f7ba..22a90665 100644
--- a/cloudinit/CloudConfig/cc_landscape.py
+++ b/cloudinit/CloudConfig/cc_landscape.py
@@ -32,7 +32,7 @@ lsc_builtincfg = {
}
}
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,_args):
"""
Basically turn a top level 'landscape' entry with a 'client' dict
and render it to ConfigObj format under '[client]' section in
diff --git a/cloudinit/CloudConfig/cc_locale.py b/cloudinit/CloudConfig/cc_locale.py
index 8542f641..8e91d3bf 100644
--- a/cloudinit/CloudConfig/cc_locale.py
+++ b/cloudinit/CloudConfig/cc_locale.py
@@ -28,7 +28,7 @@ def apply_locale(locale, cfgfile):
util.render_to_file('default-locale', cfgfile, { 'locale' : locale })
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,args):
if len(args) != 0:
locale = args[0]
else:
diff --git a/cloudinit/CloudConfig/cc_mcollective.py b/cloudinit/CloudConfig/cc_mcollective.py
index 656dd406..38fe4a3c 100644
--- a/cloudinit/CloudConfig/cc_mcollective.py
+++ b/cloudinit/CloudConfig/cc_mcollective.py
@@ -38,7 +38,7 @@ class FakeSecHead(object):
finally: self.sechead = None
else: return self.fp.readline()
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,_log,_args):
# If there isn't a mcollective key in the configuration don't do anything
if not cfg.has_key('mcollective'): return
mcollective_cfg = cfg['mcollective']
diff --git a/cloudinit/CloudConfig/cc_mounts.py b/cloudinit/CloudConfig/cc_mounts.py
index db382f04..327b480f 100644
--- a/cloudinit/CloudConfig/cc_mounts.py
+++ b/cloudinit/CloudConfig/cc_mounts.py
@@ -31,7 +31,7 @@ def is_mdname(name):
return True
return False
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
# fs_spec, fs_file, fs_vfstype, fs_mntops, fs-freq, fs_passno
defvals = [ None, None, "auto", "defaults,nobootwait", "0", "2" ]
defvals = cfg.get("mount_default_fields", defvals)
diff --git a/cloudinit/CloudConfig/cc_phone_home.py b/cloudinit/CloudConfig/cc_phone_home.py
index f291e1d4..3dcec17f 100644
--- a/cloudinit/CloudConfig/cc_phone_home.py
+++ b/cloudinit/CloudConfig/cc_phone_home.py
@@ -31,7 +31,7 @@ post_list_all = [ 'pub_key_dsa', 'pub_key_rsa', 'pub_key_ecdsa', 'instance_id',
# url: http://my.foo.bar/$INSTANCE_ID/
# post: [ pub_key_dsa, pub_key_rsa, pub_key_ecdsa, instance_id
#
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,args):
if len(args) != 0:
ph_cfg = util.readconf(args[0])
else:
diff --git a/cloudinit/CloudConfig/cc_puppet.py b/cloudinit/CloudConfig/cc_puppet.py
index c635d1f5..3748559a 100644
--- a/cloudinit/CloudConfig/cc_puppet.py
+++ b/cloudinit/CloudConfig/cc_puppet.py
@@ -25,7 +25,7 @@ import ConfigParser
import cloudinit.CloudConfig as cc
import cloudinit.util as util
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
# If there isn't a puppet key in the configuration don't do anything
if not cfg.has_key('puppet'): return
puppet_cfg = cfg['puppet']
diff --git a/cloudinit/CloudConfig/cc_resizefs.py b/cloudinit/CloudConfig/cc_resizefs.py
index 83062642..d4b260b8 100644
--- a/cloudinit/CloudConfig/cc_resizefs.py
+++ b/cloudinit/CloudConfig/cc_resizefs.py
@@ -25,7 +25,7 @@ from cloudinit.CloudConfig import per_always
frequency = per_always
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
resize_root = False
if str(args[0]).lower() in [ 'true', '1', 'on', 'yes']:
diff --git a/cloudinit/CloudConfig/cc_rightscale_userdata.py b/cloudinit/CloudConfig/cc_rightscale_userdata.py
index ce0c2fe9..050d89aa 100644
--- a/cloudinit/CloudConfig/cc_rightscale_userdata.py
+++ b/cloudinit/CloudConfig/cc_rightscale_userdata.py
@@ -42,7 +42,7 @@ frequency = per_instance
my_name = "cc_rightscale_userdata"
my_hookname = 'CLOUD_INIT_REMOTE_HOOK'
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,cloud,log,_args):
try:
ud = cloud.get_userdata_raw()
except:
diff --git a/cloudinit/CloudConfig/cc_rsyslog.py b/cloudinit/CloudConfig/cc_rsyslog.py
index dfd72c33..4e427ae0 100644
--- a/cloudinit/CloudConfig/cc_rsyslog.py
+++ b/cloudinit/CloudConfig/cc_rsyslog.py
@@ -24,7 +24,7 @@ import traceback
DEF_FILENAME = "20-cloud-config.conf"
DEF_DIR = "/etc/rsyslog.d"
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,_args):
# rsyslog:
# - "*.* @@192.158.1.1"
# - content: "*.* @@192.0.2.1:10514"
diff --git a/cloudinit/CloudConfig/cc_runcmd.py b/cloudinit/CloudConfig/cc_runcmd.py
index 633f411b..d255223b 100644
--- a/cloudinit/CloudConfig/cc_runcmd.py
+++ b/cloudinit/CloudConfig/cc_runcmd.py
@@ -18,7 +18,7 @@
import cloudinit.util as util
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
if not cfg.has_key("runcmd"):
return
outfile="%s/runcmd" % cloud.get_ipath('scripts')
diff --git a/cloudinit/CloudConfig/cc_scripts_per_boot.py b/cloudinit/CloudConfig/cc_scripts_per_boot.py
index 2af060af..fb643c6d 100644
--- a/cloudinit/CloudConfig/cc_scripts_per_boot.py
+++ b/cloudinit/CloudConfig/cc_scripts_per_boot.py
@@ -23,7 +23,7 @@ from cloudinit import get_cpath
frequency = per_always
runparts_path = "%s/%s" % (get_cpath(), "scripts/per-boot")
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,_cloud,log,_args):
try:
util.runparts(runparts_path)
except:
diff --git a/cloudinit/CloudConfig/cc_scripts_per_instance.py b/cloudinit/CloudConfig/cc_scripts_per_instance.py
index e00f5e7b..b0f0601a 100644
--- a/cloudinit/CloudConfig/cc_scripts_per_instance.py
+++ b/cloudinit/CloudConfig/cc_scripts_per_instance.py
@@ -23,7 +23,7 @@ from cloudinit import get_cpath
frequency = per_instance
runparts_path = "%s/%s" % (get_cpath(), "scripts/per-instance")
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,_cloud,log,_args):
try:
util.runparts(runparts_path)
except:
diff --git a/cloudinit/CloudConfig/cc_scripts_per_once.py b/cloudinit/CloudConfig/cc_scripts_per_once.py
index 3c1a151b..2ab81840 100644
--- a/cloudinit/CloudConfig/cc_scripts_per_once.py
+++ b/cloudinit/CloudConfig/cc_scripts_per_once.py
@@ -23,7 +23,7 @@ from cloudinit import get_cpath
frequency = per_once
runparts_path = "%s/%s" % (get_cpath(), "scripts/per-once")
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,_cloud,log,_args):
try:
util.runparts(runparts_path)
except:
diff --git a/cloudinit/CloudConfig/cc_scripts_user.py b/cloudinit/CloudConfig/cc_scripts_user.py
index 2f44b66b..9c7f2322 100644
--- a/cloudinit/CloudConfig/cc_scripts_user.py
+++ b/cloudinit/CloudConfig/cc_scripts_user.py
@@ -23,7 +23,7 @@ from cloudinit import get_ipath_cur
frequency = per_instance
runparts_path = "%s/%s" % (get_ipath_cur(), "scripts")
-def handle(name,cfg,cloud,log,args):
+def handle(_name,_cfg,_cloud,log,_args):
try:
util.runparts(runparts_path)
except:
diff --git a/cloudinit/CloudConfig/cc_set_hostname.py b/cloudinit/CloudConfig/cc_set_hostname.py
index 1a70d9e0..129e9165 100644
--- a/cloudinit/CloudConfig/cc_set_hostname.py
+++ b/cloudinit/CloudConfig/cc_set_hostname.py
@@ -18,7 +18,7 @@
import cloudinit.util as util
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
if util.get_cfg_option_bool(cfg,"preserve_hostname",False):
log.debug("preserve_hostname is set. not setting hostname")
return(True)
diff --git a/cloudinit/CloudConfig/cc_set_passwords.py b/cloudinit/CloudConfig/cc_set_passwords.py
index c7fa4d64..f44d450c 100644
--- a/cloudinit/CloudConfig/cc_set_passwords.py
+++ b/cloudinit/CloudConfig/cc_set_passwords.py
@@ -21,7 +21,7 @@ import sys
import random
import string
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
# if run from command line, and give args, wipe the chpasswd['list']
password = args[0]
diff --git a/cloudinit/CloudConfig/cc_ssh.py b/cloudinit/CloudConfig/cc_ssh.py
index 9f5dc567..0aad2187 100644
--- a/cloudinit/CloudConfig/cc_ssh.py
+++ b/cloudinit/CloudConfig/cc_ssh.py
@@ -26,7 +26,7 @@ DISABLE_ROOT_OPTS="no-port-forwarding,no-agent-forwarding,no-X11-forwarding,comm
global_log = None
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
global global_log
global_log = log
diff --git a/cloudinit/CloudConfig/cc_ssh_import_id.py b/cloudinit/CloudConfig/cc_ssh_import_id.py
index bf1314be..7e7a54a1 100644
--- a/cloudinit/CloudConfig/cc_ssh_import_id.py
+++ b/cloudinit/CloudConfig/cc_ssh_import_id.py
@@ -19,7 +19,7 @@ import cloudinit.util as util
import subprocess
import traceback
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
user = args[0]
ids = [ ]
diff --git a/cloudinit/CloudConfig/cc_timezone.py b/cloudinit/CloudConfig/cc_timezone.py
index 9a6e50d1..26b2796d 100644
--- a/cloudinit/CloudConfig/cc_timezone.py
+++ b/cloudinit/CloudConfig/cc_timezone.py
@@ -24,7 +24,7 @@ import shutil
frequency = per_instance
tz_base = "/usr/share/zoneinfo"
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,_cloud,log,args):
if len(args) != 0:
timezone = args[0]
else:
diff --git a/cloudinit/CloudConfig/cc_update_etc_hosts.py b/cloudinit/CloudConfig/cc_update_etc_hosts.py
index cf2ad046..9e3a1dbb 100644
--- a/cloudinit/CloudConfig/cc_update_etc_hosts.py
+++ b/cloudinit/CloudConfig/cc_update_etc_hosts.py
@@ -21,7 +21,7 @@ import StringIO
frequency = per_always
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
( hostname, fqdn ) = util.get_hostname_fqdn(cfg, cloud)
manage_hosts = util.get_cfg_option_bool(cfg,"manage_etc_hosts", False)
@@ -48,7 +48,7 @@ def handle(name,cfg,cloud,log,args):
log.debug("not managing /etc/hosts")
-def update_etc_hosts(hostname, fqdn, log):
+def update_etc_hosts(hostname, fqdn, _log):
with open('/etc/hosts', 'r') as etchosts:
header = "# Added by cloud-init\n"
hosts_line = "127.0.1.1\t%s %s\n" % (fqdn, hostname)
diff --git a/cloudinit/CloudConfig/cc_update_hostname.py b/cloudinit/CloudConfig/cc_update_hostname.py
index 3f55c73b..871e40bf 100644
--- a/cloudinit/CloudConfig/cc_update_hostname.py
+++ b/cloudinit/CloudConfig/cc_update_hostname.py
@@ -22,7 +22,7 @@ from cloudinit.CloudConfig import per_always
frequency = per_always
-def handle(name,cfg,cloud,log,args):
+def handle(_name,cfg,cloud,log,_args):
if util.get_cfg_option_bool(cfg,"preserve_hostname",False):
log.debug("preserve_hostname is set. not updating hostname")
return