summaryrefslogtreecommitdiffstats
path: root/sdnr
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr')
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/feature/pom.xml2
-rwxr-xr-xsdnr/wt/devicemanager-adapter-manager/installer/pom.xml2
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/model/pom.xml2
-rwxr-xr-xsdnr/wt/devicemanager-adapter-manager/pom.xml2
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/pom.xml3
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/AdapterManagerNetworkElementFactory.java3
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/impl/DeviceManagerAdapterManagerImpl.java2
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-common.yang354
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/src/main/yang/nts-manager.yang202
-rw-r--r--sdnr/wt/devicemanager-adapter-manager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/adaptermanager/test/mock/NetconfAccessorMock.java31
-rw-r--r--sdnr/wt/devicemanager-onf/feature/pom.xml2
-rwxr-xr-xsdnr/wt/devicemanager-onf/installer/pom.xml2
-rw-r--r--sdnr/wt/devicemanager-onf/model/pom.xml2
-rwxr-xr-xsdnr/wt/devicemanager-onf/pom.xml2
-rw-r--r--sdnr/wt/devicemanager-onf/provider/pom.xml3
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/WrapperPTPModelRev170208.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/ONFCoreNetworkElement12Equipment.java7
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/WrapperEquipmentPacRev170402.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev170324.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev180907.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/WrapperMicrowaveModelRev181010.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/DeviceManagerOnfImpl.java2
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/ONFCoreNetworkElementFactory.java19
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Base.java3
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Basic.java11
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElement12Microwave.java3
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/ONFCoreNetworkElementBase.java5
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/equipment/test/TestONFCoreNetworkElement12Equipment.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev170324.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev180907.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/microwave/test/TestWrapperMicrowaveModelRev181010.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ifpac/test/TestWrapperPTPModelRev170208.java6
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/impl/test/TestONFCoreNetworkElementFactory.java22
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Basic.java35
-rw-r--r--sdnr/wt/devicemanager-onf/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/onf/ne/test/TestONFCoreNetworkElement12Microwave.java29
35 files changed, 689 insertions, 116 deletions
diff --git a/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml b/sdnr/wt/devicemanager-adapter-manager/feature/pom.xml
index 0c0372c3d..9c2ad3cc2 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 bccd5c375..59bfeff80 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 a265e9033..3b359e50f 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 52959576a..7bfff2871 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 c2bfbf69c..d13cede3d 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 db9fd94b1..0ed856fb1 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.ne.service.NetworkElement;
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 @@ public class AdapterManagerNetworkElementFactory implements NetworkElementFactor
@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 33ad9c0ed..3a7aa8f40 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 @@ public class DeviceManagerAdapterManagerImpl implements AutoCloseable {
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 000000000..ea7e60b91
--- /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 000000000..08214d52c
--- /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 91f5c431b..8a0694087 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 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.adaptermanager.test.mock;
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 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
/**
*/
-public class NetconfAccessorMock implements NetconfAccessor {
+public class NetconfAccessorMock implements NetconfBindingAccessor, NetconfNotifications {
private final NodeId nNodeId;
private final NetconfNode netconfNode;
@@ -109,4 +114,28 @@ public class NetconfAccessorMock implements NetconfAccessor {
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 ba535d72e..d5be5171b 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 e5cfe8fa2..7486d4393 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 fafc24c80..3e513b069 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 6a5c4ff34..4b60fa6ce 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 469deb861..ca0a4a410 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 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();
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 095446f0b..30cd7647a 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.ONFCore
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 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class TestONFCoreNetworkElement12Equipment {
- NetconfAccessor netconfAccessor;
+ NetconfBindingAccessor netconfAccessor;
Capabilities capabilities;
NetworkElementCoreData coreData;
FaultData faultData;
@@ -57,7 +57,7 @@ public class TestONFCoreNetworkElement12Equipment {
@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 96c3c757d..bee34b5b5 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.ifpac.microwave.Wrapper
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 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class TestWrapperMicrowaveModelRev170324 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -99,7 +99,7 @@ public class TestWrapperMicrowaveModelRev170324 {
@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 dec443519..4c4c9734a 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.onf.util.ONFLayerProtocolNa
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 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class TestWrapperMicrowaveModelRev180907 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -98,7 +98,7 @@ public class TestWrapperMicrowaveModelRev180907 {
@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 94f8e6c19..0259fea5e 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.onf.util.ONFLayerProtocolNa
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 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@SuppressWarnings("deprecation")
public class TestWrapperMicrowaveModelRev181010 {
- NetconfAccessor accessor;
+ NetconfBindingAccessor accessor;
DeviceManagerServiceProvider serviceProvider;
FaultData resultList;
UniversalId uid;
@@ -101,7 +101,7 @@ public class TestWrapperMicrowaveModelRev181010 {
@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 42f7de1d6..0694bcecc 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.Before;
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 @@ import static org.mockito.Mockito.*;
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 909a67edc..14bd1bd91 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 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.impl.test;
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.DeviceManagerOnfCo
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 @@ import org.opendaylight.yangtools.yang.common.QName;
public class TestONFCoreNetworkElementFactory {
- static NetconfAccessor accessor;
+ static NetconfBindingAccessor accessor;
static DeviceManagerServiceProvider serviceProvider;
static Capabilities capabilities;
static DataBroker dataBroker;
@@ -57,7 +58,7 @@ public class TestONFCoreNetworkElementFactory {
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 @@ public class TestONFCoreNetworkElementFactory {
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 @@ public class TestONFCoreNetworkElementFactory {
@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 @@ public class TestONFCoreNetworkElementFactory {
@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 @@ public class TestONFCoreNetworkElementFactory {
@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 027ad2405..0749823a2 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 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.test;
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 @@ public class TestONFCoreNetworkElement12Basic {
@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 @@ public class TestONFCoreNetworkElement12Basic {
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 @@ public class TestONFCoreNetworkElement12Basic {
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 5f101b031..3e743ca3b 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 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf.ne.test;
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.onf.ne.ONFCoreNetworkElemen
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 @@ public class TestONFCoreNetworkElement12Microwave {
@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 @@ public class TestONFCoreNetworkElement12Microwave {
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)));
}