2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.openroadm.impl;
24 import java.util.Optional;
25 import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
26 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
27 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService;
28 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
29 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
30 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
31 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType;
32 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
34 public class OpenroadmNetworkElementBase implements NetworkElement {
36 protected final NetconfBindingAccessor netconfAccessor;
37 protected final DataProvider databaseService;
39 public OpenroadmNetworkElementBase(NetconfBindingAccessor netconfAccess,
40 DeviceManagerServiceProvider serviceProvider) {
42 this.netconfAccessor = netconfAccess;
43 this.databaseService = serviceProvider.getDataProvider();
47 public void register() {}
50 public void deregister() {}
53 public void warmstart() {}
56 public NodeId getNodeId() {
57 return netconfAccessor.getNodeId();
61 public NetworkElementDeviceType getDeviceType() {
62 return NetworkElementDeviceType.OROADM;
66 public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) {
67 return Optional.empty();
71 public Optional<NetconfAccessor> getAcessor() {
72 return Optional.of(netconfAccessor);