Merge "Remove unused spring dependency and wrong version in web pom"
[controller.git] / opendaylight / networkconfiguration / neutron / src / main / java / org / opendaylight / controller / networkconfig / neutron / INeutronPortCRUD.java
1 /*\r
2  * Copyright IBM Corporation, 2013.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 package org.opendaylight.controller.networkconfig.neutron;\r
10 \r
11 import java.util.List;\r
12 \r
13 /**\r
14  * This interface defines the methods for CRUD of NB Port objects\r
15  *\r
16  */\r
17 \r
18 public interface INeutronPortCRUD {\r
19     /**\r
20      * Applications call this interface method to determine if a particular\r
21      * Port object exists\r
22      *\r
23      * @param uuid\r
24      *            UUID of the Port object\r
25      * @return boolean\r
26      */\r
27 \r
28     public boolean portExists(String uuid);\r
29 \r
30     /**\r
31      * Applications call this interface method to return if a particular\r
32      * Port object exists\r
33      *\r
34      * @param uuid\r
35      *            UUID of the Port object\r
36      * @return {@link org.opendaylight.controller.networkconfig.neutron.NeutronPort.OpenStackPorts}\r
37      *          OpenStack Port class\r
38      */\r
39 \r
40     public NeutronPort getPort(String uuid);\r
41 \r
42     /**\r
43      * Applications call this interface method to return all Port objects\r
44      *\r
45      * @return List of OpenStackPorts objects\r
46      */\r
47 \r
48     public List<NeutronPort> getAllPorts();\r
49 \r
50     /**\r
51      * Applications call this interface method to add a Port object to the\r
52      * concurrent map\r
53      *\r
54      * @param input\r
55      *            OpenStackPort object\r
56      * @return boolean on whether the object was added or not\r
57      */\r
58 \r
59     public boolean addPort(NeutronPort input);\r
60 \r
61     /**\r
62      * Applications call this interface method to remove a Port object to the\r
63      * concurrent map\r
64      *\r
65      * @param uuid\r
66      *            identifier for the Port object\r
67      * @return boolean on whether the object was removed or not\r
68      */\r
69 \r
70     public boolean removePort(String uuid);\r
71 \r
72     /**\r
73      * Applications call this interface method to edit a Port object\r
74      *\r
75      * @param uuid\r
76      *            identifier of the Port object\r
77      * @param delta\r
78      *            OpenStackPort object containing changes to apply\r
79      * @return boolean on whether the object was updated or not\r
80      */\r
81 \r
82     public boolean updatePort(String uuid, NeutronPort delta);\r
83 \r
84     /**\r
85      * Applications call this interface method to see if a MAC address is in use\r
86      *\r
87      * @param macAddress\r
88      *            mac Address to be tested\r
89      * @return boolean on whether the macAddress is already associated with a\r
90      * port or not\r
91      */\r
92 \r
93     public boolean macInUse(String macAddress);\r
94 \r
95     /**\r
96      * Applications call this interface method to retrieve the port associated with\r
97      * the gateway address of a subnet\r
98      *\r
99      * @param subnetUUID\r
100      *            identifier of the subnet\r
101      * @return OpenStackPorts object if the port exists and null if it does not\r
102      */\r
103 \r
104     public NeutronPort getGatewayPort(String subnetUUID);\r
105 }\r