diff options
author | KAPIL SINGAL <ks220y@att.com> | 2021-07-30 19:44:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-07-30 19:44:41 +0000 |
commit | 0b829aa95b44134cd0b5574d32d8275fdb6b2c55 (patch) | |
tree | 01eaa02c199f285f08b062476cf5c01ca01f1b24 /sdnr/wt/devicemanager-onap/onf12 | |
parent | 2eb77b2b6ee879a099afc1a2e5bb0e68ab1b9b42 (diff) | |
parent | df5869629e4ffd6cb0b1ccb81c1fe17cdd73f851 (diff) |
Merge "devicemanager-core refactoring and support for TLS mountpoints using data-provider interface"
Diffstat (limited to 'sdnr/wt/devicemanager-onap/onf12')
4 files changed, 22 insertions, 15 deletions
diff --git a/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml b/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml index 41604dacb..de83dc9bf 100644 --- a/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml +++ b/sdnr/wt/devicemanager-onap/onf12/feature/pom.xml @@ -41,6 +41,11 @@ <name>ccsdk-features :: ${project.artifactId}</name> <dependencies> + <!-- <dependency> --> + <!-- <groupId>${project.groupId}</groupId> --> + <!-- <artifactId>sdnr-wt-devicemanager-onap-onf-model</artifactId> --> + <!-- <version>${project.version}</version> --> + <!-- </dependency> --> <dependency> <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-devicemanager-onap-onf12-provider</artifactId> diff --git a/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml b/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml index 7107e184d..f347d7363 100755 --- a/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml +++ b/sdnr/wt/devicemanager-onap/onf12/installer/pom.xml @@ -47,7 +47,7 @@ <dependencies> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>${application.name}-feature</artifactId> <version>${project.version}</version> <type>xml</type> @@ -60,7 +60,7 @@ </exclusions> </dependency> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>${application.name}-provider</artifactId> <version>${project.version}</version> </dependency> diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml b/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml index cce5bdbaf..94c836cfa 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml +++ b/sdnr/wt/devicemanager-onap/onf12/provider/pom.xml @@ -68,7 +68,7 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>org.onap.ccsdk.features.sdnr.wt</groupId> + <groupId>${project.groupId}</groupId> <artifactId>sdnr-wt-devicemanager-core-model</artifactId> <version>${project.version}</version> <scope>provided</scope> diff --git a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java index a7a09fccb..9bd1ddb93 100644 --- a/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java +++ b/sdnr/wt/devicemanager-onap/onf12/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java @@ -29,11 +29,11 @@ import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.MaintenanceService; 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.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; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; import org.opendaylight.yangtools.yang.common.QName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -66,7 +66,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { private final @NonNull DataProvider dataProvider; - private final @NonNull String mountPointNodeName; + private final @NonNull NodeId mountPointNodeId; private final @NonNull NetconfBindingAccessor acessor; private final @NonNull DeviceManagerOnfConfiguration pollAlarmConfig; @@ -84,7 +84,7 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { @NonNull DeviceManagerServiceProvider serviceProvider, DeviceManagerOnfConfiguration configuration) { super(acessor); - this.mountPointNodeName = acessor.getNodeId().getValue(); + this.mountPointNodeId = acessor.getNodeId(); this.acessor = acessor; this.pollAlarmConfig = configuration; @@ -200,8 +200,10 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { // Setup microwaveEventListener for notification service doRegisterEventListener(acessor.getMountpoint()); - // Register netconf stream - acessor.registerNotificationsStream(NetconfAccessor.DefaultNotificationsStream); + if (acessor.isNotificationsRFC5277Supported()) { + // Register default (NETCONF) stream + acessor.registerNotificationsStream(); + } // Set core-model revision value in "core-model-capability" field setCoreModel(acessor.getNetconfNode()); @@ -211,17 +213,17 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { // create automatic empty maintenance entry into db before reading and listening // for problems - maintenanceService.createIfNotExists(mountPointNodeName); + maintenanceService.createIfNotExists(mountPointNodeId); - aaiProviderClient.onDeviceRegistered(mountPointNodeName); + aaiProviderClient.onDeviceRegistered(mountPointNodeId); // -- Register NE to performance manager - performanceManager.registration(mountPointNodeName, this); + performanceManager.registration(mountPointNodeId, this); //events will be already pushed by base devmgr (needs more clarification SDNC-1123) //eventListenerHandler.registration(mountPointNodeName, acessor.getNetconfNode()); //LOG.debug("refresh necon entry for {} with type {} not",mountPointNodeName,this.getDeviceType()); //eventListenerHandler.connectIndication(mountPointNodeName, getDeviceType()); - LOG.info("Starting Event listener finished. Added Netconf device:{} type:{}", mountPointNodeName, + LOG.info("Starting Event listener finished. Added Netconf device:{} type:{}", mountPointNodeId, getDeviceType()); } @@ -229,9 +231,9 @@ public class ONFCoreNetworkElement12Basic extends ONFCoreNetworkElement12Base { @Override public void deregister() { - maintenanceService.deleteIfNotRequired(mountPointNodeName); - performanceManager.deRegistration(mountPointNodeName); - aaiProviderClient.onDeviceUnregistered(mountPointNodeName); + maintenanceService.deleteIfNotRequired(mountPointNodeId); + performanceManager.deRegistration(mountPointNodeId); + aaiProviderClient.onDeviceUnregistered(mountPointNodeId); faultService.removeAllCurrentProblemsOfNode(acessor.getNodeId()); } |