summaryrefslogtreecommitdiffstats
path: root/sdnr/wt/devicemanager-core/model
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/devicemanager-core/model')
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/AaiService.java6
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EventHandlingService.java9
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java11
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/MaintenanceService.java10
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java54
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/PerformanceManager.java5
-rw-r--r--sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/InternalConnectionStatus.java3
7 files changed, 66 insertions, 32 deletions
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/AaiService.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/AaiService.java
index eca19a8c0..53c5c1444 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/AaiService.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/AaiService.java
@@ -17,6 +17,8 @@
*/
package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+
/**
* Forward to Active and Available Inventory
*/
@@ -25,11 +27,11 @@ public interface AaiService extends DeviceManagerService {
/**
* @param mountPointNodeName
*/
- void onDeviceRegistered(String mountPointNodeName);
+ void onDeviceRegistered(NodeId nodeId);
/**
* @param mountPointNodeName
*/
- void onDeviceUnregistered(String mountPointNodeName);
+ void onDeviceUnregistered(NodeId nodeId);
}
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EventHandlingService.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EventHandlingService.java
index 5cb9b9f21..e59401cc7 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EventHandlingService.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/EventHandlingService.java
@@ -19,6 +19,7 @@ package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
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.NetworkElementDeviceType;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
* Event Forwarding for central event management by devicemanager
@@ -29,12 +30,12 @@ public interface EventHandlingService {
* @param mountPointNodeName
* @param deviceType
*/
- void connectIndication(String mountPointNodeName, NetworkElementDeviceType deviceType);
+ void connectIndication(NodeId nodeId, NetworkElementDeviceType deviceType);
/**
* @param mountPointNodeName
*/
- void deRegistration(String mountPointNodeName);
+ void deRegistration(NodeId nodeId);
/**
*
@@ -43,13 +44,13 @@ public interface EventHandlingService {
* @param attributeNewValue
* @param nNode
*/
- void updateRegistration(String registrationName, String attribute, String attributeNewValue, NetconfNode nNode);
+ void updateRegistration(NodeId nodeId, String attribute, String attributeNewValue, NetconfNode nNode);
/**
* @param nodeIdString
* @param nNode
*/
- void registration(String nodeIdString, NetconfNode nNode);
+ void registration(NodeId nodeId, NetconfNode nNode);
/**
* @param objectId
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
index f414b4b15..5598bd1e8 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/FaultService.java
@@ -28,9 +28,18 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
public interface FaultService extends DeviceManagerService {
/**
- * Notify fault information to devicemanager
+ * Forward received fault information to devicemanager. Devicemanager writes abstracted fault information to
+ * database and send abstracted fault information to websocket.
+ * For sending specific notifications to a client, additionally use
+ * {@link org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.WebsocketManagerService}
+ * <ul>
+ * <li>write to database faultcurrent FaultlogEntity namespace: urn:opendaylight:params:xml:ns:yang:data-provider
+ * <li>write to database faultlog
+ * <li>send via websocket as ProblemNotification namespace: urn:opendaylight:params:xml:ns:yang:devicemanager
+ * </ul>
*
* @param faultNotification to send
+ *
*/
void faultNotification(@NonNull FaultlogEntity faultNotification);
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/MaintenanceService.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/MaintenanceService.java
index 8a2ffd880..544ba5fbf 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/MaintenanceService.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/MaintenanceService.java
@@ -17,28 +17,30 @@
*/
package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
+
public interface MaintenanceService extends DeviceManagerService {
/**
* Verify maintenance state of given object according to the filter settings. The object is specified by the
* criteria provided in the parameters. The data _id (uuid) is equal to the mountpointReference.
- *
+ *
* @param mountpointReference used as reference, to query the data from database.
* @param objectIdRef first level id in onf core model, delivered by notification objectid
* @param problem problem name of device, delivered in problem notification
* @return boolean indication
*/
- boolean isONFObjectInMaintenance(String mountpointReference, String objectIdRef, String problem);
+ boolean isONFObjectInMaintenance(NodeId nodeId, String objectIdRef, String problem);
/**
* @param mountPointNodeName
*/
- void createIfNotExists(String mountPointNodeName);
+ void createIfNotExists(NodeId nodeId);
/**
* @param mountPointNodeName
*/
- void deleteIfNotRequired(String mountPointNodeName);
+ void deleteIfNotRequired(NodeId nodeId);
}
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
index b249c5008..c766faaac 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/NotificationService.java
@@ -24,31 +24,52 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.pro
import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
- * Central notification management of devicemanager
+ * Central notification management of devicemanagers.
+ * Notifications are forwarded to ODLUX-Clients and written into database.
+ * Type {@link #EventlogEntity} contains all information.
+ * Basically, all fields have to be provided with meaningful or
+ * unique value.
+ * <ul>
+ * <li>SourceType: Mandatory to choose one of the ENUMS, specified by SDNC software
+ * <li>Host Name: Mountpoint name
+ * <li>Timestamp: From message or created by controller
+ * <li>ObjectId: Unique ID of Object (e.g. device, interface) within namespace device
+ * <li>attributeName: Unique ID within namespace object or message about changed value,
+ * presented in ODLUX "Message" column.
+ * </ul>
*/
public interface NotificationService extends DeviceManagerService {
-
- /** Event notification to devicemanager. Can be change, create or remove indication **/
+ /**
+ * Handling of event notification, received by devicemanager.
+ * Can be a change, create or remove indication.
+ *
+ * @param eventNotification is containing all event related information.
+ */
void eventNotification(@NonNull EventlogEntity eventNotification);
-// void eventNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
-// @Nullable DateAndTime timeStamp);
-
- /** create notification for an object **/
+ /**
+ * create notification for an object. Message set to "Create"
+ *
+ * @param nodeId of device
+ * @param counter provided
+ * @param timeStamp provided
+ * @param objectId provided
+ */
void creationNotification(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp,
@Nullable String objectId);
-// void creationNotification(NodeId nodeId, Notification notification, @NonNull QName qname,
-// @Nullable DateAndTime timeStamp);
-
- /** delete notification of object **/
+ /**
+ * delete notification of object. Message set to "Deletion"
+ *
+ * @param nodeId of device
+ * @param counter provided
+ * @param timeStamp provided
+ * @param objectId provided
+ */
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
*
@@ -62,9 +83,4 @@ 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-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/PerformanceManager.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/PerformanceManager.java
index 3f93108a3..d3cd88226 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/PerformanceManager.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/service/PerformanceManager.java
@@ -18,6 +18,7 @@
package org.onap.ccsdk.features.sdnr.wt.devicemanager.service;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.ne.service.NetworkElement;
+import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId;
/**
* @author herbert
@@ -29,11 +30,11 @@ public interface PerformanceManager extends DeviceManagerService {
* @param mountPointNodeName
* @param ne
*/
- void registration(String mountPointNodeName, NetworkElement ne);
+ void registration(NodeId nodeId, NetworkElement ne);
/**
* @param mountPointNodeName
*/
- void deRegistration(String mountPointNodeName);
+ void deRegistration(NodeId nodeId);
}
diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/InternalConnectionStatus.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/InternalConnectionStatus.java
index 303cd8214..29450ed31 100644
--- a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/InternalConnectionStatus.java
+++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/InternalConnectionStatus.java
@@ -23,6 +23,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.pro
public class InternalConnectionStatus {
public static ConnectionLogStatus statusFromNodeStatus(ConnectionStatus nodeStatus) {
+ if(nodeStatus==null) {
+ return ConnectionLogStatus.Undefined;
+ }
switch (nodeStatus) {
case Connected:
return ConnectionLogStatus.Connected;