Create VES client example for domain 'notification'
[oam.git] / features / devicemanager / g-ran / ru-fh / provider / src / main / java / org / oransc / oam / features / devicemanager / gran / GRanNetworkElement.java
1 /*
2  * ============LICENSE_START========================================================================
3  * ONAP : ccsdk feature sdnr wt
4  * =================================================================================================
5  * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved.
6  * =================================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
8  * in compliance with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software distributed under the License
13  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
14  * or implied. See the License for the specific language governing permissions and limitations under
15  * the License.
16  * ============LICENSE_END==========================================================================
17  */
18 package org.oransc.oam.features.devicemanager.gran;
19
20 import java.util.Optional;
21 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
22 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
23 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService;
24 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementDeviceType;
26 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
27 import org.slf4j.Logger;
28 import org.slf4j.LoggerFactory;
29
30 /**
31  * @author herbert
32  *
33  */
34 public class GRanNetworkElement implements NetworkElement {
35
36     private static final Logger log = LoggerFactory.getLogger(GRanNetworkElement.class);
37
38     private final NetconfAccessor netconfAccessor;
39     @SuppressWarnings("unused")
40     private final DataProvider databaseService;
41
42     public GRanNetworkElement(NetconfAccessor netconfAccess, DataProvider databaseService) {
43         log.info("Create {}", GRanNetworkElement.class.getSimpleName());
44         this.netconfAccessor = netconfAccess;
45         this.databaseService = databaseService;
46     }
47
48     @Override
49     public void register() {
50         log.info("Register actions should be here");
51     }
52
53     @Override
54     public void deregister() {
55         log.info("deRegister actions should be here");
56     }
57
58     @Override
59     public void warmstart() {
60         log.info("Warmstart actions should be here");
61     }
62
63     @Override
64     public NodeId getNodeId() {
65         return netconfAccessor.getNodeId();
66     }
67
68     @Override
69     public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) {
70         return Optional.empty();
71     }
72
73     @Override
74     public NetworkElementDeviceType getDeviceType() {
75         return NetworkElementDeviceType.RAN3GPP;
76     }
77
78     @Override
79     public Optional<NetconfAccessor> getAcessor() {
80         return Optional.of(netconfAccessor);
81     }
82
83 }