private void removeExternalRules(OpenstackNetwork osNet, String subNetCidr) { TrafficSelector.Builder sBuilder = DefaultTrafficSelector.builder(); sBuilder .matchEthType(Ethernet.TYPE_IPV4) .matchTunnelId(Long.valueOf(osNet.segmentId())) .matchIPSrc(IpPrefix.valueOf(subNetCidr)) .matchEthDst(Constants.DEFAULT_GATEWAY_MAC); nodeService .completeNodes() .forEach( node -> { ForwardingObjective.Flag flag = node.type().equals(GATEWAY) ? ForwardingObjective.Flag.VERSATILE : ForwardingObjective.Flag.SPECIFIC; RulePopulatorUtil.removeRule( flowObjectiveService, appId, node.intBridge(), sBuilder.build(), flag, ROUTING_RULE_PRIORITY); }); }
private void populateExternalRules(OpenstackNetwork osNet, OpenstackSubnet osSubNet) { populateCnodeToGateway(Long.valueOf(osNet.segmentId()), osSubNet.cidr()); populateGatewayToController(Long.valueOf(osNet.segmentId()), osSubNet.cidr()); }