diff options
Diffstat (limited to 'sdnr/wt/devicemanager-onf/provider/src/main')
12 files changed, 45 insertions, 30 deletions
diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java index f1ddbe73c..a0813eee6 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java @@ -22,6 +22,7 @@ import org.eclipse.jdt.annotation.Nullable; import org.onap.ccsdk.features.sdnr.wt.common.YangHelper; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ptp.dataset.rev170208.InstanceList; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ptp.dataset.rev170208.InstanceListKey; @@ -47,7 +48,7 @@ public class WrapperPTPModelRev170208 { * Query synchronization information out of NE */ - public static void initSynchronizationExtension(NetconfAccessor acessor) { + public static void initSynchronizationExtension(NetconfBindingAccessor acessor) { String mountPointNodeName = acessor.getNodeId().getValue(); Capabilities capabilities = acessor.getCapabilites(); @@ -93,7 +94,7 @@ public class WrapperPTPModelRev170208 { } @Nullable - private static InstanceList readPTPClockInstances(NetconfAccessor acessor) { + private static InstanceList readPTPClockInstances(NetconfBindingAccessor acessor) { return acessor.getTransactionUtils().readData(acessor.getDataBroker(), LogicalDatastoreType.OPERATIONAL, PTPINSTANCES_IID); } diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java index f32acb46e..0c51c5ebc 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java @@ -30,6 +30,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.EquipmentData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.InventoryInformationDcae; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.Equipment; @@ -56,18 +57,18 @@ public class ONFCoreNetworkElement12Equipment { private final NetworkElementCoreData coreData; private final @Nullable OnfInterfacePac equipmentPac; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; private final ValueNameList extensionList; private final @NonNull List<UniversalId> topLevelEqUuidList; private final @NonNull FaultData globalProblemList; private final @NonNull List<ExtendedEquipment> globalEquipmentList; - public ONFCoreNetworkElement12Equipment(NetconfAccessor acessor, NetworkElementCoreData coreData) { + public ONFCoreNetworkElement12Equipment(NetconfBindingAccessor acessor, NetworkElementCoreData coreData) { this(acessor, coreData, false); } - public ONFCoreNetworkElement12Equipment(NetconfAccessor acessor, NetworkElementCoreData coreData, + public ONFCoreNetworkElement12Equipment(NetconfBindingAccessor acessor, NetworkElementCoreData coreData, Boolean disabled) { LOG.debug("Initialize class: {} " + ONFCoreNetworkElement12Equipment.class.getName()); this.acessor = acessor; diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java index c93c80f4f..d0b4cc51a 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java @@ -25,6 +25,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.OnfInterfacePac; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.WrapperMicrowaveModelRev181010; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -42,10 +43,10 @@ public class WrapperEquipmentPacRev170402 implements OnfInterfacePac { private static final Logger LOG = LoggerFactory.getLogger(WrapperEquipmentPacRev170402.class); public static final QName QNAME = EquipmentPac.QNAME; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; - public WrapperEquipmentPacRev170402(NetconfAccessor acessor) { + public WrapperEquipmentPacRev170402(NetconfBindingAccessor acessor) { this.acessor = acessor; } diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java index ff23dfe2b..12c8b540a 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java @@ -34,6 +34,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -88,7 +89,7 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw private final NotificationService microwaveModelListener; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; private final TransactionUtils genericTransactionUtils; private final FaultService faultService; @@ -97,7 +98,7 @@ public class WrapperMicrowaveModelRev170324 implements OnfMicrowaveModel, Microw /** * @param acessor to access device */ - public WrapperMicrowaveModelRev170324(@NonNull NetconfAccessor acessor, + public WrapperMicrowaveModelRev170324(@NonNull NetconfBindingAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider) { this.acessor = acessor; this.genericTransactionUtils = acessor.getTransactionUtils(); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java index 4402b86b6..653a786f0 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java @@ -34,6 +34,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -88,7 +89,7 @@ public class WrapperMicrowaveModelRev180907 implements OnfMicrowaveModel, Microw private final NotificationService microwaveModelListener; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; private final TransactionUtils genericTransactionUtil; private final String mountpointId; private final @NonNull FaultService faultService; @@ -102,7 +103,7 @@ public class WrapperMicrowaveModelRev180907 implements OnfMicrowaveModel, Microw * @param acessor to access device * @param serviceProvider for devicemanager services */ - public WrapperMicrowaveModelRev180907(@NonNull NetconfAccessor acessor, + public WrapperMicrowaveModelRev180907(@NonNull NetconfBindingAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider) { this.acessor = acessor; this.mountpointId = acessor.getNodeId().getValue(); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java index 299ed14f0..a1f71c586 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java @@ -34,6 +34,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.NotificationService import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -87,7 +88,7 @@ public class WrapperMicrowaveModelRev181010 implements OnfMicrowaveModel, Microw public static final QName QNAME = MwAirInterfacePac.QNAME; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; private final NotificationService microwaveModelListener; private final TransactionUtils genericTransactionUtils; private final String mountpointId; @@ -101,7 +102,7 @@ public class WrapperMicrowaveModelRev181010 implements OnfMicrowaveModel, Microw * @param acessor to access device * @param serviceProvider for devicemanager services */ - public WrapperMicrowaveModelRev181010(@NonNull NetconfAccessor acessor, + public WrapperMicrowaveModelRev181010(@NonNull NetconfBindingAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider) { this.acessor = acessor; this.genericTransactionUtils = acessor.getTransactionUtils(); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java index b4900b599..10ee24201 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java @@ -52,7 +52,7 @@ public class DeviceManagerOnfImpl implements AutoCloseable { configuration = new DeviceManagerOnfConfiguration( netconfNetworkElementService.getServiceProvider().getConfigurationFileRepresentation()); resOnf = netconfNetworkElementService - .registerNetworkElementFactory(new ONFCoreNetworkElementFactory(configuration)); + .registerBindingNetworkElementFactory(new ONFCoreNetworkElementFactory(configuration)); netconfNetworkElementService.writeToEventLog(APPLICATIONNAME, "startup", "done"); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java index bcfc3e0e4..06558ad5a 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java @@ -29,6 +29,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElemen import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,28 +52,28 @@ public class ONFCoreNetworkElementFactory implements NetworkElementFactory { @Override public Optional<org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement> create( - @NonNull NetconfAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider) { + @NonNull NetconfAccessor accessor, @NonNull DeviceManagerServiceProvider serviceProvider) { - log.info("Enter factory {}", ONFCoreNetworkElementFactory.class.getName(), acessor.getNodeId()); + log.info("Enter factory {}", ONFCoreNetworkElementFactory.class.getName(), accessor.getNodeId()); - Capabilities capabilities = acessor.getCapabilites(); + Capabilities capabilities = accessor.getCapabilites(); if (capabilities.isSupportingNamespaceAndRevision(NetworkElement.QNAME)) { OnfMicrowaveModel onfMicrowaveModel = null; - + Optional<NetconfBindingAccessor> bindingAccessor = accessor.getNetconfBindingAccessor(); if (capabilities.isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME)) { - onfMicrowaveModel = new WrapperMicrowaveModelRev170324(acessor, serviceProvider); + onfMicrowaveModel = new WrapperMicrowaveModelRev170324(bindingAccessor.get(), serviceProvider); } else if (capabilities.isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME)) { - onfMicrowaveModel = new WrapperMicrowaveModelRev180907(acessor, serviceProvider); + onfMicrowaveModel = new WrapperMicrowaveModelRev180907(bindingAccessor.get(), serviceProvider); } else if (capabilities.isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev181010.QNAME)) { - onfMicrowaveModel = new WrapperMicrowaveModelRev181010(acessor, serviceProvider); + onfMicrowaveModel = new WrapperMicrowaveModelRev181010(bindingAccessor.get(), serviceProvider); } if (onfMicrowaveModel != null) { - return Optional.of(new ONFCoreNetworkElement12Microwave(acessor, serviceProvider, configuration, + return Optional.of(new ONFCoreNetworkElement12Microwave(bindingAccessor.get(), serviceProvider, configuration, onfMicrowaveModel)); } else { - return Optional.of(new ONFCoreNetworkElement12Basic(acessor, serviceProvider, configuration)); + return Optional.of(new ONFCoreNetworkElement12Basic(bindingAccessor.get(), serviceProvider, configuration)); } } diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java index 30897da1d..af2b2405b 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java @@ -37,6 +37,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.InventoryInformationDcae; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.opendaylight.mdsal.binding.api.MountPoint; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement; @@ -98,7 +99,7 @@ public abstract class ONFCoreNetworkElement12Base extends ONFCoreNetworkElementB * Constructor */ - protected ONFCoreNetworkElement12Base(@NonNull NetconfAccessor acessor) { + protected ONFCoreNetworkElement12Base(@NonNull NetconfBindingAccessor acessor) { super(acessor); this.optionalNe = Optional.empty(); this.nodeId = getAcessor().get().getNodeId(); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java index f48eb60fe..3c6140d82 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java @@ -30,6 +30,8 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.PerformanceManager; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications; import org.opendaylight.yang.gen.v1.urn.opendaylight.netconf.node.topology.rev150114.NetconfNode; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementConnectionBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.NetworkElementDeviceType; @@ -66,8 +68,10 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { private final @NonNull String mountPointNodeName; - private final @NonNull NetconfAccessor acessor; + private final @NonNull NetconfBindingAccessor acessor; private final @NonNull DeviceManagerOnfConfiguration pollAlarmConfig; + + private final NetconfNotifications notificationAccessor; /*----------------------------------------------------------------------------- * Construction @@ -79,7 +83,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { * @param acessor to manage device connection * @param serviceProvider to get devicemanager services */ - public ONFCoreNetworkElement12Basic(@NonNull NetconfAccessor acessor, + public ONFCoreNetworkElement12Basic(@NonNull NetconfBindingAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider, DeviceManagerOnfConfiguration configuration) { super(acessor); @@ -95,6 +99,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { this.eventListenerHandler = serviceProvider.getEventHandlingService(); this.dataProvider = serviceProvider.getDataProvider(); + this.notificationAccessor = acessor.getNotificationAccessor().get(); } @@ -202,7 +207,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { doRegisterEventListener(acessor.getMountpoint()); // Register netconf stream - acessor.registerNotificationsStream(NetconfAccessor.DefaultNotificationsStream); + notificationAccessor.registerNotificationsStream(NetconfAccessor.DefaultNotificationsStream); // Set core-model revision value in "core-model-capability" field setCoreModel(acessor.getNetconfNode()); diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java index 3ae2724e7..6cd6c949a 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java @@ -34,6 +34,7 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData; import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.PerformanceDataLtp; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.opendaylight.mdsal.binding.api.MountPoint; import org.opendaylight.mdsal.binding.api.NotificationService; import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId; @@ -82,7 +83,7 @@ public class ONFCoreNetworkElement12Microwave extends ONFCoreNetworkElement12Bas * @param serviceProvider to get services * @param onfMicrowaveModel handling ofmicrosoft model data */ - public ONFCoreNetworkElement12Microwave(@NonNull NetconfAccessor acessor, + public ONFCoreNetworkElement12Microwave(@NonNull NetconfBindingAccessor acessor, @NonNull DeviceManagerServiceProvider serviceProvider, DeviceManagerOnfConfiguration configuration, OnfMicrowaveModel onfMicrowaveModel) { diff --git a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java index deacab8f2..318741dd9 100644 --- a/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java +++ b/sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java @@ -23,6 +23,7 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne; import java.util.Optional; import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ONFCoreNetworkElementRepresentation; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor; +import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor; import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils; import org.opendaylight.mdsal.binding.api.DataBroker; import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; @@ -42,9 +43,9 @@ public abstract class ONFCoreNetworkElementBase implements AutoCloseable, ONFCor private final String mountPointNodeName; private final NodeId nodeId; private final DataBroker netconfNodeDataBroker; - private final NetconfAccessor acessor; + private final NetconfBindingAccessor acessor; - protected ONFCoreNetworkElementBase(NetconfAccessor acessor) { + protected ONFCoreNetworkElementBase(NetconfBindingAccessor acessor) { LOG.info("Create ONFCoreNetworkElementBase"); this.mountPointNodeName = acessor.getNodeId().getValue(); this.nodeId = acessor.getNodeId(); |