Merge "Factor common code"
[netvirt.git] / openstack / net-virt / src / main / java / org / opendaylight / ovsdb / openstack / netvirt / translator / crud / INeutronNetworkCRUD.java
1 /*
2  * Copyright (c) 2013, 2015 IBM Corporation and others.  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
9 package org.opendaylight.ovsdb.openstack.netvirt.translator.crud;
10
11 import java.util.List;
12
13 import org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronNetwork;
14
15 /**
16  * This interface defines the methods for CRUD of NB network objects
17  *
18  */
19
20 public interface INeutronNetworkCRUD {
21     /**
22      * Applications call this interface method to determine if a particular
23      * Network object exists
24      *
25      * @param uuid
26      *            UUID of the Network object
27      * @return boolean
28      */
29
30     boolean networkExists(String uuid);
31
32     /**
33      * Applications call this interface method to return if a particular
34      * Network object exists
35      *
36      * @param uuid
37      *            UUID of the Network object
38      * @return {@link org.opendaylight.ovsdb.openstack.netvirt.translator.NeutronNetwork}
39      *          OpenStack Network class
40      */
41
42     NeutronNetwork getNetwork(String uuid);
43
44     /**
45      * Applications call this interface method to return all Network objects
46      *
47      * @return List of OpenStackNetworks objects
48      */
49
50     List<NeutronNetwork> getAllNetworks();
51
52     /**
53      * Applications call this interface method to add a Network object to the
54      * concurrent map
55      *
56      * @param input
57      *            OpenStackNetwork object
58      * @return boolean on whether the object was added or not
59      */
60
61     boolean addNetwork(NeutronNetwork input);
62
63     /**
64      * Applications call this interface method to remove a Network object to the
65      * concurrent map
66      *
67      * @param uuid
68      *            identifier for the network object
69      * @return boolean on whether the object was removed or not
70      */
71
72     boolean removeNetwork(String uuid);
73
74     /**
75      * Applications call this interface method to edit a Network object
76      *
77      * @param uuid
78      *            identifier of the network object
79      * @param delta
80      *            OpenStackNetwork object containing changes to apply
81      * @return boolean on whether the object was updated or not
82      */
83
84     boolean updateNetwork(String uuid, NeutronNetwork delta);
85
86     /**
87      * Applications call this interface method to determine if a Network object
88      * is use
89      *
90      * @param netUUID
91      *            identifier of the network object
92      *
93      * @return boolean on whether the network is in use or not
94      */
95
96     boolean networkInUse(String netUUID);
97 }