aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager/model
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/devicemanager/model')
-rw-r--r--sdnr/wt/devicemanager/model/pom.xml10
-rw-r--r--sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/ne/factory/NetworkElementFactory.java16
-rw-r--r--sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/DeviceManagerServiceProvider.java5
-rw-r--r--sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EquipmentService.java7
-rw-r--r--sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java23
-rw-r--r--sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java18
-rw-r--r--sdnr/wt/devicemanager/model/src/main/yang/devicemanager.yang134
7 files changed, 187 insertions, 26 deletions
diff --git a/sdnr/wt/devicemanager/model/pom.xml b/sdnr/wt/devicemanager/model/pom.xml
index 129bdf31d..b5e24b21c 100644
--- a/sdnr/wt/devicemanager/model/pom.xml
+++ b/sdnr/wt/devicemanager/model/pom.xml
@@ -64,10 +64,20 @@
</dependency>
<dependency>
<groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
+ <artifactId>sdnr-wt-websocketmanager-model</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.onap.ccsdk.features.sdnr.wt</groupId>
<artifactId>sdnr-wt-netconfnode-state-service-model</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.binding.model.ietf</groupId>
+ <artifactId>rfc6991-ietf-yang-types</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/ne/factory/NetworkElementFactory.java b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/ne/factory/NetworkElementFactory.java
index 4b3881e0b..c28b9245b 100644
--- a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/ne/factory/NetworkElementFactory.java
+++ b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/ne/factory/NetworkElementFactory.java
@@ -26,7 +26,21 @@ import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfAccessor;
public interface NetworkElementFactory {
- Optional<NetworkElement> create(@NonNull NetconfAccessor acessor,
+ /**
+ * Called after connect of device. Decide if devicemanger should be started to manage device.
+ * @param accessor function to access device and get information from mountpoint
+ * @param serviceProvider provides base device manager services.
+ * @return Empty or NetworkElement object
+ */
+ Optional<NetworkElement> create(@NonNull NetconfAccessor accessor,
@NonNull DeviceManagerServiceProvider serviceProvider);
+ /**
+ * Called directly after factory registration to allow initialization
+ * @param serviceProvider provides base device manager services.
+ */
+ default void init(DeviceManagerServiceProvider serviceProvider) {
+ }
+
+
}
diff --git a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/DeviceManagerServiceProvider.java b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/DeviceManagerServiceProvider.java
index 22a0a1370..163f80839 100644
--- a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/DeviceManagerServiceProvider.java
+++ b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/DeviceManagerServiceProvider.java
@@ -20,6 +20,7 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
import org.eclipse.jdt.annotation.NonNull;
import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
import org.onap.ccsdk.features.sdnr.wt.dataprovider.model.DataProvider;
+import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService;
public interface DeviceManagerServiceProvider {
@@ -31,6 +32,10 @@ public interface DeviceManagerServiceProvider {
@NonNull
NotificationService getNotificationService();
+ /** @return Get ws notification service **/
+ @NonNull
+ WebsocketManagerService getWebsocketService();
+
/** @return Get service for handling fault **/
@NonNull
FaultService getFaultService();
diff --git a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EquipmentService.java b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EquipmentService.java
index 10a3aa670..323140191 100644
--- a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EquipmentService.java
+++ b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EquipmentService.java
@@ -19,8 +19,8 @@
package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
import org.eclipse.jdt.annotation.NonNull;
-import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerService;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.EquipmentData;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
* @author herbert
@@ -30,9 +30,10 @@ public interface EquipmentService extends DeviceManagerService {
/**
* Write equipment to database
- *
+ *
+ * @param nodeId
* @param equipment with all equipment entities (card, subrack) of device
*/
- void writeEquipment(@NonNull EquipmentData equipment);
+ void writeEquipment(NodeId nodeId, @NonNull EquipmentData equipment);
}
diff --git a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
index 9a4c89d4a..f414b4b15 100644
--- a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
+++ b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
@@ -18,11 +18,8 @@
package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.FaultlogEntity;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType;
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
@@ -32,27 +29,15 @@ public interface FaultService extends DeviceManagerService {
/**
* Notify fault information to devicemanager
- *
+ *
* @param faultNotification to send
*/
void faultNotification(@NonNull FaultlogEntity faultNotification);
- /**
- * Fault notification
- *
- * @param nodeId of node
- * @param counter provided
- * @param timeStamp provided
- * @param objectId provided
- * @param problem provided
- * @param severity provided
- */
- void faultNotification(@NonNull NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
- @Nullable String objectId, @Nullable String problem, @Nullable SeverityType severity);
-
+ //void faultNotification(@NonNull NodeId nodeId,Notification notification, QName type, DateAndTime timeStamp);
/**
* Remove current problems of node
- *
+ *
* @param nodeId of node
* @return number of removed entries
*/
@@ -60,7 +45,7 @@ public interface FaultService extends DeviceManagerService {
/**
* Write initial list of problems of node
- *
+ *
* @param nodeId of node
* @param resultList
*/
diff --git a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
index 5a153a1cc..b249c5008 100644
--- a/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
+++ b/sdnr/wt/devicemanager/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
@@ -32,17 +32,26 @@ public interface NotificationService extends DeviceManagerService {
/** Event notification to devicemanager. Can be change, create or remove indication **/
void eventNotification(@NonNull EventlogEntity eventNotification);
+// void eventNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
+// @Nullable DateAndTime timeStamp);
+
/** create notification for an object **/
void creationNotification(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
@Nullable String objectId);
- /** create notification of object **/
+// void creationNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
+// @Nullable DateAndTime timeStamp);
+
+ /** delete notification of object **/
void deletionNotification(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
@Nullable String objectId);
+// void deletionNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
+// @Nullable DateAndTime timeStamp);
+
/**
* change notification of attribute of object
- *
+ *
* @param nodeId of device
* @param counter provided
* @param timeStamp provided
@@ -53,4 +62,9 @@ public interface NotificationService extends DeviceManagerService {
void changeNotification(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
@Nullable String objectId, @Nullable String attributeName, @Nullable String newValue);
+// void changeNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
+// @Nullable DateAndTime timeStamp);
+
+
+
}
diff --git a/sdnr/wt/devicemanager/model/src/main/yang/devicemanager.yang b/sdnr/wt/devicemanager/model/src/main/yang/devicemanager.yang
index 608e2dabd..a34ea49a4 100644
--- a/sdnr/wt/devicemanager/model/src/main/yang/devicemanager.yang
+++ b/sdnr/wt/devicemanager/model/src/main/yang/devicemanager.yang
@@ -8,7 +8,9 @@ module devicemanager {
prefix data-provider;
revision-date 2020-11-10;
}
-
+ import ietf-yang-types {
+ prefix yang;
+ }
organization
"highstreet technologies GmbH";
contact
@@ -40,6 +42,136 @@ module devicemanager {
"https://jira.onap.org/browse/SDNC-877";
}
+ notification object-creation-notification {
+ uses object-creation-notification-g;
+ description "none";
+ }
+ grouping object-creation-notification-g {
+ leaf counter {
+ type int32;
+ default -1;
+ description "Counts object creation notifications.";
+ }
+ leaf time-stamp {
+ type yang:date-and-time;
+ default "2017-01-01T00:00:00.0Z";
+ description "none";
+ }
+ leaf object-id-ref {
+ type string;
+ description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+ leaf object-type {
+ type string;
+ default "Type of created object not specified.";
+ description "Type of Object to be chosen from the following list of values: 'MW_AirInterface_Pac', 'MW_AirInterfaceDiversity_Pac', 'MW_Structure_Pac', 'MW_PureEthernetStructure_Pac', 'MW_HybridMwStructure_Pac', 'MW_Container_Pac', 'MW_EthernetContainer_Pac' or 'MW_TdmContainer_Pac'.";
+ }
+ description "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac has to be instancieted in the controller.";
+ }
+ notification object-deletion-notification {
+ uses object-deletion-notification-g;
+ description "none";
+ }
+ grouping object-deletion-notification-g {
+ leaf counter {
+ type int32;
+ default -1;
+ description "Counts object deletion notifications.";
+ }
+ leaf time-stamp {
+ type yang:date-and-time;
+ default "2017-01-01T00:00:00.0Z";
+ description "none";
+ }
+ leaf object-id-ref {
+ type string;
+ description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+ description "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac instance has to be deleted in the controller.";
+ }
+ notification attribute-value-changed-notification {
+ uses attribute-value-changed-notification-g;
+ description "none";
+ }
+ grouping attribute-value-changed-notification-g {
+ leaf counter {
+ type int32;
+ default -1;
+ description "Counts attribute value changed notifications.";
+ }
+ leaf time-stamp {
+ type yang:date-and-time;
+ default "2017-01-01T00:00:00.0Z";
+ description "none";
+ }
+ leaf object-id-ref {
+ type string;
+ description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+ leaf attribute-name {
+ type string;
+ default "Attribute name not specified.";
+ description "Name of the attribute that has been changed.";
+ }
+ leaf new-value {
+ type string;
+ default "New value not specified.";
+ description "Attribute value converted to a string (xml, json, ...)";
+ }
+ description "To be sent when an attribute has changed and one or more controllers have to update their data.";
+ }
+ notification problem-notification {
+ uses problem-notification-g;
+ description "none";
+ }
+ grouping problem-notification-g {
+ leaf counter {
+ type int32;
+ default -1;
+ description "Counts problem notifications";
+ }
+ leaf time-stamp {
+ type yang:date-and-time;
+ default "2017-01-01T00:00:00.0Z";
+ description "none";
+ }
+ leaf object-id-ref {
+ type string;
+ description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+ leaf problem {
+ type string;
+ default "Problem name not specified.";
+ description "Name of the problem according to AirInterface::AirInterfaceCapability::supportedAlarms or AirInterfaceDiversity::AirInterfaceDiversityCapability::supportedAlarms or Structure::StructureCapability::supportedAlarms or PureEthernetStructure::PureEthernetStructureCapability::supportedAlarms or HybridMwStructure::HybridMwStructureCapability::supportedAlarms or Container::ContainerCapability::supportedAlarms or EthernetContainer::EthernetContainerCapability::supportedAlarms or TdmContainer::TdmContainerCapability::supportedAlarms.";
+ }
+ leaf severity {
+ type severity-type;
+ default warning;
+ description "Severity of the problem according to AirInterface::AirInterfaceConfiguration::problemSeverityList, AirInterfaceDiversity::AirInterfaceDiversityConfiguration::problemSeverityList, Structure::StructureConfiguration::problemSeverityList, PureEthernetStructure::PureEthernetStructureConfiguration::problemSeverityList, HybridMwStructure::HybridMwStructureConfiguration::problemSeverityList, Container::ContainerConfiguration::problemSeverityList, EthernetContainer::EthernetContainerConfiguration::problemSeverityList or TdmContainer::TdmContainerConfiguration::problemSeverityList";
+ }
+ description "To be sent when a problem occurs at a MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
+ }
+ typedef severity-type {
+ type enumeration {
+ enum non-alarmed {
+ description "none";
+ }
+ enum warning {
+ description "none";
+ }
+ enum minor {
+ description "none";
+ }
+ enum major {
+ description "none";
+ }
+ enum critical {
+ description "none";
+ }
+ }
+ description "According to ITU-T M.3160";
+ }
+
rpc set-maintenance-mode {
description
"Set maintenance mode for network element";