propagate datastore exceptions all the way to northbound
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / INeutronTapFlowCRUD.java
index 73d085cc1ee580313cc35811e4ac020dfcba4631..a6c524a78dac6b6e52024a9e357e0f026e4b7cc1 100644 (file)
@@ -7,6 +7,10 @@
  */
 package org.opendaylight.neutron.spi;
 
+import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.yangtools.yang.common.OperationFailedException;
+
 /**
  * This interface defines the methods for CRUD of NB OpenStack Tap Flow objects.
  */
@@ -20,9 +24,10 @@ public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
      * @param tapFlowUUID
      *            UUID of Tap Flow
      * @return boolean on whether the object was added or not
+     * @throws ReadFailedException if the read failed
      */
 
-    boolean tapFlowExists(String tapServiceUUID, String tapFlowUUID);
+    boolean tapFlowExists(String tapServiceUUID, String tapFlowUUID) throws ReadFailedException;
 
     /**
      * Applications call this interface method to get a NeutronTapFlow object.
@@ -32,9 +37,9 @@ public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
      * @param tapFlowUUID
      *            UUID of Tap Flow
      * @return NeutronTapFlow object
+     * @throws ReadFailedException if the read failed
      */
-
-    NeutronTapFlow getTapFlow(String tapServiceUUID, String tapFlowUUID);
+    NeutronTapFlow getTapFlow(String tapServiceUUID, String tapFlowUUID) throws ReadFailedException;
 
     /**
      * Applications call this interface method to add a NeutronTapFlow object to the
@@ -43,9 +48,9 @@ public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
      * @param input
      *            OpenStackNetwork object
      * @return boolean on whether the object was added or not
+     * @throws OperationFailedException if the read or write failed
      */
-
-    boolean addTapFlow(NeutronTapFlow input);
+    boolean addTapFlow(NeutronTapFlow input) throws ReadFailedException, OperationFailedException;
 
     /**
      * Applications call this interface method to update a NeutronTapFlow object to the
@@ -53,10 +58,9 @@ public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
      *
      * @param input
      *            OpenStackNetwork object
-     * @return boolean on whether the object was added or not
+     * @throws TransactionCommitFailedException if the write failed
      */
-
-    boolean updateTapFlow(NeutronTapFlow input);
+    void updateTapFlow(NeutronTapFlow input) throws TransactionCommitFailedException;
 
     /**
      * Applications call this interface method to delete a NeutronTapFlow object.
@@ -65,8 +69,7 @@ public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
      *            UUID of Tap Service
      * @param tapFlowUUID
      *            UUID of Tap Flow
-     * @return boolean on whether the object was added or not
+     * @throws TransactionCommitFailedException if the write failed
      */
-
-    boolean deleteTapFlow(String tapServiceUUID, String tapFlowUUID);
+    void deleteTapFlow(String tapServiceUUID, String tapFlowUUID) throws TransactionCommitFailedException;
 }