2 * Copyright (c) 2016 Cisco Systems 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.unimgr.mef.nrp.api;
10 import org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.GFcPort;
11 import org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.objectclasses.rev160413.GForwardingConstruct;
14 * Interface of a driver that maps NRP concepts to the configuration of underlying infrastructure.
15 * The driver is used in following scenario
17 * <li>Driver is initialized. Otherwise stop</li>
18 * <li>Driver is attached to transaction</li>
19 * <li>Driver activate/deactivate method gets called</li>
20 * <li>If all drivers within transaction succeed commit method is called. Otherwise rollback is triggered</li>
23 * @author bartosz.michalik@amartus.com
25 public interface ActivationDriver {
28 * Called in case all drivers in the transaction has succeeded.
33 * Called in case any of drivers in the transaction has failed.
38 * Set state for the driver for a (de)activation transaction.
39 * @param from near end
41 * @param context context
43 void initialize(GFcPort from, GFcPort to, GForwardingConstruct context);
46 * Performs the activation action.
51 * Performs the deactivation action.
57 * Influences the order in which drivers are called within the transaction.
58 * @return int priority of this driver when resoving ambiguity