# -*- coding: utf-8 -*-
#
-import sys
-import os
-import re
from linkpair.linkpair import LinkPair
from linkpair.device import Device
from linkpair.port import Port
"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 = []
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"}')