blob: f9862817ea10bee1774fd4304b7db1bd90d78c90 [file] [log] [blame]
Jeff Groom34c28ce2018-04-26 19:42:18 -06001/*
2 * Copyright 2017-present Open Networking Foundation
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.models.ciena;
17
18import com.google.common.collect.ImmutableMap;
19import org.onosproject.yang.AbstractYangModelRegistrator;
20import org.onosproject.yang.gen.v1.cienawaveserversystem.rev20180104.CienaWaveserverSystem;
21import org.onosproject.yang.gen.v1.cienawaveserverport.rev20170731.CienaWaveserverPort;
22
23import org.apache.felix.scr.annotations.Component;
24import org.onosproject.yang.model.DefaultYangModuleId;
25import org.onosproject.yang.model.YangModuleId;
26import org.onosproject.yang.runtime.AppModuleInfo;
27import org.onosproject.yang.runtime.DefaultAppModuleInfo;
28
29import java.util.List;
30import java.util.ArrayList;
31import java.util.HashMap;
32import java.util.Map;
33
34@Component(immediate = true)
35public class CienaWaveserverAiModelRegistrator extends AbstractYangModelRegistrator {
36 public CienaWaveserverAiModelRegistrator() {
37 super(CienaWaveserverAiModelRegistrator.class, getAppInfo());
38 }
39
40 private static Map<YangModuleId, AppModuleInfo> getAppInfo() {
41 Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>();
42 appInfo.put(new DefaultYangModuleId("ciena-waveserver-system", "2018-01-04"),
43 new DefaultAppModuleInfo(CienaWaveserverSystem.class, null));
44 appInfo.put(new DefaultYangModuleId("ciena-waveserver-port", "2017-07-31"),
45 new DefaultAppModuleInfo(CienaWaveserverPort.class, null));
46
47 return ImmutableMap.copyOf(appInfo);
48 // TODO: Do some other registration tasks...
49 }
50}