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
9 package org.opendaylight.openflowplugin.applications.frm;
11 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
12 import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationListener;
13 import org.opendaylight.openflowplugin.applications.frm.impl.DevicesGroupRegistry;
14 import org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeConnectorInventoryTranslatorImpl;
15 import org.opendaylight.serviceutils.srm.RecoverableListener;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.arbitrator.reconcile.service.rev180227.ArbitratorReconcileService;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
27 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
30 * It represent a central point for whole module. Implementation Flow Provider
31 * registers the link FlowChangeListener} and it holds all needed services for
32 * link FlowChangeListener}.
34 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
36 public interface ForwardingRulesManager extends ConfigurationListener, AutoCloseable {
41 * Method returns information : "is Node with send InstanceIdentifier
45 * - the key of the node
46 * @return boolean - true if device is connected
48 boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
51 * Method returns information : "is Node with send InstanceIdentifier present in
52 * operational data store"?.
55 * - the key of the node
56 * @return boolean - true if device is present in operational data store
58 boolean checkNodeInOperationalDataStore(InstanceIdentifier<FlowCapableNode> ident);
61 * Method returns generated transaction ID, which is unique for every
62 * transaction. ID is composite from prefix ("DOM") and unique number.
64 * @return String transactionID for RPC transaction identification
66 String getNewTransactionId();
69 * Method returns Read Transaction. It is need for Node reconciliation only.
71 * @return ReadOnlyTransaction
73 ReadOnlyTransaction getReadTranaction();
79 SalFlowService getSalFlowService();
85 SalGroupService getSalGroupService();
91 SalMeterService getSalMeterService();
97 SalTableService getSalTableService();
100 * Return Devices Group Registry which can be used to track the groups present in a device.
102 * @return devicesGroupRegistry
104 DevicesGroupRegistry getDevicesGroupRegistry();
107 * Bundle RPC service.
109 * @return salBundleService
111 SalBundleService getSalBundleService();
114 * Content definition method and prevent code duplicity in Reconcil.
116 * @return ForwardingRulesCommiter<Flow>.
118 ForwardingRulesCommiter<Flow> getFlowCommiter();
121 * Content definition method and prevent code duplicity in Reconcil.
123 * @return ForwardingRulesCommiter<Group>
125 ForwardingRulesCommiter<Group> getGroupCommiter();
128 * Content definition method and prevent code duplicity.
130 * @return ForwardingRulesCommiter<Meter>
132 ForwardingRulesCommiter<Meter> getMeterCommiter();
135 * Content definition method and prevent code duplicity.
137 * @return ForwardingRulesCommiter<Table>
139 ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
142 * Check if reconciliation is disabled by user.
144 * @return true if reconciliation is disabled, else false
146 boolean isReconciliationDisabled();
149 * Check if stale marking is enabled for switch reconciliation.
151 * @return true if stale marking is enabled, else false
153 boolean isStaleMarkingEnabled();
156 * Return number of reconciliation retry are allowed.
158 * @return number of retries.
160 int getReconciliationRetryCount();
163 * Method checks if *this* instance of openflowplugin is owner of the given
166 * @return True if owner, else false
168 boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);
171 * Content definition method and prevent code duplicity.
173 * @return FlowNodeConnectorInventoryTranslatorImpl
175 FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl();
178 * holds the value read from the configuration file openflowplugin.cfg file.
180 * @return True if user enables bundle-based-reconciliation-enabled field in
181 * config file or False
183 boolean isBundleBasedReconciliationEnabled();
186 * Return the NodeConfigurator which could be used to serialize jobs.
188 * @return modeConfigurator.
190 NodeConfigurator getNodeConfigurator();
193 * Method for register RecoverableListener.
196 void addRecoverableListener(RecoverableListener recoverableListener);
199 * Method exposes the ArbitratorReconciliationManager service used for performing Arbitrator Based Reconciliation.
200 * @return ArbitratorReconciliationManager
202 ArbitratorReconcileService getArbitratorReconciliationManager();