2 * Copyright (c) 2017 Ericsson Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.netvirt.sfc.classifier.service.domain.impl;
11 import org.opendaylight.netvirt.sfc.classifier.providers.GeniusProvider;
12 import org.opendaylight.netvirt.sfc.classifier.service.domain.api.ClassifierEntryRenderer;
13 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.ace.Matches;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.InterfaceKey;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
17 public class GeniusRenderer implements ClassifierEntryRenderer {
19 private final GeniusProvider geniusProvider;
21 public GeniusRenderer(GeniusProvider geniusProvider) {
22 this.geniusProvider = geniusProvider;
26 public void renderIngress(InterfaceKey interfaceKey) {
27 geniusProvider.bindPortOnIngressClassifier(interfaceKey.getName());
31 public void renderNode(NodeId nodeId) {
36 public void renderPath(NodeId nodeId, Long nsp, short nsi, short nsl, String firstHopIp) {
41 public void renderMatch(NodeId nodeId, String connector, Matches matches, Long nsp, Short nsi) {
46 public void renderEgress(InterfaceKey interfaceKey, String destinationIp) {
47 geniusProvider.bindPortOnEgressClassifier(interfaceKey.getName(), destinationIp);
51 public void suppressIngress(InterfaceKey interfaceKey) {
52 geniusProvider.unbindPortOnIngressClassifier(interfaceKey.getName());
56 public void suppressNode(NodeId nodeId) {
61 public void suppressPath(NodeId nodeId, Long nsp, short nsi, short nsl, String firstHopIp) {
66 public void suppressMatch(NodeId nodeId, String connector, Matches matches, Long nsp, Short nsi) {
71 public void suppressEgress(InterfaceKey interfaceKey, String destinationIp) {
72 geniusProvider.unbindPortOnEgressClassifier(interfaceKey.getName());