Exemplo n.º 1
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)
Exemplo n.º 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)
Exemplo n.º 3
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
Exemplo n.º 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