summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-07-15 10:26:12 -0400
committerGitHub <noreply@github.com>2020-07-15 10:26:12 -0400
commit4fe576516d65feda17ba78e9265a8e494a195e7b (patch)
treea4cdbde78f035bfca999c22ce5c1443ecb20c5ae /cloudinit
parent25289087e44c9c74543248519e37ca1f11b8a711 (diff)
downloadvyos-cloud-init-4fe576516d65feda17ba78e9265a8e494a195e7b.tar.gz
vyos-cloud-init-4fe576516d65feda17ba78e9265a8e494a195e7b.zip
cloudinit: remove global disable of pylint W0107 and fix errors (#489)
* cloudinit: remove global disable of pylint W0107 and fix errors This includes removing a test class which contained no tests but wasn't detected as empty because of an errant pass statement. * .pylintrc: update disable comment to match arguments
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_set_hostname.py1
-rw-r--r--cloudinit/distros/networking.py3
-rw-r--r--cloudinit/distros/ubuntu.py2
-rwxr-xr-xcloudinit/net/cmdline.py2
-rw-r--r--cloudinit/net/dhcp.py2
-rwxr-xr-xcloudinit/reporting/handlers.py1
-rwxr-xr-xcloudinit/sources/DataSourceAzure.py1
-rw-r--r--cloudinit/sources/__init__.py2
-rw-r--r--cloudinit/sources/helpers/netlink.py1
-rw-r--r--cloudinit/sources/helpers/vmware/imc/config_file.py1
-rw-r--r--cloudinit/sources/helpers/vmware/imc/config_namespace.py1
-rw-r--r--cloudinit/sources/helpers/vmware/imc/config_source.py1
-rw-r--r--cloudinit/stages.py1
13 files changed, 0 insertions, 19 deletions
diff --git a/cloudinit/config/cc_set_hostname.py b/cloudinit/config/cc_set_hostname.py
index 10d6d197..c13020d8 100644
--- a/cloudinit/config/cc_set_hostname.py
+++ b/cloudinit/config/cc_set_hostname.py
@@ -55,7 +55,6 @@ class SetHostnameError(Exception):
This may happen if we attempt to set the hostname early in cloud-init's
init-local timeframe as certain services may not be running yet.
"""
- pass
def handle(name, cfg, cloud, log, _args):
diff --git a/cloudinit/distros/networking.py b/cloudinit/distros/networking.py
index 75e69df5..10ed249d 100644
--- a/cloudinit/distros/networking.py
+++ b/cloudinit/distros/networking.py
@@ -92,7 +92,6 @@ class Networking(metaclass=abc.ABCMeta):
Examples of non-physical network devices: bonds, bridges, tunnels,
loopback devices.
"""
- pass
def is_renamed(self, devname: DeviceName) -> bool:
return net.is_renamed(devname)
@@ -117,7 +116,6 @@ class Networking(metaclass=abc.ABCMeta):
process entirely, if the device already exists.)
:type exists: Optional[DeviceName]
"""
- pass
def wait_for_physdevs(
self, netcfg: NetworkConfig, *, strict: bool = True
@@ -182,7 +180,6 @@ class BSDNetworking(Networking):
def settle(self, *, exists=None) -> None:
"""BSD has no equivalent to `udevadm settle`; noop."""
- pass
class LinuxNetworking(Networking):
diff --git a/cloudinit/distros/ubuntu.py b/cloudinit/distros/ubuntu.py
index 23be3bdd..b4c4b0c3 100644
--- a/cloudinit/distros/ubuntu.py
+++ b/cloudinit/distros/ubuntu.py
@@ -49,7 +49,5 @@ class Distro(debian.Distro):
copy.deepcopy(PREFERRED_NTP_CLIENTS))
return self._preferred_ntp_clients
- pass
-
# vi: ts=4 expandtab
diff --git a/cloudinit/net/cmdline.py b/cloudinit/net/cmdline.py
index 0e83685d..7ca7262b 100755
--- a/cloudinit/net/cmdline.py
+++ b/cloudinit/net/cmdline.py
@@ -29,12 +29,10 @@ class InitramfsNetworkConfigSource(metaclass=abc.ABCMeta):
@abc.abstractmethod
def is_applicable(self) -> bool:
"""Is this initramfs config source applicable to the current system?"""
- pass
@abc.abstractmethod
def render_config(self) -> dict:
"""Render a v1 network config from the initramfs configuration"""
- pass
class KlibcNetworkConfigSource(InitramfsNetworkConfigSource):
diff --git a/cloudinit/net/dhcp.py b/cloudinit/net/dhcp.py
index 9e004688..d1d1255e 100644
--- a/cloudinit/net/dhcp.py
+++ b/cloudinit/net/dhcp.py
@@ -31,12 +31,10 @@ class InvalidDHCPLeaseFileError(Exception):
Current uses are DataSourceAzure and DataSourceEc2 during ephemeral
boot to scrape metadata.
"""
- pass
class NoDHCPLeaseError(Exception):
"""Raised when unable to get a DHCP lease."""
- pass
class EphemeralDHCPv4(object):
diff --git a/cloudinit/reporting/handlers.py b/cloudinit/reporting/handlers.py
index 6b9127b6..1986ebdd 100755
--- a/cloudinit/reporting/handlers.py
+++ b/cloudinit/reporting/handlers.py
@@ -35,7 +35,6 @@ class ReportingHandler(metaclass=abc.ABCMeta):
def flush(self):
"""Ensure ReportingHandler has published all events"""
- pass
class LogHandler(ReportingHandler):
diff --git a/cloudinit/sources/DataSourceAzure.py b/cloudinit/sources/DataSourceAzure.py
index 5e25b956..8b34d047 100755
--- a/cloudinit/sources/DataSourceAzure.py
+++ b/cloudinit/sources/DataSourceAzure.py
@@ -688,7 +688,6 @@ class DataSourceAzure(sources.DataSource):
except UrlError:
# Teardown our EphemeralDHCPv4 context on failure as we retry
self._ephemeral_dhcp_ctx.clean_network()
- pass
finally:
if nl_sock:
nl_sock.close()
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py
index 923e3cea..c4d60fff 100644
--- a/cloudinit/sources/__init__.py
+++ b/cloudinit/sources/__init__.py
@@ -78,7 +78,6 @@ class DataSourceNotFoundException(Exception):
class InvalidMetaDataException(Exception):
"""Raised when metadata is broken, unavailable or disabled."""
- pass
def process_instance_metadata(metadata, key_path='', sensitive_keys=()):
@@ -511,7 +510,6 @@ class DataSource(metaclass=abc.ABCMeta):
(e.g. 'ssh-rsa') and key_value is the key itself
(e.g. 'AAAAB3NzaC1y...').
"""
- pass
def _remap_device(self, short_name):
# LP: #611137
diff --git a/cloudinit/sources/helpers/netlink.py b/cloudinit/sources/helpers/netlink.py
index d377ae3d..a74a3588 100644
--- a/cloudinit/sources/helpers/netlink.py
+++ b/cloudinit/sources/helpers/netlink.py
@@ -55,7 +55,6 @@ NetlinkHeader = namedtuple('NetlinkHeader', ['length', 'type', 'flags', 'seq',
class NetlinkCreateSocketError(RuntimeError):
'''Raised if netlink socket fails during create or bind.'''
- pass
def create_bound_netlink_socket():
diff --git a/cloudinit/sources/helpers/vmware/imc/config_file.py b/cloudinit/sources/helpers/vmware/imc/config_file.py
index 602af078..fc034c95 100644
--- a/cloudinit/sources/helpers/vmware/imc/config_file.py
+++ b/cloudinit/sources/helpers/vmware/imc/config_file.py
@@ -22,7 +22,6 @@ class ConfigFile(ConfigSource, dict):
def __init__(self, filename):
self._loadConfigFile(filename)
- pass
def _insertKey(self, key, val):
"""
diff --git a/cloudinit/sources/helpers/vmware/imc/config_namespace.py b/cloudinit/sources/helpers/vmware/imc/config_namespace.py
index 2f29edd4..5899d8f7 100644
--- a/cloudinit/sources/helpers/vmware/imc/config_namespace.py
+++ b/cloudinit/sources/helpers/vmware/imc/config_namespace.py
@@ -10,6 +10,5 @@ from .config_source import ConfigSource
class ConfigNamespace(ConfigSource):
"""Specifies the Config Namespace."""
- pass
# vi: ts=4 expandtab
diff --git a/cloudinit/sources/helpers/vmware/imc/config_source.py b/cloudinit/sources/helpers/vmware/imc/config_source.py
index 2f8ea546..7ec06a9c 100644
--- a/cloudinit/sources/helpers/vmware/imc/config_source.py
+++ b/cloudinit/sources/helpers/vmware/imc/config_source.py
@@ -8,6 +8,5 @@
class ConfigSource(object):
"""Specifies a source for the Config Content."""
- pass
# vi: ts=4 expandtab
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index 69e6b7e1..765f4aab 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -947,7 +947,6 @@ def _pkl_load(fname):
except Exception as e:
if os.path.isfile(fname):
LOG.warning("failed loading pickle in %s: %s", fname, e)
- pass
# This is allowed so just return nothing successfully loaded...
if not pickle_contents: