Jeff Groom | 34c28ce | 2018-04-26 19:42:18 -0600 | [diff] [blame^] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.models.ciena; |
| 17 | |
| 18 | import com.google.common.collect.ImmutableMap; |
| 19 | import org.onosproject.yang.AbstractYangModelRegistrator; |
| 20 | import org.onosproject.yang.gen.v1.cienawaveserversystem.rev20180104.CienaWaveserverSystem; |
| 21 | import org.onosproject.yang.gen.v1.cienawaveserverport.rev20170731.CienaWaveserverPort; |
| 22 | |
| 23 | import org.apache.felix.scr.annotations.Component; |
| 24 | import org.onosproject.yang.model.DefaultYangModuleId; |
| 25 | import org.onosproject.yang.model.YangModuleId; |
| 26 | import org.onosproject.yang.runtime.AppModuleInfo; |
| 27 | import org.onosproject.yang.runtime.DefaultAppModuleInfo; |
| 28 | |
| 29 | import java.util.List; |
| 30 | import java.util.ArrayList; |
| 31 | import java.util.HashMap; |
| 32 | import java.util.Map; |
| 33 | |
| 34 | @Component(immediate = true) |
| 35 | public 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 | } |