blob: 3d45806dffb510cc4e2dbeb29fa6c0a978595adf [file] [log] [blame]
Aihua Guo1ce2dd12016-08-12 23:37:44 -04001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2016 Open Networking Foundation
Aihua Guo1ce2dd12016-08-12 23:37:44 -04003 *
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.tetopology.management.api.node;
17
18import java.util.List;
Henry Yu4b4a7eb2016-11-09 20:07:53 -050019import java.util.Map;
Aihua Guo1ce2dd12016-08-12 23:37:44 -040020
21import org.onosproject.tetopology.management.api.KeyId;
Aihua Guo1ce2dd12016-08-12 23:37:44 -040022
23/**
24 * Abstraction of a network node.
25 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050026public interface NetworkNode {
Aihua Guo1ce2dd12016-08-12 23:37:44 -040027
28 /**
Henry Yu4b4a7eb2016-11-09 20:07:53 -050029 * Returns the node identifier.
Aihua Guo1ce2dd12016-08-12 23:37:44 -040030 *
31 * @return node identifier
32 */
33 KeyId nodeId();
34
35 /**
Henry Yu4b4a7eb2016-11-09 20:07:53 -050036 * Returns the supporting node identifiers.
Aihua Guo1ce2dd12016-08-12 23:37:44 -040037 *
38 * @return list of the ids of the supporting nodes
39 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050040 List<NetworkNodeKey> supportingNodeIds();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040041
42 /**
43 * Returns the node TE extension attributes.
44 *
45 * @return node TE extension attributes
46 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050047 TeNode teNode();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040048
49 /**
50 * Returns a collection of currently known termination points.
51 *
52 * @return a collection of termination points associated with this node
53 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050054 Map<KeyId, TerminationPoint> terminationPoints();
Aihua Guo1ce2dd12016-08-12 23:37:44 -040055
56 /**
57 * Returns the termination point.
58 *
Henry Yu4b4a7eb2016-11-09 20:07:53 -050059 * @param tpId termination point id
Aihua Guo1ce2dd12016-08-12 23:37:44 -040060 * @return value of termination point
61 */
Henry Yu4b4a7eb2016-11-09 20:07:53 -050062 TerminationPoint terminationPoint(KeyId tpId);
Aihua Guo1ce2dd12016-08-12 23:37:44 -040063
64}