77a479ca7d477b384f3fbb947fe5fe38ac624943
[neutron.git] / neutron-spi / src / main / java / org / opendaylight / neutron / spi / INeutronLoadBalancerPoolCRUD.java
1 /*
2  * Copyright (C) 2014 Red Hat, Inc.  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 java.util.List;
11
12 /**
13  * This interface defines the methods for CRUD of NB OpenStack LoadBalancerPool objects.
14  */
15 public interface INeutronLoadBalancerPoolCRUD extends INeutronCRUD<NeutronLoadBalancerPool> {
16
17     /**
18      * Applications call this interface method to determine if a particular
19      * NeutronLoadBalancerPoolMember object exists.
20      *
21      * @param poolUuid
22      *            UUID of the NeutronLoadBalancerPool object
23      * @param uuid
24      *            UUID of the NeutronLoadBalancerPoolMember object
25      * @return boolean
26      */
27     boolean neutronLoadBalancerPoolMemberExists(String poolUuid, String uuid);
28
29     /**
30      * Applications call this interface method to return if a particular
31      * NeutronLoadBalancerPoolMember object exists.
32      *
33      * @param poolUuid
34      *            UUID of the NeutronLoadBalancerPool object
35      * @param uuid
36      *            UUID of the NeutronLoadBalancerPoolMember object
37      * @return {@link org.opendaylight.neutron.spi.NeutronLoadBalancerPoolMember}
38      *          OpenStackNeutronLoadBalancerPoolMember class
39      */
40     NeutronLoadBalancerPoolMember getNeutronLoadBalancerPoolMember(String poolUuid, String uuid);
41
42     /**
43      * Applications call this interface method to return all NeutronLoadBalancerPoolMember objects.
44      *
45      * @param poolUuid
46      *            UUID of the NeutronLoadBalancerPool object
47      * @return List of OpenStackNetworks objects
48      */
49     List<NeutronLoadBalancerPoolMember> getAllNeutronLoadBalancerPoolMembers(String poolUuid);
50
51     /**
52      * Applications call this interface method to add a NeutronLoadBalancerPoolMember object to the
53      * concurrent map.
54      *
55      * @param poolUuid
56      *            UUID of the NeutronLoadBalancerPool object
57      * @param input
58      *            OpenStackNetwork object
59      * @return boolean on whether the object was added or not
60      */
61     boolean addNeutronLoadBalancerPoolMember(String poolUuid, NeutronLoadBalancerPoolMember input);
62
63     /**
64      * Applications call this interface method to remove a Neutron NeutronLoadBalancerPoolMember object to the
65      * concurrent map.
66      *
67      * @param poolUuid
68      *            UUID of the NeutronLoadBalancerPool object
69      * @param uuid
70      *            identifier for the NeutronLoadBalancerPoolMember object
71      * @return boolean on whether the object was removed or not
72      */
73     boolean removeNeutronLoadBalancerPoolMember(String poolUuid, String uuid);
74
75     /**
76      * Applications call this interface method to edit a NeutronLoadBalancerPoolMember object.
77      *
78      * @param poolUuid
79      *            identifier of the NeutronLoadBalancerPool object
80      * @param uuid
81      *            identifier of the NeutronLoadBalancerPoolMember object
82      * @param delta
83      *            OpenStackNeutronLoadBalancerPoolMember object containing changes to apply
84      * @return boolean on whether the object was updated or not
85      */
86     boolean updateNeutronLoadBalancerPoolMember(String poolUuid, String uuid, NeutronLoadBalancerPoolMember delta);
87
88     /**
89      * Applications call this interface method to see if a MAC address is in use.
90      *
91      * @param poolUuid
92      *            identifier of the NeutronLoadBalancerPool object
93      * @param uuid
94      *            identifier of the NeutronLoadBalancerPoolMember object
95      * @return boolean on whether the macAddress is already associated with a
96      *             port or not
97      */
98     boolean neutronLoadBalancerPoolMemberInUse(String poolUuid, String uuid);
99 }