Fix pep8 violations in csit/libraries/Topology.py
authorThanh Ha <thanh.ha@linuxfoundation.org>
Sun, 15 Mar 2015 21:11:28 +0000 (17:11 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Mon, 16 Mar 2015 01:04:08 +0000 (21:04 -0400)
Change-Id: I5b1367067f57422f771c252d404ccd76eff3804d
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
test/csit/libraries/Topology.py

index aa8708a35ec621de052195cbb71248329871253c..11a5c71fecc1e7252e534654337afabea56885fb 100644 (file)
@@ -3,27 +3,31 @@ 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]