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 | */ |
Yuta HIGUCHI | e7e71a8 | 2018-05-18 16:36:43 -0700 | [diff] [blame] | 16 | package org.onosproject.models.ciena.waveserverai; |
Jeff Groom | 34c28ce | 2018-04-26 19:42:18 -0600 | [diff] [blame] | 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 | |
Ray Milkey | d84f89b | 2018-08-17 14:54:17 -0700 | [diff] [blame] | 23 | import org.osgi.service.component.annotations.Component; |
Jeff Groom | 34c28ce | 2018-04-26 19:42:18 -0600 | [diff] [blame] | 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 | |
Jeff Groom | 34c28ce | 2018-04-26 19:42:18 -0600 | [diff] [blame] | 29 | import java.util.HashMap; |
| 30 | import java.util.Map; |
| 31 | |
| 32 | @Component(immediate = true) |
| 33 | public class CienaWaveserverAiModelRegistrator extends AbstractYangModelRegistrator { |
| 34 | public CienaWaveserverAiModelRegistrator() { |
| 35 | super(CienaWaveserverAiModelRegistrator.class, getAppInfo()); |
| 36 | } |
| 37 | |
| 38 | private static Map<YangModuleId, AppModuleInfo> getAppInfo() { |
| 39 | Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>(); |
| 40 | appInfo.put(new DefaultYangModuleId("ciena-waveserver-system", "2018-01-04"), |
| 41 | new DefaultAppModuleInfo(CienaWaveserverSystem.class, null)); |
| 42 | appInfo.put(new DefaultYangModuleId("ciena-waveserver-port", "2017-07-31"), |
| 43 | new DefaultAppModuleInfo(CienaWaveserverPort.class, null)); |
| 44 | |
| 45 | return ImmutableMap.copyOf(appInfo); |
| 46 | // TODO: Do some other registration tasks... |
| 47 | } |
| 48 | } |