Refactoring of cisco-xr-driver and impl modules.
[unimgr.git] / impl / src / main / java / org / opendaylight / unimgr / mef / nrp / common / ResourceActivator.java
1 /*
2  * Copyright (c) 2016 Cisco Systems Inc and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.unimgr.mef.nrp.common;
10
11 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
12 import org.opendaylight.yang.gen.v1.urn.onf.core.network.module.rev160630.g_forwardingconstruct.FcPort;
13
14 /**
15  * Device facing SPI for activating or deactivating a fragment of an NRP
16  * ForwardingConstruct on a single device.
17  */
18 public interface ResourceActivator {
19
20     /**
21      * Activate a service fragment on the node identified by nodeName.
22      *
23      * @param nodeName
24      *            the name of node in network topology
25      * @param outerName
26      *            name of outer activation construct
27      * @param innerName
28      *            name of inner activation construct
29      * @param flowPoint
30      *            the fc-port to be activated
31      * @param neighbor
32      *            the neighbor fc-port
33      * @param mtu
34      *            the desired MTU for this forwarding construct
35      */
36     public void activate(String nodeName, String outerName, String innerName, FcPort flowPoint, FcPort neighbor,
37             long mtu) throws TransactionCommitFailedException, ResourceActivatorException;
38
39     /**
40      * Deactivate a service fragment on the node identified by nodeName.
41      *
42      * @param nodeName
43      *            the name of node in network topology
44      * @param outerName
45      *            name of outer deactivation construct
46      * @param innerName
47      *            name of inner deactivation construct
48      * @param flowPoint
49      *            the fc-port to be deactivated
50      * @param neighbor
51      *            the neighbor fc-port
52      * @param mtu
53      *            the desired MTU for this forwarding construct
54      */
55     public void deactivate(String nodeName, String outerName, String innerName, FcPort flowPoint, FcPort neighbor,
56             long mtu) throws TransactionCommitFailedException, ResourceActivatorException;
57 }