blob: 2f2014acba7d4000d60cacc8ebce405b3ac78d99 [file] [log] [blame]
Aihua Guo1ce2dd12016-08-12 23:37:44 -04001/*
2 * Copyright 2016-present 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.tetopology.management.api;
17
18import java.util.List;
19
20import org.onosproject.tetopology.management.api.link.NetworkLink;
21import org.onosproject.tetopology.management.api.node.NetworkNode;
22
23/**
24 * Abstraction of a network element.
25 */
26public interface Network extends TeTopologyEventSubject {
27
28 /**
29 * Returns the network identifier / key of this element.
30 *
31 * @return network identifier
32 */
33 KeyId networkId();
34
35 /**
36 * Returns the attribute of supporting Network.
37 *
38 * @return list of the ids of the supporting networks
39 */
40 List<KeyId> getSupportingNetworkIds();
41
42 /**
43 * Returns a collection of nodes in the network identified by the specified
44 * network id.
45 *
46 * @return a collection of currently known nodes
47 */
48 List<NetworkNode> getNodes();
49
50 /**
51 * Returns the node.
52 *
53 * @param nodeId node id URI format
54 * @return value of node
55 */
56 NetworkNode getNode(KeyId nodeId);
57
58 /**
59 * Returns a collection of links in the network identified by the specified
60 * network id.
61 *
62 * @return a collection of currently known links
63 */
64 List<NetworkLink> getLinks();
65
66 /**
67 * Returns the link.
68 *
69 * @param linkId link id in URI format
70 * @return value of link
71 */
72 NetworkLink getLink(KeyId linkId);
73
74 /**
75 * Returns if the network is provided by a server or is configured by a
76 * client.
77 *
78 * @return true if the network is provided by a server; false otherwise
79 */
80 boolean isServerProvided();
81
82 /**
83 * Returns the TE topology Id.
84 *
85 * @return TE topology id for this network
86 */
87 TeTopologyId getTeTopologyId();
88}