propagate datastore exceptions all the way to northbound
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / INeutronTapFlowCRUD.java
1 /*
2  * Copyright (c) 2017 Intel Corporation.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.neutron.spi;
9
10 import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
11 import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
12 import org.opendaylight.yangtools.yang.common.OperationFailedException;
13
14 /**
15  * This interface defines the methods for CRUD of NB OpenStack Tap Flow objects.
16  */
17 public interface INeutronTapFlowCRUD extends INeutronCRUD<NeutronTapFlow> {
18
19     /**
20      * Applications call this interface method to check if a NeutronTapFlow object exists.
21      *
22      * @param tapServiceUUID
23      *            UUID of Tap Service
24      * @param tapFlowUUID
25      *            UUID of Tap Flow
26      * @return boolean on whether the object was added or not
27      * @throws ReadFailedException if the read failed
28      */
29
30     boolean tapFlowExists(String tapServiceUUID, String tapFlowUUID) throws ReadFailedException;
31
32     /**
33      * Applications call this interface method to get a NeutronTapFlow object.
34      *
35      * @param tapServiceUUID
36      *            UUID of Tap Service
37      * @param tapFlowUUID
38      *            UUID of Tap Flow
39      * @return NeutronTapFlow object
40      * @throws ReadFailedException if the read failed
41      */
42     NeutronTapFlow getTapFlow(String tapServiceUUID, String tapFlowUUID) throws ReadFailedException;
43
44     /**
45      * Applications call this interface method to add a NeutronTapFlow object to the
46      * concurrent map.
47      *
48      * @param input
49      *            OpenStackNetwork object
50      * @return boolean on whether the object was added or not
51      * @throws OperationFailedException if the read or write failed
52      */
53     boolean addTapFlow(NeutronTapFlow input) throws ReadFailedException, OperationFailedException;
54
55     /**
56      * Applications call this interface method to update a NeutronTapFlow object to the
57      * concurrent map.
58      *
59      * @param input
60      *            OpenStackNetwork object
61      * @throws TransactionCommitFailedException if the write failed
62      */
63     void updateTapFlow(NeutronTapFlow input) throws TransactionCommitFailedException;
64
65     /**
66      * Applications call this interface method to delete a NeutronTapFlow object.
67      *
68      * @param tapServiceUUID
69      *            UUID of Tap Service
70      * @param tapFlowUUID
71      *            UUID of Tap Flow
72      * @throws TransactionCommitFailedException if the write failed
73      */
74     void deleteTapFlow(String tapServiceUUID, String tapFlowUUID) throws TransactionCommitFailedException;
75 }