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.base.netconf;
23 import java.util.List;
24 import javax.annotation.Nonnull;
25 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.InventoryInformation;
26 import org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container.Capabilities;
27 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
28 import org.slf4j.Logger;
29 import org.slf4j.LoggerFactory;
35 @SuppressWarnings("deprecation")
36 public abstract class ONFCoreNetworkElementBase implements AutoCloseable, ONFCoreNetworkElementRepresentation {
38 private static final Logger LOG = LoggerFactory.getLogger(ONFCoreNetworkElementBase.class);
40 protected static final String EMPTY = "";
42 private final String mountPointNodeName;
43 private final DataBroker netconfNodeDataBroker;
44 private final Capabilities capabilities;
45 private final boolean isNetworkElementCurrentProblemsSupporting10;
47 private @Nonnull InventoryInformation inventoryInformation = new InventoryInformation();
50 protected ONFCoreNetworkElementBase(String mountPointNodeName, DataBroker netconfNodeDataBroker,
51 Capabilities capabilities) {
52 LOG.info("Create ONFCoreNetworkElementBase");
53 this.mountPointNodeName = mountPointNodeName;
54 this.netconfNodeDataBroker = netconfNodeDataBroker;
55 this.capabilities = capabilities;
57 this.isNetworkElementCurrentProblemsSupporting10 = false;
62 public String getMountPointNodeName() {
63 return mountPointNodeName;
67 * @return the netconfNodeDataBroker
69 public DataBroker getNetconfNodeDataBroker() {
70 return netconfNodeDataBroker;
74 * @return the capabilities
76 public Capabilities getCapabilities() {
81 * @return the isNetworkElementCurrentProblemsSupporting10
83 public boolean isNetworkElementCurrentProblemsSupporting10() {
84 return isNetworkElementCurrentProblemsSupporting10;
87 public void setInventoryInformation(InventoryInformation newInventoryInformation) {
88 this.inventoryInformation = newInventoryInformation;
92 public InventoryInformation getInventoryInformation() {
93 return getInventoryInformation(null);
97 public InventoryInformation getInventoryInformation(String layerProtocolFilter) {
98 InventoryInformation res = new InventoryInformation(inventoryInformation);
99 res.setInterfaceUuidList(getFilteredInterfaceUuidsAsStringList(layerProtocolFilter));
105 public void close() throws Exception {}
107 /*---------------------------------------------------------------
111 public String getMountpoint() {
112 return mountPointNodeName;
115 public DataBroker getDataBroker() {
116 return netconfNodeDataBroker;
119 /*-----------------------------------------------------------------------------
124 public void initSynchronizationExtension() {}
126 protected @Nonnull abstract List<String> getFilteredInterfaceUuidsAsStringList(String layerProtocolFilter);