blob: 6b1017660c9d3fe5980bc9efb2bd6caafeb2693b [file] [log] [blame]
Yixiao Chen39828a62016-09-14 14:37:06 -04001/*
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.teyang.utils.topology;
17
Henry Yu4b4a7eb2016-11-09 20:07:53 -050018import org.onosproject.tetopology.management.api.TeTopologyService;
19import org.onosproject.tetopology.management.api.link.NetworkLink;
Yixiao Chen39828a62016-09-14 14:37:06 -040020import org.onosproject.tetopology.management.api.link.NetworkLinkKey;
Yixiao Chen39828a62016-09-14 14:37:06 -040021import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev20151208.ietfnetwork.NetworkId;
Henry Yu4b4a7eb2016-11-09 20:07:53 -050022import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev20151208.ietfnetworktopology
23 .networks.network.augmentedndnetwork.Link;
24import org.onosproject.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.te.topology.rev20160708.ietftetopology.TeLinkEvent;
Yixiao Chen39828a62016-09-14 14:37:06 -040025
26/**
27 * The conversion functions.
28 */
29public final class LinkConverter {
Henry Yu4b4a7eb2016-11-09 20:07:53 -050030 private static final String E_NULL_TELINK_UNDERLAY_PATH =
31 "TeSubsystem link underlayPath object cannot be null";
32 private static final String E_NULL_TELINK_DATA =
33 "TeSubsystem teLinkAttrBuilder data cannot be null";
34 private static final String E_NULL_TELINK =
35 "TeSubsystem teLink object cannot be null";
36 private static final String E_NULL_YANG_TELINK_CONFIG =
37 "YANG telink config object cannot be null";
38 private static final String E_NULL_YANG_TELINK =
39 "YANG Link object cannot be null";
Yixiao Chen39828a62016-09-14 14:37:06 -040040
41 // no instantiation
42 private LinkConverter() {
43 }
44
Yixiao Chen39828a62016-09-14 14:37:06 -040045
46 /**
47 * Link object conversion from YANG to TE Topology subsystem.
48 *
Henry Yu4b4a7eb2016-11-09 20:07:53 -050049 * @param yangLink YANG link
50 * @param networkId YANG networkId
51 * @return TE subsystem link
Yixiao Chen39828a62016-09-14 14:37:06 -040052 */
53 public static org.onosproject.tetopology.management.api.link.NetworkLink
Henry Yu4b4a7eb2016-11-09 20:07:53 -050054 yang2TeSubsystemLink(Link yangLink, NetworkId networkId) {
Yixiao Chen39828a62016-09-14 14:37:06 -040055
Henry Yu4b4a7eb2016-11-09 20:07:53 -050056 //TODO: Implementation will be submitted as a separate review
Yixiao Chen39828a62016-09-14 14:37:06 -040057
Henry Yu4b4a7eb2016-11-09 20:07:53 -050058 return null;
Yixiao Chen39828a62016-09-14 14:37:06 -040059 }
60
Henry Yu4b4a7eb2016-11-09 20:07:53 -050061 public static Link teSubsystem2YangLink(NetworkLink link) {
62
63 //TODO: Implementation will be submitted as a separate review
64
65 return null;
66 }
67
68 public static NetworkLinkKey yangLinkEvent2NetworkLinkKey(TeLinkEvent yangLinkEvent) {
69
70 //TODO: Implementation will be submitted as a separate review
71
72 return null;
73 }
74
75 public static NetworkLink yangLinkEvent2NetworkLink(TeLinkEvent yangLinkEvent,
76 TeTopologyService teTopologyService) {
77
78 //TODO: Implementation will be submitted as a separate review
79
80 return null;
81 }
Yixiao Chen39828a62016-09-14 14:37:06 -040082}