Henry Yu | 4b4a7eb | 2016-11-09 20:07:53 -0500 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2016 Open Networking Foundation |
Henry Yu | 4b4a7eb | 2016-11-09 20:07:53 -0500 | [diff] [blame] | 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 | */ |
| 16 | package org.onosproject.tetopology.management.api.node; |
| 17 | |
| 18 | import java.util.BitSet; |
| 19 | import java.util.List; |
| 20 | import java.util.Map; |
| 21 | |
| 22 | import org.onosproject.tetopology.management.api.TeStatus; |
| 23 | import org.onosproject.tetopology.management.api.TeTopologyKey; |
| 24 | |
| 25 | /** |
| 26 | * Abstraction of a TE node. |
| 27 | */ |
| 28 | public interface TeNode { |
| 29 | /** |
| 30 | * Indicates that the TE node belongs to an abstract topology. |
| 31 | */ |
| 32 | public static final short BIT_ABSTRACT = 0; |
| 33 | |
| 34 | /** |
| 35 | * Indicates that the TE node is disabled. |
| 36 | */ |
| 37 | public static final short BIT_DISABLED = 1; |
| 38 | |
| 39 | /** |
| 40 | * Returns the TE node identifier. |
| 41 | * |
| 42 | * @return TE node identifier |
| 43 | */ |
| 44 | long teNodeId(); |
| 45 | |
| 46 | /** |
| 47 | * Returns the TE node name. |
| 48 | * |
| 49 | * @return the te node name |
| 50 | */ |
| 51 | String name(); |
| 52 | |
| 53 | /** |
| 54 | * Returns the flags. |
| 55 | * |
| 56 | * @return the flags |
| 57 | */ |
| 58 | BitSet flags(); |
| 59 | |
| 60 | /** |
| 61 | * Returns the underlay TE topology identifier for the node. |
| 62 | * |
| 63 | * @return the underlay TE topology id |
| 64 | */ |
| 65 | TeTopologyKey underlayTeTopologyId(); |
| 66 | |
| 67 | /** |
| 68 | * Returns the supporting TE node identifier. |
| 69 | * |
| 70 | * @return the id of the supporting node |
| 71 | */ |
| 72 | TeNodeKey supportingTeNodeId(); |
| 73 | |
| 74 | /** |
| 75 | * Returns the source TE node identifier. |
| 76 | * |
| 77 | * @return the id of the source node |
| 78 | */ |
| 79 | TeNodeKey sourceTeNodeId(); |
| 80 | |
| 81 | /** |
| 82 | * Returns the connectivity matrix table of the node. |
| 83 | * |
| 84 | * @return the connectivity matrix table |
| 85 | */ |
| 86 | Map<Long, ConnectivityMatrix> connectivityMatrices(); |
| 87 | |
| 88 | /** |
| 89 | * Returns the connectivity matrix identified by its entry identifier. |
| 90 | * |
| 91 | * @param entryId connection matrix id |
| 92 | * @return the connectivity matrix |
| 93 | */ |
| 94 | ConnectivityMatrix connectivityMatrix(long entryId); |
| 95 | |
| 96 | /** |
| 97 | * Returns a list of TE link identifiers originating from the node. |
| 98 | * |
| 99 | * @return a list of TE link ids |
| 100 | */ |
| 101 | List<Long> teLinkIds(); |
| 102 | |
| 103 | /** |
| 104 | * Returns a collection of currently known tunnel termination points. |
| 105 | * |
| 106 | * @return a collection of tunnel termination points associated with this node |
| 107 | */ |
| 108 | Map<Long, TunnelTerminationPoint> tunnelTerminationPoints(); |
| 109 | |
| 110 | /** |
| 111 | * Returns a tunnel termination point identified by its identifier. |
| 112 | * |
| 113 | * @param ttpId tunnel termination point identifier |
| 114 | * @return the tunnel termination point |
| 115 | */ |
| 116 | TunnelTerminationPoint tunnelTerminationPoint(long ttpId); |
| 117 | |
| 118 | /** |
| 119 | * Returns the admin status. |
| 120 | * |
| 121 | * @return the adminStatus |
| 122 | */ |
| 123 | TeStatus adminStatus(); |
| 124 | |
| 125 | /** |
| 126 | * Returns the operational status. |
| 127 | * |
| 128 | * @return the opStatus |
| 129 | */ |
| 130 | TeStatus opStatus(); |
| 131 | |
| 132 | /** |
| 133 | * Returns a collection of currently known TE termination point identifiers. |
| 134 | * |
| 135 | * @return a collection of termination point ids associated with this node |
| 136 | */ |
| 137 | List<Long> teTerminationPointIds(); |
| 138 | } |