Assign image keyname and pubkey at vnf level
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / apps / devicemanager / impl / src / main / java / org / opendaylight / mwtn / base / netconf / ONFLayerProtocolName.java
1 package org.opendaylight.mwtn.base.netconf;
2
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5
6 public enum ONFLayerProtocolName {
7
8     MWAirInterface("MWPS"),                    //V1.0 + V1.2
9     EthernetContainer10("ETH-CTP"),            //V1.0
10     EthernetContainer12("ETC"),                //V1.2
11     EthernetPhysical("ETY"),                //V1.2
12     TDMContainer("TDM"),                    //V1.2
13     Structure("MWS"),                        //V1.0 + V1.2
14     Ethernet("ETH"),                        //V1.2
15     Unknown("");
16
17     private static final Logger LOG = LoggerFactory.getLogger(ONFLayerProtocolName.class);
18
19     private final String myLayerProtocolName;
20
21     ONFLayerProtocolName( String myLayerProtocolName ) {
22         this.myLayerProtocolName = myLayerProtocolName;
23     }
24
25     public boolean is( org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.LayerProtocolName onfName ) {
26         return myLayerProtocolName.equals(onfName.getValue());
27     }
28
29     public boolean is( org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.typedefinitions.rev160710.LayerProtocolName onfName ) {
30         return myLayerProtocolName.equals(onfName.getValue());
31     }
32
33     public static ONFLayerProtocolName valueOf( org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.LayerProtocolName onfName ) {
34         for (ONFLayerProtocolName protocol : ONFLayerProtocolName.values()) {
35             if (protocol.is(onfName)) {
36                 return protocol;
37             }
38         }
39         LOG.info("Can not map {}. Use Unknown",onfName.getValue() );
40         return Unknown;
41     }
42
43     public static ONFLayerProtocolName valueOf( org.opendaylight.yang.gen.v1.uri.onf.coremodel.corenetworkmodule.typedefinitions.rev160710.LayerProtocolName onfName ) {
44         for (ONFLayerProtocolName protocol : ONFLayerProtocolName.values()) {
45             if (protocol.is(onfName)) {
46                 return protocol;
47             }
48         }
49         LOG.info("Can not map {}. Use Unknown",onfName.getValue() );
50         return Unknown;
51     }
52 }
53