Ubuntu Pastebin

Paste from smoser at Fri, 24 Mar 2017 18:39:50 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff --git a/.pylintrc b/.pylintrc
index 783c1bb5..41aa2d3f 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -30,7 +30,7 @@ ignored-modules=six.moves,pkg_resources
 # List of class names for which member attributes should not be checked (useful
 # for classes with dynamically set attributes). This supports the use of
 # qualified names.
-ignored-classes=optparse.Values,thread._local,_thread._local,Renderer
+ignored-classes=optparse.Values,thread._local,_thread._local
 
 # List of members which are set dynamically and missed by pylint inference
 # system, and so shouldn't trigger E1101 when accessed. Python regular
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)
Download as text