From eb2a7c97c0007b013bd1784ac17d57be02b63d03 Mon Sep 17 00:00:00 2001 From: Michael DÜrre Date: Thu, 10 Mar 2022 10:39:16 +0100 Subject: migrate sdnr features to phosphorus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix mapper and switch to dom api Updated to use phosphorus version of parent poms Issue-ID: CCSDK-3566 Signed-off-by: Michael DÜrre Change-Id: I98c5bef9286622e0d66b53db687557d798cd53f5 Signed-off-by: Michael DÜrre --- sdnr/wt/devicemanager-core/model/pom.xml | 2 +- .../types/EventlogNotificationBuilder.java | 46 ++++++++++++++++++++ .../types/FaultNotificationBuilder2.java | 49 ++++++++++++++++++++++ 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/EventlogNotificationBuilder.java create mode 100644 sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/FaultNotificationBuilder2.java (limited to 'sdnr/wt/devicemanager-core/model') diff --git a/sdnr/wt/devicemanager-core/model/pom.xml b/sdnr/wt/devicemanager-core/model/pom.xml index 04249d2d1..3b8932e47 100644 --- a/sdnr/wt/devicemanager-core/model/pom.xml +++ b/sdnr/wt/devicemanager-core/model/pom.xml @@ -28,7 +28,7 @@ org.onap.ccsdk.parent binding-parent - 2.3.2 + 2.3.3-SNAPSHOT diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/EventlogNotificationBuilder.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/EventlogNotificationBuilder.java new file mode 100644 index 000000000..105453ea6 --- /dev/null +++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/EventlogNotificationBuilder.java @@ -0,0 +1,46 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.types; + +import org.eclipse.jdt.annotation.Nullable; +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.EventlogBuilder; +import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId; + +/** + * Add specific constructor + */ +public class EventlogNotificationBuilder extends EventlogBuilder { + + public EventlogNotificationBuilder(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp, + @Nullable String objectId, @Nullable String attributeName, @Nullable String newValue) { + + setNodeId(nodeId.getValue()); + if (counter != null) { + setCounter(counter); + } + if (timeStamp != null) { + setTimestamp(timeStamp); + } + setObjectId(objectId); + setAttributeName(attributeName); + setNewValue(newValue); + + } + +} diff --git a/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/FaultNotificationBuilder2.java b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/FaultNotificationBuilder2.java new file mode 100644 index 000000000..5ccc664b4 --- /dev/null +++ b/sdnr/wt/devicemanager-core/model/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/types/FaultNotificationBuilder2.java @@ -0,0 +1,49 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.devicemanager.types; + +import org.eclipse.jdt.annotation.Nullable; +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.FaultlogBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.data.provider.rev201110.SeverityType; +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; + +/** + * Add specific constructor + */ +public class FaultNotificationBuilder2 extends FaultlogBuilder { + + public FaultNotificationBuilder2(NodeId nodeId, @Nullable Integer counter, @Nullable DateAndTime timeStamp, + @Nullable String objectId, @Nullable String problem, @Nullable SeverityType severity, + SourceType sourceType) { + + setNodeId(nodeId.getValue()); + if (counter != null) { + setCounter(counter); + } + if (timeStamp != null) { + setTimestamp(timeStamp); + } + setObjectId(objectId); + setProblem(problem); + setSeverity(severity); + setSourceType(sourceType); + } + +} -- cgit 1.2.3-korg