diff options
author | Joshua Powers <josh.powers@canonical.com> | 2017-03-21 14:18:46 -0600 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-03-24 15:11:53 -0400 |
commit | 35cf3415f9748c880db4d3c004f3410c3aa2cab2 (patch) | |
tree | 0f4985af251431543e4b10aef15cf443cdc5f38a /cloudinit/net | |
parent | 2e879da890a4287dd52eab17938d227da7af253a (diff) | |
download | vyos-cloud-init-35cf3415f9748c880db4d3c004f3410c3aa2cab2.tar.gz vyos-cloud-init-35cf3415f9748c880db4d3c004f3410c3aa2cab2.zip |
test: add running of pylint
Now tox will run pylint. The .pylintrc file sets pylint to only produce
errors, and will ignore certain classes that are known problematic (six).
Diffstat (limited to 'cloudinit/net')
-rw-r--r-- | cloudinit/net/network_state.py | 5 | ||||
-rw-r--r-- | cloudinit/net/renderer.py | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py index 701aaa4e..692b6007 100644 --- a/cloudinit/net/network_state.py +++ b/cloudinit/net/network_state.py @@ -214,7 +214,7 @@ class NetworkStateInterpreter(object): return util.yaml_dumps(self._network_state) def as_dict(self): - return {'version': self.version, 'config': self.config} + return {'version': self._version, 'config': self._config} def get_network_state(self): ns = self.network_state @@ -611,7 +611,8 @@ class NetworkStateInterpreter(object): self.handle_vlan(vlan_cmd) def handle_wifis(self, command): - raise NotImplemented('NetworkState V2: Skipping wifi configuration') + raise NotImplementedError("NetworkState V2: " + "Skipping wifi configuration") def _v2_common(self, cfg): LOG.debug('v2_common: handling config:\n%s', cfg) diff --git a/cloudinit/net/renderer.py b/cloudinit/net/renderer.py index a5b2b573..c68658dc 100644 --- a/cloudinit/net/renderer.py +++ b/cloudinit/net/renderer.py @@ -5,6 +5,7 @@ # # This file is part of cloud-init. See LICENSE file for license information. +import abc import six from .network_state import parse_net_config_data @@ -37,6 +38,10 @@ class Renderer(object): iface['mac_address'])) return content.getvalue() + @abc.abstractmethod + def render_network_state(self, network_state, target=None): + """Render network state.""" + def render_network_config(self, network_config, target=None): return self.render_network_state( network_state=parse_net_config_data(network_config), target=target) |