2 * Copyright (c) 2014 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.applications.frm.impl.FlowNodeConnectorInventoryTranslatorImpl;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalFlowService;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.openflowplugin.app.forwardingrules.manager.config.rev160511.ForwardingRulesManagerConfig;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
23 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
26 * forwardingrules-manager
27 * org.opendaylight.openflowplugin.applications.frm
29 * ForwardingRulesManager
30 * It represents a central point for whole module. Implementation
31 * Flow Provider registers the link FlowChangeListener} and it holds all needed
32 * services for link FlowChangeListener}.
34 * @author <a href="mailto:vdemcak@cisco.com">Vaclav Demcak</a>
36 * Created: Aug 25, 2014
38 public interface ForwardingRulesManager extends AutoCloseable {
43 * Method returns information :
44 * "is Node with send InstanceIdentifier connected"?
46 * @param ident - the key of the node
47 * @return boolean - true if device is connected
49 boolean isNodeActive(InstanceIdentifier<FlowCapableNode> ident);
52 * Method returns information :
53 * "is Node with send InstanceIdentifier present in operational data store"?
55 * @param ident - 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 add new {@link FlowCapableNode} to active Node Holder.
62 * ActiveNodeHolder prevent unnecessary Operational/DS read for identify
63 * pre-configure and serious Configure/DS transactions.
65 * @param ident - the key of the node
67 void registrateNewNode(InstanceIdentifier<FlowCapableNode> ident);
70 * Method remove disconnected {@link FlowCapableNode} from active Node
71 * Holder. And all next flows or groups or meters will stay in Config/DS
74 * @param ident - the key of the node
76 void unregistrateNode(InstanceIdentifier<FlowCapableNode> ident);
79 * Method returns generated transaction ID, which is unique for
80 * every transaction. ID is composite from prefix ("DOM") and unique number.
82 * @return String transactionID for RPC transaction identification
84 String getNewTransactionId();
87 * Method returns Read Transacion. It is need for Node reconciliation only.
89 * @return ReadOnlyTransaction
91 ReadOnlyTransaction getReadTranaction();
98 SalFlowService getSalFlowService();
105 public SalGroupService getSalGroupService();
112 SalMeterService getSalMeterService();
119 SalTableService getSalTableService();
122 * Content definition method and prevent code duplicity in Reconcil
123 * @return ForwardingRulesCommiter<Flow>
125 ForwardingRulesCommiter<Flow> getFlowCommiter();
128 * Content definition method and prevent code duplicity in Reconcil
129 * @return ForwardingRulesCommiter<Group>
131 ForwardingRulesCommiter<Group> getGroupCommiter();
134 * Content definition method and prevent code duplicity
135 * @return ForwardingRulesCommiter<Meter>
137 ForwardingRulesCommiter<Meter> getMeterCommiter();
140 * Content definition method and prevent code duplicity
141 * @return ForwardingRulesCommiter<Table>
143 ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
146 * Content definition method
147 * @return FlowNodeReconciliation
149 FlowNodeReconciliation getFlowNodeReconciliation();
152 * Returns the config-subsystem/fallback configuration of FRM
153 * @return ForwardingRulesManagerConfig
155 ForwardingRulesManagerConfig getConfiguration();
158 * Method checks if *this* instance of openflowplugin is owner of
159 * the given openflow node.
160 * @return True if owner, else false
162 boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);
165 * Content definition method and prevent code duplicity
166 * @return FlowNodeConnectorInventoryTranslatorImpl
168 FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl();