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 ******************************************************************************/
21 package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne;
23 import java.util.Optional;
24 import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElementService;
25 import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ONFCoreNetworkElementRepresentation;
26 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.InventoryInformationDcae;
27 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp;
28 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
29 import org.opendaylight.mdsal.binding.api.DataBroker;
30 import org.opendaylight.mdsal.binding.api.MountPoint;
31 import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement;
32 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev190801.NetworkElementDeviceType;
33 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
34 import org.slf4j.Logger;
35 import org.slf4j.LoggerFactory;
41 public class ONFCoreNetworkElementEmpty implements ONFCoreNetworkElementRepresentation {
43 private static final Logger LOG = LoggerFactory.getLogger(ONFCoreNetworkElementEmpty.class);
45 private final NetconfAccessor acessor;
46 private final String mountPointNodeName;
47 private final NodeId nodeId;
49 public ONFCoreNetworkElementEmpty(NetconfAccessor acessor, String mountPointNodeName) {
50 LOG.info("Create {}",ONFCoreNetworkElementEmpty.class.getSimpleName());
51 this.mountPointNodeName = mountPointNodeName;
52 this.nodeId = new NodeId(mountPointNodeName);
53 this.acessor = acessor;
57 public void initialReadFromNetworkElement() {
61 public String getMountPointNodeName() {
62 return mountPointNodeName;
66 public String getMountpoint() {
67 return mountPointNodeName;
71 public void resetPMIterator() {
75 public boolean hasNext() {
84 public String pmStatusToString() {
85 return this.getClass().getSimpleName();
89 public int removeAllCurrentProblemsOfNode() {
94 public void doRegisterEventListener(MountPoint mointPoint) {
99 public void prepareCheck() {
104 public boolean checkIfConnectionToMediatorIsOk() {
109 public boolean checkIfConnectionToNeIsOk() {
114 public InventoryInformationDcae getInventoryInformation() {
115 return InventoryInformationDcae.getDefault();
119 public InventoryInformationDcae getInventoryInformation(String layerProtocolFilter) {
120 return InventoryInformationDcae.getDefault();
124 public DataBroker getDataBroker() {
129 public Optional<NetworkElement> getOptionalNetworkElement() {
130 return Optional.empty();
134 public NetworkElementDeviceType getDeviceType() {
135 return NetworkElementDeviceType.Unknown;
139 public void register() {
143 public void deregister() {
147 public NodeId getNodeId() {
152 public <L extends NetworkElementService> Optional<L> getService(Class<L> clazz) {
153 return Optional.empty();
157 public void warmstart() {
161 public Optional<NetconfAccessor> getAcessor() {
162 return Optional.of(acessor);
166 public Optional<PerformanceDataLtp> getLtpHistoricalPerformanceData() {
167 return Optional.empty();