Fix pep8 violations in Topology
[integration/test.git] / test / tools / Robot_Tool / libraries / Topology.py
index aa8708a35ec621de052195cbb71248329871253c..131dc667f4dd85298a0345c40794c2414dc644b6 100644 (file)
@@ -3,27 +3,30 @@ Library for the robot based system test tool of the OpenDaylight project.
 Authors: Baohua Yang@IBM, Denghui Huang@IBM
 Updated: 2013-11-10
 """
-import string
-import robot
 from robot.libraries.BuiltIn import BuiltIn
 
+
 class Topology(object):
     '''
     Topology class provide topology database and provide many method to get property of topology.
     '''
-    topo_nodes_db=[[],
-            [{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:01'}],
-            [{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:01'},{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:02'},{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:03'}]]
+    topo_nodes_db = [
+        [],
+        [{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:01'}],
+        [{u'type': u'OF', u'id': u'00:00:00:00:00:00:00:01'},
+         {u'type': u'OF', u'id': u'00:00:00:00:00:00:00:02'},
+         {u'type': u'OF', u'id': u'00:00:00:00:00:00:00:03'}]]
+
     def __init__(self):
         self.builtin = BuiltIn()
 
-    def get_nodes_from_topology(self,topo_level):
+    def get_nodes_from_topology(self, topo_level):
         '''
         get nodes from topology database by topology tree level
         '''
         if isinstance(topo_level, str) or isinstance(topo_level, unicode):
             if topo_level.isdigit():
-                topo_level=int(topo_level)
+                topo_level = int(topo_level)
                 if topo_level <= 0:
                     return None
                 return self.topo_nodes_db[topo_level]