Migrate devicemanager-adapter-manager and devicemanager-onf
Migrate devicemanager-adapter-manager and devicemanager-onf to Aluminium
Issue-ID: CCSDK-3133
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I172bd97c0a79f0ee80bf27326dc39b38e306102a
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
diff --git a/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml b/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml
index 0c0372c..9c2ad3c 100644
--- a/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml
+++ b/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-adapter-manager/installer/pom.xml b/sdnr/wt/devicemanager-adapter-manager/installer/pom.xml
index bccd5c3..59bfeff 100755
--- a/sdnr/wt/devicemanager-adapter-manager/installer/pom.xml
+++ b/sdnr/wt/devicemanager-adapter-manager/installer/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-adapter-manager/model/pom.xml b/sdnr/wt/devicemanager-adapter-manager/model/pom.xml
index a265e90..3b359e5 100644
--- a/sdnr/wt/devicemanager-adapter-manager/model/pom.xml
+++ b/sdnr/wt/devicemanager-adapter-manager/model/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-adapter-manager/pom.xml b/sdnr/wt/devicemanager-adapter-manager/pom.xml
index 5295957..7bfff28 100755
--- a/sdnr/wt/devicemanager-adapter-manager/pom.xml
+++ b/sdnr/wt/devicemanager-adapter-manager/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/pom.xml b/sdnr/wt/devicemanager-adapter-manager/provider/pom.xml
index c2bfbf6..d13cede 100644
--- a/sdnr/wt/devicemanager-adapter-manager/provider/pom.xml
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -47,7 +47,6 @@
</licenses>
<properties>
- <checkstyle.skip>true</checkstyle.skip> <!-- POM configuration -->
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<buildtime>${maven.build.timestamp} UTC</buildtime>
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/AdapterManagerNetworkElementFactory.java b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/AdapterManagerNetworkElementFactory.java
index db9fd94..0ed856f 100644
--- a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/AdapterManagerNetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/AdapterManagerNetworkElementFactory.java
@@ -24,6 +24,7 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.network.topology.simulator.rev191025.SimulatorStatus;
+import org.opendaylight.yang.gen.v1.urn.o.ran.sc.params.xml.ns.yang.nts.manager.rev201006.simulation.NetworkFunctions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -33,7 +34,7 @@
@Override
public Optional<NetworkElement> create(NetconfAccessor acessor, DeviceManagerServiceProvider serviceProvider) {
- if (acessor.getCapabilites().isSupportingNamespace(SimulatorStatus.QNAME)) {
+ if (acessor.getCapabilites().isSupportingNamespace(SimulatorStatus.QNAME) || acessor.getCapabilites().isSupportingNamespace(NetworkFunctions.QNAME)) {
log.info("Create device {} ", NtsNetworkElement.class.getName());
return Optional.of(new NtsNetworkElement(acessor, serviceProvider.getDataProvider()));
}
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/DeviceManagerAdapterManagerImpl.java b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/DeviceManagerAdapterManagerImpl.java
index 33ad9c0..3a7aa8f 100644
--- a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/DeviceManagerAdapterManagerImpl.java
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/DeviceManagerAdapterManagerImpl.java
@@ -48,7 +48,7 @@
LOG.info("Session Initiated start {}", APPLICATION_NAME);
- resAdapterManager = netconfNetworkElementService.registerNetworkElementFactory(new AdapterManagerNetworkElementFactory());
+ resAdapterManager = netconfNetworkElementService.registerBindingNetworkElementFactory(new AdapterManagerNetworkElementFactory());
netconfNetworkElementService.writeToEventLog(APPLICATION_NAME, "startup", "done");
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-common.yang b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-common.yang
new file mode 100644
index 0000000..ea7e60b
--- /dev/null
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-common.yang
@@ -0,0 +1,354 @@
+module nts-common {
+ yang-version 1.1;
+ namespace "urn:o-ran-sc:params:xml:ns:yang:nts:common";
+ prefix ntsc;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ organization
+ "O-RAN-SC";
+ contact
+ " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
+ Editors:
+ Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
+ Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
+ Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
+ description
+ "This module contains common yang definitions YANG definitions for the Network Topology Simulator.";
+
+ revision 2020-11-20 {
+ description
+ "Add feature-type for the Web cut through feature.";
+ reference
+ "O-RAN-SC SIM project";
+ }
+
+ revision 2020-10-22 {
+ description
+ "Add feature-type for the NETCONF Call Home feature.";
+ reference
+ "O-RAN-SC SIM project";
+ }
+
+ revision 2020-10-13 {
+ description
+ "Add feature-type typedef containing the features that can be activated in the Network Function.";
+ reference
+ "O-RAN-SC SIM project";
+ }
+
+ revision 2020-09-07 {
+ description
+ "Initial revision for the Network Topology Simulator - Next Generation common types.";
+ reference
+ "O-RAN-SC SIM project";
+ }
+
+ feature faults-status {
+ description
+ "This means that the server supports reporting back the number of faults that were generated";
+ }
+
+ typedef authentication-method-type {
+ type enumeration {
+ enum no-auth {
+ description
+ "no security (http)";
+ }
+ enum cert-only {
+ description
+ "auth by certificate (https)";
+ }
+ enum basic-auth {
+ description
+ "auth by basic auth username and password (https)";
+ }
+ enum cert-basic-auth {
+ description
+ "auth by certificate and basic auth username / password (https)";
+ }
+ }
+ description
+ "The authentication method for VES messaging.";
+ }
+
+ typedef feature-type {
+ type bits {
+ bit ves-file-ready {
+ position 0;
+ description
+ "Controls the ves-file-ready feature.";
+ }
+ bit ves-heartbeat {
+ position 1;
+ description
+ "Controls the ves-heartbeat feature.";
+ }
+ bit ves-pnf-registration {
+ position 2;
+ description
+ "Controls the ves-pnf-registration feature.";
+ }
+ bit manual-notification-generation {
+ position 3;
+ description
+ "Controls the manual notification generation feature.";
+ }
+ bit netconf-call-home {
+ position 4;
+ description
+ "Controls the NETCONF Call Home feature.";
+ }
+ bit web-cut-through {
+ position 5;
+ description
+ "Controls the Web Cut Through feature.";
+ }
+ }
+ description
+ "Describes the features that can be enabled/disabled in the Network Function.";
+ }
+
+ identity NTS_FUNCTION_TYPE_BASE {
+ description
+ "The reference of each identity represents the name of the associated docker image.";
+ }
+
+ grouping mount-point-details-g {
+ leaf mount-point-addressing-method {
+ type enumeration {
+ enum host-mapping {
+ description
+ "Uses IP and port mapped to the host machine to address the nework function.";
+ }
+ enum docker-mapping {
+ description
+ "Uses Docker IP and port to address the nework function.";
+ }
+ }
+ default docker-mapping;
+ description
+ "Specifies how to address the simulated network function: via the host machine or via docker.";
+ }
+ description
+ "Groups details about mount point";
+ }
+
+ grouping fault-delay-period-g {
+ list fault-delay-list {
+ key index;
+ ordered-by user;
+ leaf index {
+ type uint16;
+ description
+ "The index of the list.";
+ }
+ leaf delay-period {
+ type uint16;
+ units s;
+ description
+ "The amount of seconds before the next event.";
+ }
+ description
+ "The list defining the pattern for generating events.";
+ }
+ description
+ "For reusing the same fault-delay-period.";
+ }
+
+ grouping fault-count-g {
+ container fault-count {
+ if-feature faults-status;
+ config false;
+ leaf normal {
+ type uint32;
+ description
+ "Number of normal (non-alarmed) events.";
+ }
+ leaf warning {
+ type uint32;
+ description
+ "Number of warning events.";
+ }
+ leaf minor {
+ type uint32;
+ description
+ "Number of minor events.";
+ }
+ leaf major {
+ type uint32;
+ description
+ "Number of major events.";
+ }
+ leaf critical {
+ type uint32;
+ description
+ "Number of critical events.";
+ }
+ description
+ "Container which groups the number of fault events, by severity.";
+ }
+ description
+ "Grouping for counting the fault events, grouped by severity.";
+ }
+
+ grouping faults-g {
+ container fault-generation {
+ uses fault-delay-period-g;
+ uses fault-count-g;
+ description
+ "Groups the fault generation configuration and status.";
+ }
+ description
+ "Grouping for fault generation";
+ }
+
+ grouping faults-enabled-g {
+ leaf faults-enabled {
+ type boolean;
+ description
+ "For enabling the fault generation.";
+ }
+ description
+ "Groups the enabling of faults.";
+ }
+
+ grouping netconf-config-g {
+ container netconf {
+ uses faults-enabled-g;
+ leaf call-home {
+ type boolean;
+ description
+ "For enabling the NETCONF Call Home feature. If set to 'true', each simulated device, when booting up, will try to Call Home to the SDN Controller.";
+ }
+ description
+ "Container for describing the NETCONF details.";
+ }
+ description
+ "Groups the configuration and status of NETCONF Fault notifications.";
+ }
+
+ grouping ves-config-g {
+ container ves {
+ uses faults-enabled-g;
+ leaf pnf-registration {
+ type boolean;
+ description
+ "For enabling the PNF Registration messages. If set to 'true', each simulated device, when booting up, will send a PNF Registration message to the VES Collector.";
+ }
+ leaf heartbeat-period {
+ type uint16;
+ description
+ "The number of seconds between VES heartbeat messages.";
+ }
+ description
+ "Container for describing the VES details.";
+ }
+ description
+ "Groups the configuration and status of VES Fault notifications.";
+ }
+
+ grouping controller-g {
+ leaf controller-ip {
+ type inet:ip-address;
+ description
+ "The IP address of the SDN Controller.";
+ }
+ leaf controller-port {
+ type inet:port-number;
+ description
+ "The port exposed by the SDN Controller.";
+ }
+ leaf controller-netconf-call-home-port {
+ type inet:port-number;
+ description
+ "The port exposed by the SDN Controller for NETCONF Call Home.";
+ }
+ leaf controller-username {
+ type string;
+ description
+ "The username for accessing the SDN Controller.";
+ }
+ leaf controller-password {
+ type string;
+ description
+ "The password for accessing the SDN Controller.";
+ }
+ description
+ "Groups information about the SDN Controller.";
+ }
+
+ grouping ves-endpoint-g {
+ leaf ves-endpoint-protocol {
+ type enumeration {
+ enum http {
+ description
+ "HTTP protocol will be used to connect to the VES Collector.";
+ }
+ enum https {
+ description
+ "HTTPS protocol will be used to connect to the VES Collector.";
+ }
+ }
+ default https;
+ description
+ "The protocol (HTTP / HTTPS) to be used to address the VES Collector.";
+ }
+ leaf ves-endpoint-ip {
+ type inet:ip-address;
+ description
+ "The IP address of the VES Collector.";
+ }
+ leaf ves-endpoint-port {
+ type inet:port-number;
+ description
+ "The port exposed by the VES Collector.";
+ }
+ leaf ves-endpoint-auth-method {
+ type authentication-method-type;
+ default "no-auth";
+ description
+ "The type of the authentication to be used with the VES Collector.";
+ }
+ leaf ves-endpoint-username {
+ type string;
+ description
+ "The username for accessing the VES Collector.";
+ }
+ leaf ves-endpoint-password {
+ type string;
+ description
+ "The password for accessing the VES Collector.";
+ }
+ leaf ves-endpoint-certificate {
+ type string;
+ description
+ "The Certificate to be used to authenticate to the VES Collector.";
+ }
+ description
+ "Groups information about the VES Collector.";
+ }
+
+ grouping rpc-status-g {
+ leaf status {
+ type enumeration {
+ enum SUCCESS {
+ description
+ "The RPC was successfully invoked.";
+ }
+ enum ERROR {
+ description
+ "An error was encountered when invoking the RPC.";
+ }
+ }
+ mandatory true;
+ description
+ "The status of the RPC.";
+ }
+ description
+ "RPC output grouping.";
+ }
+
+} //end module
\ No newline at end of file
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-manager.yang b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-manager.yang
new file mode 100644
index 0000000..08214d5
--- /dev/null
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-manager.yang
@@ -0,0 +1,202 @@
+module nts-manager {
+ yang-version 1.1;
+ namespace "urn:o-ran-sc:params:xml:ns:yang:nts:manager";
+ prefix nts-mng;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+
+ import nts-common {
+ prefix ntsc;
+ revision-date 2020-11-20;
+ }
+
+ organization
+ "O-RAN-SC";
+ contact
+ " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
+ Editors:
+ Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
+ Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
+ Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
+ description
+ "This module contains YANG definitions for the Network Topology Simulator - Manager.";
+
+ revision 2020-10-06 {
+ description
+ "Initial revision for the Network Topology Simulator - Next Generation";
+ reference
+ "O-RAN-SC SIM project";
+ }
+
+ typedef percent {
+ type decimal64 {
+ fraction-digits 2;
+ range "0 .. 100";
+ }
+ description
+ "Percentage";
+ }
+
+ grouping instance-g {
+ leaf name {
+ type string;
+ description
+ "The name of the running instance. It is the same as the docker container name which exposes this network function.";
+ }
+ container networking {
+ leaf docker-ip {
+ type inet:ip-address;
+ description
+ "The IP address of the docker container implementing the network function instance.";
+ }
+ leaf-list docker-port {
+ type inet:port-number;
+ description
+ "The ports which are exposed inside the docker container implementing the network function instance.";
+ }
+ leaf host-ip {
+ type inet:ip-address;
+ description
+ "The Host machine IP address pointing to the docker container implementing the network function instance.";
+ }
+ leaf-list host-port {
+ type inet:port-number;
+ description
+ "The Host machine ports mapped to the docker container implementing the network function instance.";
+ }
+ description
+ "Groups the details about networking information.";
+ }
+ description
+ "An instance of a network function which is running. The equivalent on the host machine is a docker container.";
+ }
+ grouping network-function-g {
+ leaf function-type {
+ type identityref {
+ base ntsc:NTS_FUNCTION_TYPE_BASE;
+ }
+ description "Type of network function to be simulated.";
+ }
+ leaf started-instances {
+ type uint16;
+ mandatory true;
+ description
+ "How many instances of this type are started.";
+ }
+ leaf mounted-instances {
+ type uint16;
+ must '. <= ../started-instances' {
+ error-message
+ "The number of mounted instances cannot be greater that the number of started instances.";
+ }
+ mandatory true;
+ description
+ "How many instances of this type are mounted in the SDN Controller.";
+ }
+
+ uses ntsc:mount-point-details-g;
+
+ leaf docker-instance-name {
+ type string;
+ mandatory true;
+ description
+ "The prefix of each docker container being started.";
+ }
+
+ leaf docker-version-tag {
+ type string;
+ mandatory true;
+ description
+ "The version tag of the docker image to be started.";
+ }
+
+ leaf docker-repository {
+ type string;
+ mandatory true;
+ description
+ "The prefix containing the docker repository information, if needed.";
+ }
+ uses ntsc:faults-g;
+ uses ntsc:netconf-config-g;
+ uses ntsc:ves-config-g;
+ container instances {
+ config false;
+ list instance {
+ key "name";
+ uses ntsc:mount-point-details-g;
+ uses instance-g;
+ description
+ "Describes a running instance.";
+ }
+ description
+ "Groups details about instances which are running.";
+ }
+ description
+ "Contains all the details of a simulated device.";
+ }
+ grouping simulation-information-g {
+ leaf base-port {
+ type inet:port-number;
+ config false;
+ description
+ "The base Host machine port from where the simulation can allocate ports incrementally.";
+ }
+ leaf ssh-connections {
+ type uint8;
+ config false;
+ description
+ "The number of SSH Endpoints each network function instance exposes.";
+ }
+ leaf tls-connections {
+ type uint8;
+ config false;
+ description
+ "The number of TLS Endpoints each network function instance exposes.";
+ }
+ leaf cpu-usage {
+ type percent;
+ config false;
+ description
+ "Specifies the CPU load generated by the simulation.";
+ }
+ leaf mem-usage {
+ type uint32;
+ config false;
+ description
+ "Specifies the RAM in MB used by the simulation.";
+ }
+ description
+ "Groups information about the simulation status.";
+ }
+
+ container simulation {
+ container network-functions {
+ list network-function {
+ key "function-type";
+ unique "docker-instance-name";
+ uses network-function-g;
+ description
+ "List containing different simulated network function types and their details.";
+ }
+ description
+ "Container which encompasses all simulated network functions.";
+ }
+ container sdn-controller {
+ uses ntsc:controller-g;
+ description
+ "Groups details about the SDN Controller.";
+ }
+ container ves-endpoint {
+ uses ntsc:ves-endpoint-g;
+ description
+ "Groups details about the VES Collector endpoint.";
+ }
+ uses simulation-information-g;
+ description
+ "Root level container which controls the NTS.";
+ }
+
+
+} //end module
\ No newline at end of file
diff --git a/sdnr/wt/devicemanager-adapter-manager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/test/mock/NetconfAccessorMock.java b/sdnr/wt/devicemanager-adapter-manager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/test/mock/NetconfAccessorMock.java
index 91f5c43..8a06940 100644
--- a/sdnr/wt/devicemanager-adapter-manager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/test/mock/NetconfAccessorMock.java
+++ b/sdnr/wt/devicemanager-adapter-manager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/test/mock/NetconfAccessorMock.java
@@ -19,9 +19,14 @@
import com.google.common.util.concurrent.ListenableFuture;
import java.util.List;
+import java.util.Optional;
+
import org.eclipse.jdt.annotation.NonNull;
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.NetconfDomAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.binding.api.MountPoint;
@@ -35,7 +40,7 @@
/**
*/
-public class NetconfAccessorMock implements NetconfAccessor {
+public class NetconfAccessorMock implements NetconfBindingAccessor, NetconfNotifications {
private final NodeId nNodeId;
private final NetconfNode netconfNode;
@@ -109,4 +114,28 @@
return null;
}
+ @Override
+ public Optional<NetconfBindingAccessor> getNetconfBindingAccessor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Optional<NetconfDomAccessor> getNetconfDomAccessor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public Optional<NetconfNotifications> getNotificationAccessor() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public boolean isNotificationsSupported() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
diff --git a/sdnr/wt/devicemanager-onf/feature/pom.xml b/sdnr/wt/devicemanager-onf/feature/pom.xml
index ba535d7..d5be517 100644
--- a/sdnr/wt/devicemanager-onf/feature/pom.xml
+++ b/sdnr/wt/devicemanager-onf/feature/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>single-feature-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-onf/installer/pom.xml b/sdnr/wt/devicemanager-onf/installer/pom.xml
index e5cfe8f..7486d43 100755
--- a/sdnr/wt/devicemanager-onf/installer/pom.xml
+++ b/sdnr/wt/devicemanager-onf/installer/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-onf/model/pom.xml b/sdnr/wt/devicemanager-onf/model/pom.xml
index fafc24c..3e513b0 100644
--- a/sdnr/wt/devicemanager-onf/model/pom.xml
+++ b/sdnr/wt/devicemanager-onf/model/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-onf/pom.xml b/sdnr/wt/devicemanager-onf/pom.xml
index 6a5c4ff..4b60fa6 100755
--- a/sdnr/wt/devicemanager-onf/pom.xml
+++ b/sdnr/wt/devicemanager-onf/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>odlparent-lite</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
diff --git a/sdnr/wt/devicemanager-onf/provider/pom.xml b/sdnr/wt/devicemanager-onf/provider/pom.xml
index 469deb8..ca0a4a4 100644
--- a/sdnr/wt/devicemanager-onf/provider/pom.xml
+++ b/sdnr/wt/devicemanager-onf/provider/pom.xml
@@ -29,7 +29,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -47,7 +47,6 @@
</licenses>
<properties>
- <checkstyle.skip>true</checkstyle.skip> <!-- POM configuration -->
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>
<buildtime>${maven.build.timestamp} UTC</buildtime>
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 f1ddbe7..a0813ee 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.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 @@
* 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 @@
}
@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 f32acb4..0c51c5e 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.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 @@
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 c93c80f..d0b4cc5 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.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 @@
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 ff23dfe..12c8b54 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.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 @@
private final NotificationService microwaveModelListener;
- private final NetconfAccessor acessor;
+ private final NetconfBindingAccessor acessor;
private final TransactionUtils genericTransactionUtils;
private final FaultService faultService;
@@ -97,7 +98,7 @@
/**
* @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 4402b86..653a786 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.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 @@
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 @@
* @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 299ed14..a1f71c5 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.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 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 @@
* @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 b4900b5..10ee242 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 @@
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 bcfc3e0..06558ad 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.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 @@
@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 30897da..af2b240 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.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 @@
* 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 f48eb60..3c6140d 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.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 @@
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 @@
* @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 @@
this.eventListenerHandler = serviceProvider.getEventHandlingService();
this.dataProvider = serviceProvider.getDataProvider();
+ this.notificationAccessor = acessor.getNotificationAccessor().get();
}
@@ -202,7 +207,7 @@
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 3ae2724..6cd6c94 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.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 @@
* @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 deacab8..318741d 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 @@
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 @@
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();
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
index 095446f..30cd764 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java
@@ -32,7 +32,7 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.equipment.WrapperEquipmentPacRev170402;
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.TransactionUtils;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -45,7 +45,7 @@
public class TestONFCoreNetworkElement12Equipment {
- NetconfAccessor netconfAccessor;
+ NetconfBindingAccessor netconfAccessor;
Capabilities capabilities;
NetworkElementCoreData coreData;
FaultData faultData;
@@ -57,7 +57,7 @@
@Before
public void init() throws Exception {
- netconfAccessor = mock(NetconfAccessor.class);
+ netconfAccessor = mock(NetconfBindingAccessor.class);
capabilities = mock(Capabilities.class);
coreData = mock(NetworkElementCoreData.class);
faultData = mock(FaultData.class);
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java
index 96c3c75..bee34b5 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java
@@ -32,7 +32,7 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.util.ONFLayerProtocolName;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
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.binding.api.DataBroker;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -82,7 +82,7 @@
public class TestWrapperMicrowaveModelRev170324 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -99,7 +99,7 @@
@Before
public void init() {
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
resultList = mock(FaultData.class);
transactionUtils = mock(TransactionUtils.class);
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java
index dec4435..4c4c973 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java
@@ -33,7 +33,7 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
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.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;
@@ -82,7 +82,7 @@
public class TestWrapperMicrowaveModelRev180907 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -98,7 +98,7 @@
@Before
public void init() {
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
resultList = mock(FaultData.class);
transactionUtils = mock(TransactionUtils.class);
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java
index 94f8e6c..0259fea 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java
@@ -33,7 +33,7 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
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.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.mdsal.common.api.LogicalDatastoreType;
@@ -84,7 +84,7 @@
@SuppressWarnings("deprecation")
public class TestWrapperMicrowaveModelRev181010 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -101,7 +101,7 @@
@Before
public void init() {
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
resultList = mock(FaultData.class);
transactionUtils = mock(TransactionUtils.class);
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java
index 42f7de1..0694bce 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java
@@ -23,7 +23,7 @@
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.WrapperPTPModelRev170208;
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.TransactionUtils;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
@@ -48,14 +48,14 @@
public class TestWrapperPTPModelRev170208 {
private static final String NODEID = "node1";
- NetconfAccessor netconfAccessor;
+ NetconfBindingAccessor netconfAccessor;
Capabilities capabilities;
TransactionUtils transactionUtils;
DataBroker dataBroker;
@Before
public void init() {
- netconfAccessor = mock(NetconfAccessor.class);
+ netconfAccessor = mock(NetconfBindingAccessor.class);
capabilities = mock(Capabilities.class);
dataBroker = mock(DataBroker.class);
transactionUtils = mock(TransactionUtils.class);
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java
index 909a67e..14bd1bd 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java
@@ -20,9 +20,9 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-
import java.io.File;
import java.io.IOException;
+import java.util.Optional;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
@@ -35,7 +35,8 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.ONFCoreNetworkElementFactory;
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.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
@@ -43,7 +44,7 @@
public class TestONFCoreNetworkElementFactory {
- static NetconfAccessor accessor;
+ static NetconfBindingAccessor accessor;
static DeviceManagerServiceProvider serviceProvider;
static Capabilities capabilities;
static DataBroker dataBroker;
@@ -57,7 +58,7 @@
public static void init() throws InterruptedException, IOException {
capabilities = mock(Capabilities.class);
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
dataBroker = mock(DataBroker.class);
@@ -68,8 +69,14 @@
when(accessor.getCapabilites()).thenReturn(capabilities);
//when(serviceProvider.getDataProvider()).thenReturn(dataProvider);
nNodeId = new NodeId("nSky");
- when(accessor.getNodeId()).thenReturn(nNodeId);
+ NetconfBindingAccessor bindingAccessor = mock(NetconfBindingAccessor.class);
+ when(bindingAccessor.getNodeId()).thenReturn(nNodeId);
+ when(bindingAccessor.getNotificationAccessor()).thenReturn(Optional.of(mock(NetconfNotifications.class)));
+ when(bindingAccessor.getCapabilites()).thenReturn(capabilities);
+ when(accessor.getNodeId()).thenReturn(nNodeId);
+ when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(bindingAccessor));
+ when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true);
}
@@ -80,9 +87,6 @@
@Test
public void testCreateMWModelRev170324() throws Exception {
-
-
- when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME))
.thenReturn(true);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME))
@@ -95,7 +99,6 @@
@Test
public void testCreateMWModelRev180907() throws Exception {
- when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME))
.thenReturn(false);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME))
@@ -108,7 +111,6 @@
@Test
public void testCreateMWModelRev181010() throws Exception {
- when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElement.QNAME)).thenReturn(true);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev170324.QNAME))
.thenReturn(false);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(WrapperMicrowaveModelRev180907.QNAME))
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
index 027ad24..0749823 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java
@@ -19,46 +19,29 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-
-import java.util.List;
-import org.eclipse.jdt.annotation.Nullable;
+import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.OnfMicrowaveModel;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.DeviceManagerOnfConfiguration;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Basic;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.ONFCoreNetworkElement12Microwave;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.EquipmentService;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.AdministrativeControl;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.AdministrativeState;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.LifecycleState;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.OperationalState;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.extension.g.Extension;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.global._class.g.LocalId;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.label.g.Label;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.name.g.Name;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.network.element.Fd;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.network.element.Ltp;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.onf.core.model.conditional.packages.rev170402.NetworkElementPac;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogEntity;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SourceType;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class TestONFCoreNetworkElement12Basic {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
Capabilities capabilities;
TransactionUtils transactionUtils;
@@ -73,7 +56,7 @@
@Before
public void init() {
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
capabilities = mock(Capabilities.class);
transactionUtils = mock(TransactionUtils.class);
@@ -90,6 +73,10 @@
when(accessor.getNodeId()).thenReturn(nNodeId);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true);
when(accessor.getTransactionUtils()).thenReturn(transactionUtils);
+ when(accessor.getNotificationAccessor()).thenReturn(Optional.of(mock(NetconfNotifications.class)));
+ NetconfBindingAccessor bindingAccessor = mock(NetconfBindingAccessor.class);
+ when(bindingAccessor.getNodeId()).thenReturn(nNodeId);
+ when(accessor.getNetconfBindingAccessor()).thenReturn(Optional.of(bindingAccessor));
}
@@ -105,7 +92,7 @@
EventlogEntity eventlogEntity = mock(EventlogEntity.class);
when(eventlogEntity.getObjectId()).thenReturn("ABCD");
when(eventlogEntity.getAttributeName()).thenReturn("/equipment-pac/equipment-current-problems");
-
+
onfCoreNetworkElement12MW.notificationActor(eventlogEntity);
}
diff --git a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
index 5f101b0..3e743ca 100644
--- a/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
+++ b/sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java
@@ -19,9 +19,7 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-
-import java.util.List;
-import org.eclipse.jdt.annotation.Nullable;
+import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ifpac.microwave.OnfMicrowaveModel;
@@ -30,34 +28,20 @@
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.EquipmentService;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.FaultService;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
-import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.Capabilities;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfBindingAccessor;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfNotifications;
+import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.TransactionUtils;
import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.AdministrativeControl;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.AdministrativeState;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.LifecycleState;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.NetworkElement;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.OperationalState;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.UniversalId;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.extension.g.Extension;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.global._class.g.LocalId;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.label.g.Label;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.name.g.Name;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.network.element.Fd;
-import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.core.model.rev170320.network.element.Ltp;
import org.opendaylight.yang.gen.v1.urn.onf.params.xml.ns.yang.onf.core.model.conditional.packages.rev170402.NetworkElementPac;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.EventlogEntity;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SourceType;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
-import org.opendaylight.yangtools.yang.binding.Augmentation;
-import org.opendaylight.yangtools.yang.binding.DataContainer;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class TestONFCoreNetworkElement12Microwave {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
Capabilities capabilities;
TransactionUtils transactionUtils;
@@ -72,7 +56,7 @@
@Before
public void init() {
- accessor = mock(NetconfAccessor.class);
+ accessor = mock(NetconfBindingAccessor.class);
serviceProvider = mock(DeviceManagerServiceProvider.class);
capabilities = mock(Capabilities.class);
transactionUtils = mock(TransactionUtils.class);
@@ -89,6 +73,7 @@
when(accessor.getNodeId()).thenReturn(nNodeId);
when(accessor.getCapabilites().isSupportingNamespaceAndRevision(NetworkElementPac.QNAME)).thenReturn(true);
when(accessor.getTransactionUtils()).thenReturn(transactionUtils);
+ when(accessor.getNotificationAccessor()).thenReturn(Optional.of(mock(NetconfNotifications.class)));
}