OSDN Git Service

refactoring...
[ti2/ti2.git] / linkpair / formatter / graphviz_tb.py
index 076c27d..cc66ce5 100755 (executable)
@@ -2,9 +2,6 @@
 # -*- coding: utf-8 -*-
 #
 
-import sys
-import os
-import re
 from linkpair.linkpair import LinkPair
 from linkpair.device import Device
 from linkpair.port import Port
@@ -59,11 +56,11 @@ node [
 "Level_4" [color = "transparent", label="", fixedsize = true, width = 0.1, height = 0.1, fontsize=2];
 "Level_5" [color = "transparent", label="", fixedsize = true, width = 0.1, height = 0.1, fontsize=2];
 
-    '''
+'''
 
     FOOTER_FORMAT = '''
 }
-    '''
+'''
 
     def format_linkpairs(self):
         formatted_lps = []
@@ -117,12 +114,13 @@ node [
                 physical_nw = True
             elif str(lp.device1) == "INTERNAL" or str(lp.device2) == "INTERNAL":
                 internal_nw = True
-            
+
             if lp.device1.device_type == Device.VM_TYPE:
-                rank_linkpair.append('{rank = min; "Level_1"; \"' + str(lp.device1) + '\"}')
+                rank_linkpair.append(
+                    '{rank = min; "Level_1"; \"' + str(lp.device1) + '\"}')
             if lp.device2.device_type == Device.VM_TYPE:
-                rank_linkpair.append('{rank = min; "Level_1"; \"' + str(lp.device2) + '\"}')
-                
+                rank_linkpair.append(
+                    '{rank = min; "Level_1"; \"' + str(lp.device2) + '\"}')
 
         if os_routing:
             rank_linkpair.append('{rank = max; "Level_5"; "OS Routing"}')