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.openflowplugin.applications.frm.impl.ForwardingRulesManagerConfig;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures;
14 import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
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.table.service.rev131026.SalTableService;
23 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
26 * forwardingrules-manager
27 * org.opendaylight.openflowplugin.applications.frm
29 * ForwardingRulesManager
30 * It represent a central point for whole modul. 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 public 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 public 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 public 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 public 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 public String getNewTransactionId();
87 * Method returns Read Transacion. It is need for Node reconciliation only.
89 * @return ReadOnlyTransaction
91 public ReadOnlyTransaction getReadTranaction();
98 public SalFlowService getSalFlowService();
105 public SalGroupService getSalGroupService();
112 public SalMeterService getSalMeterService();
119 public SalTableService getSalTableService();
122 * Content definition method and prevent code duplicity in Reconcil
123 * @return ForwardingRulesCommiter<Flow>
125 public ForwardingRulesCommiter<Flow> getFlowCommiter();
128 * Content definition method and prevent code duplicity in Reconcil
129 * @return ForwardingRulesCommiter<Group>
131 public ForwardingRulesCommiter<Group> getGroupCommiter();
134 * Content definition method and prevent code duplicity
135 * @return ForwardingRulesCommiter<Meter>
137 public ForwardingRulesCommiter<Meter> getMeterCommiter();
140 * Content definition method and prevent code duplicity
141 * @return ForwardingRulesCommiter<Table>
143 public ForwardingRulesCommiter<TableFeatures> getTableFeaturesCommiter();
146 * Content definition method
147 * @return FlowNodeReconciliation
149 public FlowNodeReconciliation getFlowNodeReconciliation();
152 * Returns the config-subsystem/fallback configuration of FRM
153 * @return ForwardingRulesManagerConfig
155 public 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 public boolean isNodeOwner(InstanceIdentifier<FlowCapableNode> ident);