2 * Copyright (c) 2017 Red Hat, 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
8 package org.opendaylight.netvirt.natservice.api;
10 import java.math.BigInteger;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ext.routers.Routers;
14 public interface SnatServiceListener {
17 * Adds/removes snat flows for all dpns having ports on the router subnet.
18 * @param routers the router.
19 * @param primarySwitchId the primaryswitchId
20 * @param addOrRemove add or remove the flow.
21 * @return returns success/failure.
23 boolean handleSnatAllSwitch(Routers routers, BigInteger primarySwitchId, int addOrRemove);
26 * Adds/removes snat flows for the dpnId.
27 * @param routers the router.
28 * @param primarySwitchId the primaryswitchId.
29 * @param dpnId the dpnId for which the flows needs to be added/removed.
30 * @param addOrRemove add or remove the flow.
31 * @return returns success/failure.
33 boolean handleSnat(Routers routers, BigInteger primarySwitchId, BigInteger dpnId, int addOrRemove);