summaryrefslogtreecommitdiff
path: root/cloudinit/net/sysconfig.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-06-15 16:15:28 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-06-15 16:15:28 -0700
commita454a6408b3c7ecc816073049d060632191099bb (patch)
tree87e3a05675a8951bb52838cfe530a70994863c69 /cloudinit/net/sysconfig.py
parent459de83024b41c32823b75cf483da994fb1388b7 (diff)
downloadvyos-cloud-init-a454a6408b3c7ecc816073049d060632191099bb.tar.gz
vyos-cloud-init-a454a6408b3c7ecc816073049d060632191099bb.zip
Fix line length issues
Diffstat (limited to 'cloudinit/net/sysconfig.py')
-rw-r--r--cloudinit/net/sysconfig.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
index dd005796..c53acf71 100644
--- a/cloudinit/net/sysconfig.py
+++ b/cloudinit/net/sysconfig.py
@@ -20,8 +20,6 @@ import six
from cloudinit.distros.parsers import resolv_conf
from cloudinit import util
-from .udev import generate_udev_rule
-
from . import renderer
@@ -287,7 +285,8 @@ class Renderer(renderer.Renderer):
@classmethod
def _render_physical_interfaces(cls, network_state, iface_contents):
- for iface in network_state.iter_interfaces(renderer.filter_by_physical):
+ physical_filter = renderer.filter_by_physical
+ for iface in network_state.iter_interfaces(physical_filter):
iface_name = iface['name']
iface_subnets = iface.get("subnets", [])
iface_cfg = iface_contents[iface_name]
@@ -304,7 +303,8 @@ class Renderer(renderer.Renderer):
@classmethod
def _render_bond_interfaces(cls, network_state, iface_contents):
- for iface in network_state.iter_interfaces(renderer.filter_by_type('bond')):
+ bond_filter = renderer.filter_by_type('bond')
+ for iface in network_state.iter_interfaces(bond_filter):
iface_name = iface['name']
iface_cfg = iface_contents[iface_name]
cls._render_bonding_opts(iface_cfg, iface)
@@ -322,7 +322,8 @@ class Renderer(renderer.Renderer):
@staticmethod
def _render_vlan_interfaces(network_state, iface_contents):
- for iface in network_state.iter_interfaces(renderer.filter_by_type('vlan')):
+ vlan_filter = renderer.filter_by_type('vlan')
+ for iface in network_state.iter_interfaces(vlan_filter):
iface_name = iface['name']
iface_cfg = iface_contents[iface_name]
iface_cfg['VLAN'] = True
@@ -341,7 +342,8 @@ class Renderer(renderer.Renderer):
@classmethod
def _render_bridge_interfaces(cls, network_state, iface_contents):
- for iface in network_state.iter_interfaces(renderer.filter_by_type('bridge')):
+ bridge_filter = renderer.filter_by_type('bridge')
+ for iface in network_state.iter_interfaces(bridge_filter):
iface_name = iface['name']
iface_cfg = iface_contents[iface_name]
iface_cfg.kind = 'bridge'