Exemplo n.º 1
0
 /**
  * Maps the virtual connect point to a physical connect point.
  *
  * @param networkId network identifier
  * @param virtualCp virtual connect point
  * @return physical connect point
  */
 private ConnectPoint mapVirtualToPhysicalPort(NetworkId networkId, ConnectPoint virtualCp) {
   Set<VirtualPort> ports = store.getPorts(networkId, virtualCp.deviceId());
   for (VirtualPort port : ports) {
     if (port.number().equals(virtualCp.port())) {
       return new ConnectPoint(port.realizedBy().element().id(), port.realizedBy().number());
     }
   }
   return null;
 }
Exemplo n.º 2
0
 @Override
 public Set<VirtualPort> getVirtualPorts(NetworkId networkId, DeviceId deviceId) {
   checkNotNull(networkId, NETWORK_NULL);
   return store.getPorts(networkId, deviceId);
 }