From 34f89faa64f815d5cf33d0905046eaf392017b39 Mon Sep 17 00:00:00 2001 From: Michael Dürre Date: Wed, 31 Aug 2022 08:46:55 +0200 Subject: add fixes for wt sulfur MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix devmgrs and db access Issue-ID: CCSDK-3749 Signed-off-by: Michael Dürre Change-Id: I41018d2daa55b200a9ba89e784f8adf4200d32c3 Signed-off-by: Michael Dürre --- .../impl/CMNotificationClient.java | 24 +++++++++++----------- .../impl/FaultNotificationClient.java | 16 +++++++-------- .../impl/PNFMountPointClient.java | 2 +- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'sdnr/wt/mountpoint-registrar/provider/src') diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/CMNotificationClient.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/CMNotificationClient.java index b13d4ea38..115f0f0c0 100644 --- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/CMNotificationClient.java +++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/CMNotificationClient.java @@ -26,7 +26,7 @@ import java.util.Map; public class CMNotificationClient extends MessageClient { - private static final String CM_NOTIFICATION_URI = "restconf/operations/devicemanager:push-cm-notification"; + private static final String CM_NOTIFICATION_URI = "rests/operations/devicemanager:push-cm-notification"; public static final String NODE_ID = "@node-id@", COUNTER = "@counter@", TIMESTAMP = "@timestamp@", OBJECT_ID = "@object-id@", NOTIFICATION_TYPE = "@notification-type@", SOURCE_INDICATOR = "@source-indicator@", NOTIFICATION_ID = "@notification-id@", PATH = "@path@", OPERATION = "@operation@", VALUE = "@value@"; @@ -35,17 +35,17 @@ public class CMNotificationClient extends MessageClient { OPERATION, VALUE); private static final String CM_PAYLOAD = "{\n" - + " \"devicemanager:input\": {\n" - + " \"devicemanager:node-id\": \"" + NODE_ID + "\",\n" - + " \"devicemanager:counter\": \"" + COUNTER + "\",\n" - + " \"devicemanager:timestamp\": \"" + TIMESTAMP + "\",\n" - + " \"devicemanager:object-id\": \"" + OBJECT_ID + "\",\n" - + " \"devicemanager:notification-type\": \"" + NOTIFICATION_TYPE + "\",\n" - + " \"devicemanager:notification-id\": \"" + NOTIFICATION_ID + "\",\n" - + " \"devicemanager:source-indicator\": \"" + SOURCE_INDICATOR + "\",\n" - + " \"devicemanager:path\": \"" + PATH + "\",\n" - + " \"devicemanager:operation\": \"" + OPERATION + "\",\n" - + " \"devicemanager:value\": \"" + VALUE + "\"\n" + + " \"input\": {\n" + + " \"node-id\": \"" + NODE_ID + "\",\n" + + " \"counter\": \"" + COUNTER + "\",\n" + + " \"timestamp\": \"" + TIMESTAMP + "\",\n" + + " \"object-id\": \"" + OBJECT_ID + "\",\n" + + " \"notification-type\": \"" + NOTIFICATION_TYPE + "\",\n" + + " \"notification-id\": \"" + NOTIFICATION_ID + "\",\n" + + " \"source-indicator\": \"" + SOURCE_INDICATOR + "\",\n" + + " \"path\": \"" + PATH + "\",\n" + + " \"operation\": \"" + OPERATION + "\",\n" + + " \"value\": \"" + VALUE + "\"\n" + " }\n" + "}"; diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultNotificationClient.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultNotificationClient.java index 6851475e8..ce2538628 100644 --- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultNotificationClient.java +++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/FaultNotificationClient.java @@ -29,19 +29,19 @@ import static org.onap.ccsdk.features.sdnr.wt.mountpointregistrar.impl.MessageCl public class FaultNotificationClient extends MessageClient { - private static final String FAULT_NOTIFICATION_URI = "restconf/operations/devicemanager:push-fault-notification"; + private static final String FAULT_NOTIFICATION_URI = "rests/operations/devicemanager:push-fault-notification"; public static final String NODE_ID = "@node-id@", COUNTER = "@counter@", TIMESTAMP = "@timestamp@", OBJECT_ID = "@object-id@", PROBLEM = "@problem@", SEVERITY = "@severity@"; public static final List REQUIRED_FIELDS = List.of(NODE_ID, COUNTER, TIMESTAMP, OBJECT_ID, PROBLEM, SEVERITY); private static final String FAULT_PAYLOAD = "{\n" - + " \"devicemanager:input\": {\n" - + " \"devicemanager:node-id\": \"" + NODE_ID + "\",\n" - + " \"devicemanager:counter\": \"" + COUNTER + "\",\n" - + " \"devicemanager:timestamp\": \"" + TIMESTAMP + "\",\n" - + " \"devicemanager:object-id\": \"" + OBJECT_ID + "\",\n" - + " \"devicemanager:problem\": \"" + PROBLEM + "\",\n" - + " \"devicemanager:severity\": \"" + SEVERITY + "\"\n" + + " \"input\": {\n" + + " \"node-id\": \"" + NODE_ID + "\",\n" + + " \"counter\": \"" + COUNTER + "\",\n" + + " \"timestamp\": \"" + TIMESTAMP + "\",\n" + + " \"object-id\": \"" + OBJECT_ID + "\",\n" + + " \"problem\": \"" + PROBLEM + "\",\n" + + " \"severity\": \"" + SEVERITY + "\"\n" + " }\n" + "}"; diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFMountPointClient.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFMountPointClient.java index 169e43c47..fd31a3fd6 100644 --- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFMountPointClient.java +++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/impl/PNFMountPointClient.java @@ -30,7 +30,7 @@ import org.onap.ccsdk.features.sdnr.wt.common.database.requests.BaseRequest; public class PNFMountPointClient extends MessageClient { private static final String MOUNTPOINT_URI = - "restconf/config/network-topology:network-topology/topology/topology-netconf/node/"; + "rests/data/network-topology:network-topology/topology=topology-netconf/node="; public static final String DEVICE_NAME = "@device-name@", DEVICE_IP = "@device-ip@", DEVICE_PORT = "@device-port@", USERNAME = "@username@", PASSWORD = "@password@", KEY_ID = "@key-id@"; private static final String PROTOCOL = "protocol_sec"; -- cgit 1.2.3-korg