summaryrefslogtreecommitdiff
path: root/cloudinit/net
diff options
context:
space:
mode:
authorJoshua Powers <josh.powers@canonical.com>2020-06-10 07:39:29 -0700
committerGitHub <noreply@github.com>2020-06-10 10:39:29 -0400
commitf3bd42659efeed4b092ffcdfd5df7f24813f2d3e (patch)
tree09e39d069dd98e19781859e17a03773b7cefff7f /cloudinit/net
parentf083050478adc199648c980991f2bcece79ed31b (diff)
downloadvyos-cloud-init-f3bd42659efeed4b092ffcdfd5df7f24813f2d3e.tar.gz
vyos-cloud-init-f3bd42659efeed4b092ffcdfd5df7f24813f2d3e.zip
test: fix all flake8 E126 errors (#425)
Diffstat (limited to 'cloudinit/net')
-rw-r--r--cloudinit/net/__init__.py5
-rw-r--r--cloudinit/net/bsd.py5
-rw-r--r--cloudinit/net/netbsd.py5
-rw-r--r--cloudinit/net/openbsd.py5
-rw-r--r--cloudinit/net/sysconfig.py2
5 files changed, 13 insertions, 9 deletions
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index a57fea0a..b40cb154 100644
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -849,8 +849,9 @@ def get_interfaces_by_mac_on_freebsd():
def get_interfaces_by_mac_on_netbsd():
ret = {}
re_field_match = (
- r"(?P<ifname>\w+).*address:\s"
- r"(?P<mac>([\da-f]{2}[:-]){5}([\da-f]{2})).*")
+ r"(?P<ifname>\w+).*address:\s"
+ r"(?P<mac>([\da-f]{2}[:-]){5}([\da-f]{2})).*"
+ )
(out, _) = subp.subp(['ifconfig', '-a'])
if_lines = re.sub(r'\n\s+', ' ', out).splitlines()
for line in if_lines:
diff --git a/cloudinit/net/bsd.py b/cloudinit/net/bsd.py
index 1c355a98..e34e0454 100644
--- a/cloudinit/net/bsd.py
+++ b/cloudinit/net/bsd.py
@@ -66,8 +66,9 @@ class BSDRenderer(renderer.Renderer):
if subnet.get('type') == 'static':
if not subnet.get('netmask'):
LOG.debug(
- 'Skipping IP %s, because there is no netmask',
- subnet.get('address'))
+ 'Skipping IP %s, because there is no netmask',
+ subnet.get('address')
+ )
continue
LOG.debug('Configuring dev %s with %s / %s', device_name,
subnet.get('address'), subnet.get('netmask'))
diff --git a/cloudinit/net/netbsd.py b/cloudinit/net/netbsd.py
index 30437b5f..71b38ee6 100644
--- a/cloudinit/net/netbsd.py
+++ b/cloudinit/net/netbsd.py
@@ -17,8 +17,9 @@ class Renderer(cloudinit.net.bsd.BSDRenderer):
if self.dhcp_interfaces():
self.set_rc_config_value('dhcpcd', 'YES')
self.set_rc_config_value(
- 'dhcpcd_flags',
- ' '.join(self.dhcp_interfaces()))
+ 'dhcpcd_flags',
+ ' '.join(self.dhcp_interfaces())
+ )
for device_name, v in self.interface_configurations.items():
if isinstance(v, dict):
self.set_rc_config_value(
diff --git a/cloudinit/net/openbsd.py b/cloudinit/net/openbsd.py
index 489ea48b..166d77e6 100644
--- a/cloudinit/net/openbsd.py
+++ b/cloudinit/net/openbsd.py
@@ -19,8 +19,9 @@ class Renderer(cloudinit.net.bsd.BSDRenderer):
elif isinstance(v, dict):
try:
content = "inet {address} {netmask}\n".format(
- address=v['address'],
- netmask=v['netmask'])
+ address=v['address'],
+ netmask=v['netmask']
+ )
except KeyError:
LOG.error(
"Invalid static configuration for %s",
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index f36c300f..0a5d481d 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -505,7 +505,7 @@ class Renderer(renderer.Renderer):
iface_cfg['IPADDR6_%d' % ipv6_index] = ipv6_cidr
else:
iface_cfg['IPV6ADDR_SECONDARIES'] += \
- " " + ipv6_cidr
+ " " + ipv6_cidr
else:
ipv4_index = ipv4_index + 1
suff = "" if ipv4_index == 0 else str(ipv4_index)