blob: daf37ce491623aedd1c6a3111c04cf3fadaebfb2 [file] [log] [blame]
Jian Liecae4382018-06-28 17:41:12 +09001/*
2 * Copyright 2018-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.openstacknetworking.api;
17
18import org.onosproject.store.Store;
19
20import java.util.Set;
21
22/**
23 * Manages inventory of instance port; not intended for direct use.
24 */
25public interface InstancePortStore
26 extends Store<InstancePortEvent, InstancePortStoreDelegate> {
27
28 /**
29 * Creates a new instance port.
30 *
31 * @param port a new instance port
32 */
33 void createInstancePort(InstancePort port);
34
35 /**
36 * Updates the existing instance port.
37 *
38 * @param port the existing instance port
39 */
40 void updateInstancePort(InstancePort port);
41
42 /**
43 * Removes the existing instance port.
44 *
45 * @param portId instance port identifier
46 * @return the removed instance port
47 */
48 InstancePort removeInstancePort(String portId);
49
50 /**
51 * Obtains the existing instance port.
52 *
53 * @param portId instance port identifier
54 * @return queried instance port
55 */
56 InstancePort instancePort(String portId);
57
58 /**
59 * Obtains a collection of all of instance ports.
60 *
61 * @return a collection of all of instance ports
62 */
63 Set<InstancePort> instancePorts();
64
65 /**
66 * Removes all instance ports.
67 */
68 void clear();
69}