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.FlowNodeConnectorInventoryTranslatorImpl;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.onf.bundle.service.rev170124.SalBundleService;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
24 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
27 * It represent a central point for whole module. Implementation Flow Provider
28 * registers the link FlowChangeListener} and it holds all needed services for
29 * link FlowChangeListener}.
31 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
33 public interface ForwardingRulesManager extends ConfigurationListener, AutoCloseable {
38 * Method returns information : "is Node with send InstanceIdentifier
42 * - the key of the node
43 * @return boolean - true if device is connected
45 boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
48 * Method returns information : "is Node with send InstanceIdentifier present in
49 * operational data store"?.
52 * - the key of the node
53 * @return boolean - true if device is present in operational data store
55 boolean checkNodeInOperationalDataStore(InstanceIdentifier<FlowCapableNode> ident);
58 * Method returns generated transaction ID, which is unique for every
59 * transaction. ID is composite from prefix ("DOM") and unique number.
61 * @return String transactionID for RPC transaction identification
63 String getNewTransactionId();
66 * Method returns Read Transaction. It is need for Node reconciliation only.
68 * @return ReadOnlyTransaction
70 ReadOnlyTransaction getReadTranaction();
76 SalFlowService getSalFlowService();
82 SalGroupService getSalGroupService();
88 SalMeterService getSalMeterService();
94 SalTableService getSalTableService();
99 * @return salBundleService
101 SalBundleService getSalBundleService();
104 * Content definition method and prevent code duplicity in Reconcil.
106 * @return ForwardingRulesCommiter<Flow>.
108 ForwardingRulesCommiter<Flow> getFlowCommiter();
111 * Content definition method and prevent code duplicity in Reconcil.
113 * @return ForwardingRulesCommiter<Group>
115 ForwardingRulesCommiter<Group> getGroupCommiter();
118 * Content definition method and prevent code duplicity.
120 * @return ForwardingRulesCommiter<Meter>
122 ForwardingRulesCommiter<Meter> getMeterCommiter();
125 * Content definition method and prevent code duplicity.
127 * @return ForwardingRulesCommiter<Table>
129 ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
132 * Check if reconciliation is disabled by user.
134 * @return true if reconciliation is disabled, else false
136 boolean isReconciliationDisabled();
139 * Check if stale marking is enabled for switch reconciliation.
141 * @return true if stale marking is enabled, else false
143 boolean isStaleMarkingEnabled();
146 * Return number of reconciliation retry are allowed.
148 * @return number of retries.
150 int getReconciliationRetryCount();
153 * Method checks if *this* instance of openflowplugin is owner of the given
156 * @return True if owner, else false
158 boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);
161 * Content definition method and prevent code duplicity.
163 * @return FlowNodeConnectorInventoryTranslatorImpl
165 FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl();
168 * holds the value read from the configuration file openflowplugin.cfg file.
170 * @return True if user enables bundle-based-reconciliation-enabled field in
171 * config file or False
173 boolean isBundleBasedReconciliationEnabled();