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 public abstract class ONFCoreNetworkElementBase implements AutoCloseable, ONFCoreNetworkElementRepresentation {
37 private static final Logger LOG = LoggerFactory.getLogger(ONFCoreNetworkElementBase.class);
39 protected static final String EMPTY = "";
41 private final String mountPointNodeName;
42 private final DataBroker netconfNodeDataBroker;
43 private final Capabilities capabilities;
44 private final boolean isNetworkElementCurrentProblemsSupporting10;
46 private @Nonnull InventoryInformation inventoryInformation = new InventoryInformation();
49 protected ONFCoreNetworkElementBase(String mountPointNodeName, DataBroker netconfNodeDataBroker,
50 Capabilities capabilities) {
51 LOG.info("Create ONFCoreNetworkElementBase");
52 this.mountPointNodeName = mountPointNodeName;
53 this.netconfNodeDataBroker = netconfNodeDataBroker;
54 this.capabilities = capabilities;
56 this.isNetworkElementCurrentProblemsSupporting10 = false;
61 public String getMountPointNodeName() {
62 return mountPointNodeName;
66 * @return the netconfNodeDataBroker
68 public DataBroker getNetconfNodeDataBroker() {
69 return netconfNodeDataBroker;
73 * @return the capabilities
75 public Capabilities getCapabilities() {
80 * @return the isNetworkElementCurrentProblemsSupporting10
82 public boolean isNetworkElementCurrentProblemsSupporting10() {
83 return isNetworkElementCurrentProblemsSupporting10;
86 public void setInventoryInformation(InventoryInformation newInventoryInformation) {
87 this.inventoryInformation = newInventoryInformation;
91 public InventoryInformation getInventoryInformation() {
92 return getInventoryInformation(null);
96 public InventoryInformation getInventoryInformation(String layerProtocolFilter) {
97 InventoryInformation res = new InventoryInformation(inventoryInformation);
98 res.setInterfaceUuidList(getFilteredInterfaceUuidsAsStringList(layerProtocolFilter));
104 public void close() throws Exception {}
106 /*---------------------------------------------------------------
110 public String getMountpoint() {
111 return mountPointNodeName;
114 public DataBroker getDataBroker() {
115 return netconfNodeDataBroker;
118 /*-----------------------------------------------------------------------------
123 public void initSynchronizationExtension() {}
125 protected @Nonnull abstract List<String> getFilteredInterfaceUuidsAsStringList(String layerProtocolFilter);