blob: f78dccf6d331b877542435990a675c837628f441 [file] [log] [blame]
Phanendra Manda50753d62015-10-28 17:44:57 +05301/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2015-present Open Networking Foundation
Phanendra Manda50753d62015-10-28 17:44:57 +05303 *
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.vtnrsc.portpairgroup;
17
Mahesh Poojary Huaweic106f452015-12-05 14:21:10 +053018import org.onosproject.event.ListenerService;
Phanendra Manda50753d62015-10-28 17:44:57 +053019import org.onosproject.vtnrsc.PortPairGroup;
20import org.onosproject.vtnrsc.PortPairGroupId;
21
22/**
23 * Service for interacting with the inventory of port pair groups.
24 */
Mahesh Poojary Huaweic106f452015-12-05 14:21:10 +053025public interface PortPairGroupService extends ListenerService<PortPairGroupEvent, PortPairGroupListener> {
Phanendra Manda50753d62015-10-28 17:44:57 +053026
27 /**
28 * Returns if the port pair group is existed.
29 *
30 * @param portPairGroupId port pair group identifier
31 * @return true or false if one with the given identifier exists.
32 */
33 boolean exists(PortPairGroupId portPairGroupId);
34
35 /**
36 * Returns the number of port pair groups known to the system.
37 *
38 * @return number of port pair groups.
39 */
40 int getPortPairGroupCount();
41
42 /**
43 * Returns an iterable collection of the currently known port pair groups.
44 *
45 * @return collection of port pair groups.
46 */
47 Iterable<PortPairGroup> getPortPairGroups();
48
49 /**
50 * Returns the portPairGroup with the given identifier.
51 *
52 * @param portPairGroupId port pair group identifier
53 * @return PortPairGroup or null if port pair group with the given identifier is not
54 * known.
55 */
56 PortPairGroup getPortPairGroup(PortPairGroupId portPairGroupId);
57
58 /**
59 * Creates a PortPairGroup in the store.
60 *
61 * @param portPairGroup the port pair group to create
62 * @return true if given port pair group is created successfully.
63 */
64 boolean createPortPairGroup(PortPairGroup portPairGroup);
65
66 /**
67 * Updates the portPairGroup in the store.
68 *
69 * @param portPairGroup the port pair group to update
70 * @return true if given port pair group is updated successfully.
71 */
72 boolean updatePortPairGroup(PortPairGroup portPairGroup);
73
74 /**
75 * Deletes portPairGroup by given portPairGroupId.
76 *
77 * @param portPairGroupId id of port pair group to remove
78 * @return true if the give port pair group is deleted successfully.
79 */
80 boolean removePortPairGroup(PortPairGroupId portPairGroupId);
Phanendra Manda50753d62015-10-28 17:44:57 +053081}