blob: 6f68e17bb4ba52f2a7e44f1a2cd9692234749a9e [file] [log] [blame]
sunish vk30637eb2016-02-16 15:19:32 +05301/*
2 * Copyright 2016 Open Networking Laboratory
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.ospf.controller;
17
18import org.onlab.packet.Ip4Address;
19
20import java.util.List;
21import java.util.Map;
22
23/**
24 * Represents IP topology for OSPF device and link details.
25 */
26public interface TopologyForDeviceAndLink {
27
28 /**
29 * Gets the device information.
30 *
31 * @return device information
32 */
33 Map<String, DeviceInformation> deviceInformationMap();
34
35 /**
36 * Sets the device information.
37 *
38 * @param key key used to store in map
39 * @param deviceInformationMap device information instance
40 */
41 void setDeviceInformationMap(String key, DeviceInformation deviceInformationMap);
42
43 /**
44 * Gets the link information.
45 *
46 * @return link information
47 */
48 Map<String, LinkInformation> linkInformationMap();
49
50 /**
51 * Sets link information.
52 *
53 * @param key key used to store in map
54 * @param linkInformationMap link information instance
55 */
56 void setLinkInformationMap(String key, LinkInformation linkInformationMap);
57
58 /**
59 * Removes link information.
60 *
61 * @param key key used to remove from map
62 */
63 void removeLinkInformationMap(String key);
64
65 /**
66 * Adds device information.
67 *
68 * @param ospfLsa LSA instance
69 * @param ospfInterface interface instance
70 * @param ospfArea area instance
71 */
72 void addLocalDevice(OspfLsa ospfLsa, OspfInterface ospfInterface, OspfArea ospfArea);
73
74 /**
75 * Removes device information.
76 *
77 * @param key key used to remove from map
78 */
79 void removeDeviceInformationMap(String key);
80
81 /**
82 * Removes links from linkInformationMap.
83 *
84 * @param routerId router's IP address
85 */
86 void removeLinks(Ip4Address routerId);
87
88 /**
89 * Gets OSPF link TED details.
90 *
91 * @param key key used to retrieve from map
92 * @return links TED information
93 */
94 OspfLinkTed getOspfLinkTedHashMap(String key);
95
96 /**
97 * Gets all the router information to be deleted.
98 *
99 * @param ospfLsa LSA instance
100 * @param ospfArea area instance
101 * @return list of router information which needs to delete from device list
102 */
103 List<String> getDeleteRouterInformation(OspfLsa ospfLsa, OspfArea ospfArea);
104
105 /**
106 * Updates the device and link information.
107 *
108 * @param ospfLsa LSA instance
109 * @param ospfArea area instance
110 */
111 void updateLinkInformation(OspfLsa ospfLsa, OspfArea ospfArea);
112}