コード例 #1
0
ファイル: invariant_checker.py プロジェクト: ZhiLiu/sts
 def compute_controller_omega(controller_snapshot, live_switches, live_links, edge_links):
   import topology_loader.topology_loader as hsa_topo
   import headerspace.applications as hsa
   name_tf_pairs = hsa_topo.tf_pairs_from_snapshot(controller_snapshot, live_switches)
   # Frenetic doesn't store any link or host information.
   # No virtualization though, so we can assume the same TTF. TODO(cs): for now...
   TTF = hsa_topo.generate_TTF(live_links)
   return hsa.compute_omega(name_tf_pairs, TTF, edge_links)
コード例 #2
0
 def compute_controller_omega(controller_snapshot, live_switches,
                              live_links, edge_links):
     import topology_loader.topology_loader as hsa_topo
     import headerspace.applications as hsa
     name_tf_pairs = hsa_topo.tf_pairs_from_snapshot(
         controller_snapshot, live_switches)
     # Frenetic doesn't store any link or host information.
     # No virtualization though, so we can assume the same TTF. TODO(cs): for now...
     TTF = hsa_topo.generate_TTF(live_links)
     return hsa.compute_omega(name_tf_pairs, TTF, edge_links)
コード例 #3
0
ファイル: invariant_checker.py プロジェクト: ZhiLiu/sts
 def compute_physical_omega(live_switches, live_links, edge_links):
   import headerspace.applications as hsa
   (name_tf_pairs, TTF) = InvariantChecker._get_transfer_functions(live_switches, live_links)
   physical_omega = hsa.compute_omega(name_tf_pairs, TTF, edge_links)
   return physical_omega
コード例 #4
0
 def compute_physical_omega(live_switches, live_links, edge_links):
     import headerspace.applications as hsa
     (name_tf_pairs, TTF) = InvariantChecker._get_transfer_functions(
         live_switches, live_links)
     physical_omega = hsa.compute_omega(name_tf_pairs, TTF, edge_links)
     return physical_omega