X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=applications%2Fforwardingrules-manager%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fapplications%2Ffrm%2FForwardingRulesManager.java;h=2bfd84037f68d551544128968f062b404525d74a;hb=refs%2Fchanges%2F66%2F59166%2F14;hp=c6b63d1d4886b039a38915c7556edae2ed8fb129;hpb=d14c5cc2b631b557ba3f5db6180b8eb1bc205944;p=openflowplugin.git diff --git a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ForwardingRulesManager.java b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ForwardingRulesManager.java index c6b63d1d48..2bfd84037f 100644 --- a/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ForwardingRulesManager.java +++ b/applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/ForwardingRulesManager.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * Copyright (c) 2014, 2017 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, @@ -9,6 +9,8 @@ package org.opendaylight.openflowplugin.applications.frm; import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction; +import org.opendaylight.openflowplugin.api.openflow.configuration.ConfigurationListener; +import org.opendaylight.openflowplugin.applications.frm.impl.FlowNodeConnectorInventoryTranslatorImpl; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.meters.Meter; import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.tables.table.Flow; @@ -16,51 +18,38 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.service.rev130819.SalF import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.SalGroupService; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.types.rev131018.groups.Group; import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.service.rev130918.SalMeterService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.table.service.rev131026.SalTableService; +import org.opendaylight.yang.gen.v1.urn.opendaylight.table.types.rev131026.table.features.TableFeatures; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * forwardingrules-manager - * org.opendaylight.openflowplugin.applications.frm - * - * ForwardingRulesManager - * It represent a central point for whole modul. Implementation + * It represent a central point for whole module. Implementation * Flow Provider registers the link FlowChangeListener} and it holds all needed * services for link FlowChangeListener}. * * @author Vaclav Demcak - * - * Created: Aug 25, 2014 */ -public interface ForwardingRulesManager extends AutoCloseable { +public interface ForwardingRulesManager extends ConfigurationListener, AutoCloseable { - public void start(); + void start(); /** * Method returns information : * "is Node with send InstanceIdentifier connected"? * - * @param InstanceIdentifier ident - the key of the node - * @return boolean - is device connected - */ - public boolean isNodeActive(InstanceIdentifier ident); - - /** - * Method add new {@link FlowCapableNode} to active Node Holder. - * ActiveNodeHolder prevent unnecessary Operational/DS read for identify - * pre-configure and serious Configure/DS transactions. - * - * @param InstanceIdentifier ident - the key of the node + * @param ident - the key of the node + * @return boolean - true if device is connected */ - public void registrateNewNode(InstanceIdentifier ident); + boolean isNodeActive(InstanceIdentifier ident); /** - * Method remove disconnected {@link FlowCapableNode} from active Node - * Holder. And all next flows or groups or meters will stay in Config/DS - * only. + * Method returns information : + * "is Node with send InstanceIdentifier present in operational data store"? * - * @param InstanceIdentifier ident - the key of the node + * @param ident - the key of the node + * @return boolean - true if device is present in operational data store */ - public void unregistrateNode(InstanceIdentifier ident); + boolean checkNodeInOperationalDataStore(InstanceIdentifier ident); /** * Method returns generated transaction ID, which is unique for @@ -68,58 +57,97 @@ public interface ForwardingRulesManager extends AutoCloseable { * * @return String transactionID for RPC transaction identification */ - public String getNewTransactionId(); + String getNewTransactionId(); /** * Method returns Read Transacion. It is need for Node reconciliation only. * * @return ReadOnlyTransaction */ - public ReadOnlyTransaction getReadTranaction(); + ReadOnlyTransaction getReadTranaction(); /** * Flow RPC service * * @return */ - public SalFlowService getSalFlowService(); + SalFlowService getSalFlowService(); /** * Group RPC service * * @return */ - public SalGroupService getSalGroupService(); + SalGroupService getSalGroupService(); /** * Meter RPC service * * @return */ - public SalMeterService getSalMeterService(); + SalMeterService getSalMeterService(); + + /** + * Table RPC service + * + * @return + */ + SalTableService getSalTableService(); /** * Content definition method and prevent code duplicity in Reconcil - * @return ForwardingRulesCommiter + * @return ForwardingRulesCommiter<Flow> */ - public ForwardingRulesCommiter getFlowCommiter(); + ForwardingRulesCommiter getFlowCommiter(); /** * Content definition method and prevent code duplicity in Reconcil - * @return ForwardingRulesCommiter + * @return ForwardingRulesCommiter<Group> + */ + ForwardingRulesCommiter getGroupCommiter(); + + /** + * Content definition method and prevent code duplicity + * @return ForwardingRulesCommiter<Meter> */ - public ForwardingRulesCommiter getGroupCommiter(); + ForwardingRulesCommiter getMeterCommiter(); /** * Content definition method and prevent code duplicity - * @return ForwardingRulesCommiter + * @return ForwardingRulesCommiter<Table> + */ + ForwardingRulesCommiter getTableFeaturesCommiter(); + + /** + * Check if reconciliation is disabled by user. + * @return true if reconciliation is disabled, else false */ - public ForwardingRulesCommiter getMeterCommiter(); + boolean isReconciliationDisabled(); /** - * Content definition method - * @return FlowNodeReconciliation + * Check if stale marking is enabled for switch reconciliation. + * @return true if stale marking is enabled, else false */ - public FlowNodeReconciliation getFlowNodeReconciliation(); + boolean isStaleMarkingEnabled(); + + /** + * Return number of reconciliation retry are allowed. + * @return number of retries. + */ + int getReconciliationRetryCount(); + + /** + * Method checks if *this* instance of openflowplugin is owner of + * the given openflow node. + * @return True if owner, else false + */ + boolean isNodeOwner(InstanceIdentifier ident); + + /** + * Content definition method and prevent code duplicity + * @return FlowNodeConnectorInventoryTranslatorImpl + */ + FlowNodeConnectorInventoryTranslatorImpl getFlowNodeConnectorInventoryTranslatorImpl(); + }