Sean Condon | 06613e9 | 2017-06-09 15:14:01 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2017-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 | */ |
| 16 | package org.onosproject.drivers.microsemi.yang; |
| 17 | |
| 18 | import com.google.common.collect.ImmutableMap; |
| 19 | import org.apache.felix.scr.annotations.Component; |
| 20 | import org.onosproject.yang.AbstractYangModelRegistrator; |
| 21 | import org.onosproject.yang.gen.v1.entitystatetcmib.rev20051122.EntityStateTcMib; |
| 22 | import org.onosproject.yang.gen.v1.fpgainternal.rev20151130.FpgaInternal; |
| 23 | import org.onosproject.yang.gen.v1.ianacrypthash.rev20140806.IanaCryptHash; |
| 24 | import org.onosproject.yang.gen.v1.ianaiftype.rev20140508.IanaIfType; |
| 25 | import org.onosproject.yang.gen.v1.ieeetypes.rev20080522.IeeeTypes; |
| 26 | import org.onosproject.yang.gen.v1.ietfinettypes.rev20130715.IetfInetTypes; |
| 27 | import org.onosproject.yang.gen.v1.ietfinterfaces.rev20140508.IetfInterfaces; |
| 28 | import org.onosproject.yang.gen.v1.ietfnetconf.rev20110601.IetfNetconf; |
| 29 | import org.onosproject.yang.gen.v1.ietfnetconfacm.rev20120222.IetfNetconfAcm; |
| 30 | import org.onosproject.yang.gen.v1.ietfnetconfmonitoring.rev20101004.IetfNetconfMonitoring; |
| 31 | import org.onosproject.yang.gen.v1.ietfnetconfnotifications.rev20120206.IetfNetconfNotifications; |
| 32 | import org.onosproject.yang.gen.v1.ietfnetconfwithdefaults.rev20100609.IetfNetconfWithDefaults; |
| 33 | import org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem; |
| 34 | import org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.IetfSystemMicrosemi; |
| 35 | import org.onosproject.yang.gen.v1.ietfsystemtlsauth.rev20140524.IetfSystemTlsAuth; |
| 36 | import org.onosproject.yang.gen.v1.ietfx509certtoname.rev20130326.IetfX509CertToName; |
| 37 | import org.onosproject.yang.gen.v1.ietfyangtypes.rev20130715.IetfYangTypes; |
| 38 | import org.onosproject.yang.gen.v1.mseacfm.rev20160229.MseaCfm; |
| 39 | import org.onosproject.yang.gen.v1.mseasafiltering.rev20160412.MseaSaFiltering; |
| 40 | import org.onosproject.yang.gen.v1.mseasoamfm.rev20160229.MseaSoamFm; |
| 41 | import org.onosproject.yang.gen.v1.mseasoampm.rev20160229.MseaSoamPm; |
| 42 | import org.onosproject.yang.gen.v1.mseatypes.rev20160229.MseaTypes; |
| 43 | import org.onosproject.yang.gen.v1.mseaunievcinterface.rev20160317.MseaUniEvcInterface; |
| 44 | import org.onosproject.yang.gen.v1.mseaunievcservice.rev20160317.MseaUniEvcService; |
| 45 | import org.onosproject.yang.gen.v1.ncnotifications.rev20080714.NcNotifications; |
| 46 | import org.onosproject.yang.gen.v1.netopeercfgnetopeer.rev20130214.NetopeerCfgnetopeer; |
| 47 | import org.onosproject.yang.gen.v1.notifications.rev20080714.Notifications; |
| 48 | import org.onosproject.yang.gen.v1.rfc2544.rev20151020.Rfc2544; |
| 49 | import org.onosproject.yang.gen.v1.svcactivationtypes.rev20151027.SvcActivationTypes; |
| 50 | import org.onosproject.yang.gen.v1.y1564.rev20151029.Y1564; |
| 51 | import org.onosproject.yang.model.DefaultYangModuleId; |
| 52 | import org.onosproject.yang.model.YangModuleId; |
| 53 | import org.onosproject.yang.runtime.AppModuleInfo; |
| 54 | import org.onosproject.yang.runtime.DefaultAppModuleInfo; |
| 55 | |
| 56 | import java.util.HashMap; |
| 57 | import java.util.Map; |
| 58 | |
| 59 | /** |
| 60 | * Representation of Microsemi model registrator which registers Microsemi device |
| 61 | * models. |
| 62 | */ |
| 63 | @Component(immediate = true) |
| 64 | public class MicrosemiModelRegistrator extends AbstractYangModelRegistrator { |
| 65 | |
| 66 | public MicrosemiModelRegistrator() { |
| 67 | super(IetfSystem.class, getAppInfo()); |
| 68 | } |
| 69 | |
| 70 | private static Map<YangModuleId, AppModuleInfo> getAppInfo() { |
| 71 | Map<YangModuleId, AppModuleInfo> appInfo = new HashMap<>(); |
| 72 | |
| 73 | appInfo.put(new DefaultYangModuleId("fpga-internal", "2015-11-30"), |
| 74 | new DefaultAppModuleInfo(FpgaInternal.class, null)); |
| 75 | appInfo.put(new DefaultYangModuleId("iana-if-type", "2014-05-08"), |
| 76 | new DefaultAppModuleInfo(IanaIfType.class, null)); |
| 77 | appInfo.put(new DefaultYangModuleId("ietf-yang-types", "2013-07-15"), |
| 78 | new DefaultAppModuleInfo(IetfYangTypes.class, null)); |
| 79 | appInfo.put(new DefaultYangModuleId("msea-sa-filtering", "2016-04-12"), |
| 80 | new DefaultAppModuleInfo(MseaSaFiltering.class, null)); |
| 81 | appInfo.put(new DefaultYangModuleId("ietf-x509-cert-to-name", "2013-03-26"), |
| 82 | new DefaultAppModuleInfo(IetfX509CertToName.class, null)); |
| 83 | appInfo.put(new DefaultYangModuleId("ietf-system", "2014-08-06"), |
| 84 | new DefaultAppModuleInfo(IetfSystem.class, null)); |
| 85 | appInfo.put(new DefaultYangModuleId("msea-types", "2016-02-29"), |
| 86 | new DefaultAppModuleInfo(MseaTypes.class, null)); |
| 87 | appInfo.put(new DefaultYangModuleId("ietf-inet-types", "2013-07-15"), |
| 88 | new DefaultAppModuleInfo(IetfInetTypes.class, null)); |
| 89 | appInfo.put(new DefaultYangModuleId("ietf-netconf-with-defaults", "2010-06-09"), |
| 90 | new DefaultAppModuleInfo(IetfNetconfWithDefaults.class, null)); |
| 91 | appInfo.put(new DefaultYangModuleId("msea-uni-evc-service", "2016-03-17"), |
| 92 | new DefaultAppModuleInfo(MseaUniEvcService.class, null)); |
| 93 | appInfo.put(new DefaultYangModuleId("ietf-netconf-monitoring", "2010-10-04"), |
| 94 | new DefaultAppModuleInfo(IetfNetconfMonitoring.class, null)); |
| 95 | appInfo.put(new DefaultYangModuleId("ietf-netconf-acm", "2012-02-22"), |
| 96 | new DefaultAppModuleInfo(IetfNetconfAcm.class, null)); |
| 97 | appInfo.put(new DefaultYangModuleId("ietf-system-tls-auth", "2014-05-24"), |
| 98 | new DefaultAppModuleInfo(IetfSystemTlsAuth.class, null)); |
| 99 | appInfo.put(new DefaultYangModuleId("rfc-2544", "2015-10-20"), |
| 100 | new DefaultAppModuleInfo(Rfc2544.class, null)); |
| 101 | appInfo.put(new DefaultYangModuleId("msea-cfm", "2016-02-29"), |
| 102 | new DefaultAppModuleInfo(MseaCfm.class, null)); |
| 103 | appInfo.put(new DefaultYangModuleId("netopeer-cfgnetopeer", "2013-02-14"), |
| 104 | new DefaultAppModuleInfo(NetopeerCfgnetopeer.class, null)); |
| 105 | appInfo.put(new DefaultYangModuleId("ENTITY-STATE-TC-MIB", "2005-11-22"), |
| 106 | new DefaultAppModuleInfo(EntityStateTcMib.class, null)); |
| 107 | appInfo.put(new DefaultYangModuleId("msea-soam-fm", "2016-02-29"), |
| 108 | new DefaultAppModuleInfo(MseaSoamFm.class, null)); |
| 109 | appInfo.put(new DefaultYangModuleId("ietf-netconf-notifications", "2012-02-06"), |
| 110 | new DefaultAppModuleInfo(IetfNetconfNotifications.class, null)); |
| 111 | appInfo.put(new DefaultYangModuleId("nc-notifications", "2008-07-14"), |
| 112 | new DefaultAppModuleInfo(NcNotifications.class, null)); |
| 113 | appInfo.put(new DefaultYangModuleId("iana-crypt-hash", "2014-08-06"), |
| 114 | new DefaultAppModuleInfo(IanaCryptHash.class, null)); |
| 115 | appInfo.put(new DefaultYangModuleId("msea-uni-evc-interface", "2016-03-17"), |
| 116 | new DefaultAppModuleInfo(MseaUniEvcInterface.class, null)); |
| 117 | appInfo.put(new DefaultYangModuleId("msea-soam-pm", "2016-02-29"), |
| 118 | new DefaultAppModuleInfo(MseaSoamPm.class, null)); |
| 119 | appInfo.put(new DefaultYangModuleId("ieee-types", "2008-05-22"), |
| 120 | new DefaultAppModuleInfo(IeeeTypes.class, null)); |
| 121 | appInfo.put(new DefaultYangModuleId("svc-activation-types", "2015-10-27"), |
| 122 | new DefaultAppModuleInfo(SvcActivationTypes.class, null)); |
| 123 | appInfo.put(new DefaultYangModuleId("ietf-netconf", "2011-06-01"), |
| 124 | new DefaultAppModuleInfo(IetfNetconf.class, null)); |
| 125 | appInfo.put(new DefaultYangModuleId("ietf-system-microsemi", "2016-05-05"), |
| 126 | new DefaultAppModuleInfo(IetfSystemMicrosemi.class, null)); |
| 127 | appInfo.put(new DefaultYangModuleId("notifications", "2008-07-14"), |
| 128 | new DefaultAppModuleInfo(Notifications.class, null)); |
| 129 | appInfo.put(new DefaultYangModuleId("y-1564", "2015-10-29"), |
| 130 | new DefaultAppModuleInfo(Y1564.class, null)); |
| 131 | appInfo.put(new DefaultYangModuleId("ietf-interfaces", "2014-05-08"), |
| 132 | new DefaultAppModuleInfo(IetfInterfaces.class, null)); |
| 133 | return ImmutableMap.copyOf(appInfo); |
| 134 | } |
| 135 | } |