2 * Copyright (c) 2014, 2017 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.openflowplugin.applications.frm;
10 import org.opendaylight.mdsal.binding.api.ReadTransaction;
11 import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationListener;
12 import org.opendaylight.openflowplugin.applications.frm.impl.DevicesGroupRegistry;
13 import org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeConnectorInventoryTranslatorImpl;
14 import org.opendaylight.serviceutils.srm.RecoverableListener;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.arbitrator.reconcile.service.rev180227.ArbitratorReconcileService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
26 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
29 * It represent a central point for whole module. Implementation Flow Provider
30 * registers the link FlowChangeListener} and it holds all needed services for
31 * link FlowChangeListener}.
33 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
35 public interface ForwardingRulesManager extends ConfigurationListener, AutoCloseable {
40 * Method returns information : "is Node with send InstanceIdentifier
44 * - the key of the node
45 * @return boolean - true if device is connected
47 boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
50 * Method returns information : "is Node with send InstanceIdentifier present in
51 * operational data store"?.
54 * - the key of the node
55 * @return boolean - true if device is present in operational data store
57 boolean checkNodeInOperationalDataStore(InstanceIdentifier<FlowCapableNode> ident);
60 * Method returns generated transaction ID, which is unique for every
61 * transaction. ID is composite from prefix ("DOM") and unique number.
63 * @return String transactionID for RPC transaction identification
65 String getNewTransactionId();
68 * Method returns Read Transaction. It is need for Node reconciliation only.
70 * @return ReadOnlyTransaction
72 ReadTransaction getReadTransaction();
78 SalFlowService getSalFlowService();
84 SalGroupService getSalGroupService();
90 SalMeterService getSalMeterService();
96 SalTableService getSalTableService();
99 * Return Devices Group Registry which can be used to track the groups present in a device.
101 * @return devicesGroupRegistry
103 DevicesGroupRegistry getDevicesGroupRegistry();
106 * Bundle RPC service.
108 * @return salBundleService
110 SalBundleService getSalBundleService();
113 * Content definition method and prevent code duplicity in Reconcil.
115 * @return ForwardingRulesCommiter<Flow>.
117 ForwardingRulesCommiter<Flow> getFlowCommiter();
120 * Content definition method and prevent code duplicity in Reconcil.
122 * @return ForwardingRulesCommiter<Group>
124 ForwardingRulesCommiter<Group> getGroupCommiter();
127 * Content definition method and prevent code duplicity.
129 * @return ForwardingRulesCommiter<Meter>
131 ForwardingRulesCommiter<Meter> getMeterCommiter();
134 * Content definition method and prevent code duplicity.
136 * @return ForwardingRulesCommiter<Table>
138 ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
141 * Return BundleFlowListener instance.
143 * @return BundleFlowListener
145 BundleMessagesCommiter<Flow> getBundleFlowListener();
148 * Return BundleGroupListener instance.
150 * @return BundleGroupListener
152 BundleMessagesCommiter<Group> getBundleGroupListener();
155 * Check if reconciliation is disabled by user.
157 * @return true if reconciliation is disabled, else false
159 boolean isReconciliationDisabled();
162 * Check if stale marking is enabled for switch reconciliation.
164 * @return true if stale marking is enabled, else false
166 boolean isStaleMarkingEnabled();
169 * Return number of reconciliation retry are allowed.
171 * @return number of retries.
173 int getReconciliationRetryCount();
176 * Method checks if *this* instance of openflowplugin is owner of the given
179 * @return True if owner, else false
181 boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);
184 * Content definition method and prevent code duplicity.
186 * @return FlowNodeConnectorInventoryTranslatorImpl
188 FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl();
191 * holds the value read from the configuration file openflowplugin.cfg file.
193 * @return True if user enables bundle-based-reconciliation-enabled field in
194 * config file or False
196 boolean isBundleBasedReconciliationEnabled();
199 * Return the NodeConfigurator which could be used to serialize jobs.
201 * @return modeConfigurator.
203 NodeConfigurator getNodeConfigurator();
206 * Method for register RecoverableListener.
209 void addRecoverableListener(RecoverableListener recoverableListener);
212 * Method exposes the ArbitratorReconciliationManager service used for performing Arbitrator Based Reconciliation.
213 * @return ArbitratorReconciliationManager
215 ArbitratorReconcileService getArbitratorReconciliationManager();