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
 
  10  * http://www.apache.org/licenses/LICENSE-2.0
 
  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
 
  16  * ============LICENSE_END==========================================================================
 
  17  ******************************************************************************/
 
  18 package org.onap.ccsdk.features.sdnr.wt.devicemanager.gran;
 
  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;
 
  34 public class GRanNetworkElement implements NetworkElement {
 
  36     private static final Logger log = LoggerFactory.getLogger(GRanNetworkElement.class);
 
  38     private final NetconfAccessor netconfAccessor;
 
  39     @SuppressWarnings("unused")
 
  40     private final DataProvider databaseService;
 
  42     GRanNetworkElement(NetconfAccessor netconfAccess, DataProvider databaseService) {
 
  43         log.info("Create {}",GRanNetworkElement.class.getSimpleName());
 
  44         this.netconfAccessor = netconfAccess;
 
  45         this.databaseService = databaseService;
 
  49     public void register() {
 
  50         log.info("Register actions should be here");
 
  54     public void deregister() {
 
  58     public void warmstart() {
 
  62     public NodeId getNodeId() {
 
  63         return netconfAccessor.getNodeId();
 
  67     public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) {
 
  68         return Optional.empty();
 
  72     public NetworkElementDeviceType getDeviceType() {
 
  73         return NetworkElementDeviceType.RAN3GPP;
 
  77     public Optional<NetconfAccessor> getAcessor() {
 
  78         return Optional.of(netconfAccessor);