blob: 63a1a0234cd481a7ff128c167e5413cac78fca50 [file] [log] [blame]
slowr13fa5b02017-08-08 16:32:31 -07001/*
slowr577f3222017-08-28 10:49:08 -07002 * Copyright 2015-present Open Networking Foundation
slowr13fa5b02017-08-08 16:32:31 -07003 *
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 */
16
17package org.onosproject.xran;
18
19import com.fasterxml.jackson.databind.JsonNode;
20import com.fasterxml.jackson.databind.node.ObjectNode;
21import org.onosproject.store.Store;
22import org.onosproject.xran.codecs.api.ECGI;
slowr13fa5b02017-08-08 16:32:31 -070023import org.onosproject.xran.controller.XranController;
24import org.onosproject.xran.entities.RnibCell;
25import org.onosproject.xran.entities.RnibLink;
26import org.onosproject.xran.entities.RnibSlice;
27import org.onosproject.xran.entities.RnibUe;
28import org.onosproject.xran.identifiers.LinkId;
29
30import java.util.List;
31
32/**
33 * Created by dimitris on 7/22/17.
34 */
35public interface XranStore extends Store {
36
37 // LINKS STORE
38
slowr577f3222017-08-28 10:49:08 -070039 /**
40 * Get all active links.
41 *
42 * @return list of links
43 */
slowr13fa5b02017-08-08 16:32:31 -070044 List<RnibLink> getLinks();
45
slowr577f3222017-08-28 10:49:08 -070046 /**
47 * Get all links for that CELL based on ECGI.
48 *
49 * @param ecgi CELL ECGI
50 * @return list of links
51 */
52 List<RnibLink> getlinksbyecgi(ECGI ecgi);
slowr13fa5b02017-08-08 16:32:31 -070053
slowr577f3222017-08-28 10:49:08 -070054 /**
55 * Get all links for that CELL based on ECI.
56 *
57 * @param eciHex HEX string of ECI
58 * @return list of links
59 */
60 List<RnibLink> getlinksbycellid(String eciHex);
slowr13fa5b02017-08-08 16:32:31 -070061
slowr577f3222017-08-28 10:49:08 -070062 /**
63 * Get all links for the UE based on UE ID.
64 *
65 * @param ueId UE ID
66 * @return list of links
67 */
68 List<RnibLink> getlinksbyueid(long ueId);
slowr13fa5b02017-08-08 16:32:31 -070069
slowr577f3222017-08-28 10:49:08 -070070 /**
71 * Get a link between a CELL and UE.
72 *
73 * @param cellId HEX string ECI
74 * @param ueId UE id
75 * @return link
76 */
77 RnibLink getlinkbetweencellidueid(String cellId, long ueId);
slowr13fa5b02017-08-08 16:32:31 -070078
slowr577f3222017-08-28 10:49:08 -070079 /**
80 * Get a link between a CELL's ECGI and UE's id.
81 *
82 * @param ecgi CELL ECGI
83 * @param ueId UE id
84 * @return link
85 */
slowrc86750e2017-08-22 17:26:47 -070086 RnibLink getLink(ECGI ecgi, Long ueId);
slowr13fa5b02017-08-08 16:32:31 -070087
slowr577f3222017-08-28 10:49:08 -070088 /**
89 * Modify specified link's RRM Configuration.
90 *
91 * @param link LINK entity
92 * @param rrmConf json node of RRM Configuration
93 */
94 void modifylinkrrmconf(RnibLink link, JsonNode rrmConf);
slowr8ddc2b12017-08-14 14:13:38 -070095
slowr577f3222017-08-28 10:49:08 -070096 /**
97 * Put new link to store.
98 *
99 * @param link LINK entity
100 */
slowr13fa5b02017-08-08 16:32:31 -0700101 void storeLink(RnibLink link);
102
slowr577f3222017-08-28 10:49:08 -0700103 /**
104 * Remove link from store.
105 *
106 * @param link LINK entity
107 * @return true if remove succeeded
108 */
slowr13fa5b02017-08-08 16:32:31 -0700109 boolean removeLink(LinkId link);
110
111 // NODES
112
slowr577f3222017-08-28 10:49:08 -0700113 /**
114 * Get all CELLs and UEs.
115 *
116 * @return list of UEs and CELLs
117 */
slowr13fa5b02017-08-08 16:32:31 -0700118 List<Object> getNodes();
119
slowr577f3222017-08-28 10:49:08 -0700120 /**
121 * Get all CELLs.
122 *
123 * @return list of CELLs
124 */
125 List<Object> getcellnodes();
slowr13fa5b02017-08-08 16:32:31 -0700126
slowr577f3222017-08-28 10:49:08 -0700127 /**
128 * Get all UEs.
129 *
130 * @return list of UEs
131 */
132 List<Object> getuenodes();
slowr13fa5b02017-08-08 16:32:31 -0700133
slowr577f3222017-08-28 10:49:08 -0700134 /**
135 * Get node by node id.
136 *
137 * @param nodeId HEX string ECI or UE id
138 * @return CELL or UE
139 */
140 Object getbynodeid(String nodeId);
slowr13fa5b02017-08-08 16:32:31 -0700141
142 // CELL
143
slowr577f3222017-08-28 10:49:08 -0700144 /**
145 * Get cell based on HEX string ECI.
146 *
147 * @param eci HEX string ECI
148 * @return CELL if found
149 */
slowr13fa5b02017-08-08 16:32:31 -0700150 RnibCell getCell(String eci);
151
slowr577f3222017-08-28 10:49:08 -0700152 /**
153 * Get cell based on ECGI.
154 *
155 * @param cellId CELL ECGI
156 * @return CELL if found
157 */
slowr13fa5b02017-08-08 16:32:31 -0700158 RnibCell getCell(ECGI cellId);
159
slowr577f3222017-08-28 10:49:08 -0700160 /**
161 * Modify CELL's RRM Configuration.
162 *
163 * @param cell CELL entity
164 * @param rrmConf json node of RRM Configuration
165 * @throws Exception exception
166 */
167 void modifycellrrmconf(RnibCell cell, JsonNode rrmConf) throws Exception;
slowr13fa5b02017-08-08 16:32:31 -0700168
slowr577f3222017-08-28 10:49:08 -0700169 /**
170 * Put new CELL to the store.
171 *
172 * @param cell CELL entity
173 */
slowr13fa5b02017-08-08 16:32:31 -0700174 void storeCell(RnibCell cell);
175
slowr577f3222017-08-28 10:49:08 -0700176 /**
177 * Remove CELL from the store.
178 *
179 * @param ecgi CELL's ECGI
180 * @return ture if remove succeeded
181 */
slowr13fa5b02017-08-08 16:32:31 -0700182 boolean removeCell(ECGI ecgi);
183
184 // SLICE
185
slowr577f3222017-08-28 10:49:08 -0700186 /**
187 * Get SLICE based on SLICE id.
188 *
189 * @param sliceId SLICE id
190 * @return SLICE
191 */
slowr13fa5b02017-08-08 16:32:31 -0700192 RnibSlice getSlice(long sliceId);
193
slowr577f3222017-08-28 10:49:08 -0700194 /**
195 * Put new SLICE to the store.
196 *
197 * @param attributes json node of SLICE attributes
198 * @return true if put succeeded
199 */
slowr13fa5b02017-08-08 16:32:31 -0700200 boolean createSlice(ObjectNode attributes);
201
slowr577f3222017-08-28 10:49:08 -0700202 /**
203 * Remove SLICE based on SLICE id.
204 *
205 * @param sliceId SLICE id
206 * @return true if remove succeeded
207 */
slowr13fa5b02017-08-08 16:32:31 -0700208 boolean removeCell(long sliceId);
209
210 // CONTROLLER
211
slowr577f3222017-08-28 10:49:08 -0700212 /**
213 * Get the xran controller instance.
214 *
215 * @return xran controller
216 */
slowr13fa5b02017-08-08 16:32:31 -0700217 XranController getController();
218
slowr577f3222017-08-28 10:49:08 -0700219 /**
220 * Set the xran controller instance.
221 *
222 * @param controller xran controller
223 */
slowr13fa5b02017-08-08 16:32:31 -0700224 void setController(XranController controller);
225
226 // UE
227
slowr577f3222017-08-28 10:49:08 -0700228 /**
229 * Get UE based on UE id.
230 *
231 * @param euId UE id
232 * @return UE entity
233 */
slowr13fa5b02017-08-08 16:32:31 -0700234 RnibUe getUe(long euId);
235
slowr577f3222017-08-28 10:49:08 -0700236 /**
237 * Put new UE to store.
238 *
239 * @param ue UE entity
240 */
slowr13fa5b02017-08-08 16:32:31 -0700241 void storeUe(RnibUe ue);
242
slowr577f3222017-08-28 10:49:08 -0700243 /**
244 * Remove UE from store.
245 *
246 * @param ueId UE id
247 * @return true if remove succeeded
248 */
slowrc86750e2017-08-22 17:26:47 -0700249 boolean removeUe(long ueId);
slowr13fa5b02017-08-08 16:32:31 -0700250}