From db9f267b3930a28054e967c75db228e27663aedc Mon Sep 17 00:00:00 2001 From: highstreetherbert Date: Thu, 29 Apr 2021 19:06:54 +0200 Subject: migrate features to silicon migrate features to silicon Issue-ID: CCSDK-3278 Signed-off-by: highstreetherbert Change-Id: Icabe6bd5b760438eedd8c6b78a70197c287c5199 Signed-off-by: highstreetherbert --- .../model/src/main/yang/websocketmanager.yang | 51 ------------------ sdnr/wt/websocketmanager/provider/pom.xml | 9 +--- .../wt/websocketmanager2/test/TestSerializer.java | 59 --------------------- .../wt/websocketmanager2/test/UserScopeTest.java | 61 ---------------------- 4 files changed, 2 insertions(+), 178 deletions(-) delete mode 100644 sdnr/wt/websocketmanager/model/src/main/yang/websocketmanager.yang delete mode 100644 sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java delete mode 100644 sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java (limited to 'sdnr/wt/websocketmanager') diff --git a/sdnr/wt/websocketmanager/model/src/main/yang/websocketmanager.yang b/sdnr/wt/websocketmanager/model/src/main/yang/websocketmanager.yang deleted file mode 100644 index 18d7bd27a..000000000 --- a/sdnr/wt/websocketmanager/model/src/main/yang/websocketmanager.yang +++ /dev/null @@ -1,51 +0,0 @@ -module websocketmanager { - - yang-version 1; - namespace "urn:opendaylight:params:xml:ns:yang:websocketmanager"; - prefix websocketmanager; - - import ietf-yang-types { - prefix yang; - } - organization - "highstreet technologies GmbH"; - contact - "Web: - ONAP: "; - - description - "Websocketmanager Api Module - - Copyright 2021 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."; - - revision 2021-03-22 { - description - "Initial revision"; - } - - notification items-dropped-notification { - uses items-dropped-notification-g; - description "none"; - } - grouping items-dropped-notification-g { - leaf amount { - type uint32; - default 0; - description "Counts of notifications that were dropped."; - } - description "To be sent when notifications were dropped in fact of a set ratio limit."; - } -} diff --git a/sdnr/wt/websocketmanager/provider/pom.xml b/sdnr/wt/websocketmanager/provider/pom.xml index f1a7d2e52..0366ed2a4 100644 --- a/sdnr/wt/websocketmanager/provider/pom.xml +++ b/sdnr/wt/websocketmanager/provider/pom.xml @@ -87,13 +87,8 @@ json - com.typesafe.akka - akka-actor_2.13 - provided - - - com.typesafe.akka - akka-cluster_2.13 + com.typesafe + config provided diff --git a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java b/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java deleted file mode 100644 index 962838489..000000000 --- a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/TestSerializer.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * ONAP : ccsdk features - * ================================================================================ - * Copyright (C) 2021 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.websocketmanager2.test; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import com.fasterxml.jackson.core.JsonProcessingException; -import org.junit.Test; -import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.NotificationOutput; -import org.onap.ccsdk.features.sdnr.wt.yang.mapper.YangToolsMapper; -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.devicemanager.rev190109.ObjectCreationNotification; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ObjectCreationNotificationBuilder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class TestSerializer { - - private static final Logger LOG = LoggerFactory.getLogger(TestSerializer.class); - private static final YangToolsMapper mapper = new YangToolsMapper(); - private static final String TIMESTAMP = "2020-04-01T10:20:40.0Z"; - private static final String NODEID = "node1"; - - @Test - public void test1() { - ObjectCreationNotification notification = new ObjectCreationNotificationBuilder().setCounter(Integer.valueOf(5)).build(); - NotificationOutput output = new NotificationOutput(notification, NODEID, ObjectCreationNotification.QNAME,DateAndTime.getDefaultInstance(TIMESTAMP)); - String sOutput=null; - try { - sOutput = mapper.writeValueAsString(output); - LOG.debug(sOutput); - } catch (JsonProcessingException e) { - e.printStackTrace(); - fail(e.getMessage()); - } - assertNotNull(sOutput); - assertTrue(sOutput.contains("\"type\"")); - } -} diff --git a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java b/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java deleted file mode 100644 index d21bb529c..000000000 --- a/sdnr/wt/websocketmanager/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/websocketmanager2/test/UserScopeTest.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * ============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.websocketmanager2.test; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import java.util.Arrays; -import java.util.List; -import org.junit.Test; -import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.ReducedSchemaInfo; -import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.SchemaInfo; -import org.onap.ccsdk.features.sdnr.wt.websocketmanager.model.data.Scope; -import org.onap.ccsdk.features.sdnr.wt.websocketmanager.utils.UserScopes; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ObjectCreationNotification; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.devicemanager.rev190109.ProblemNotification; -import org.opendaylight.yangtools.yang.common.QName; - -public class UserScopeTest { - - private static final String SCOPE1 = "problem-notification"; - private static final String SCOPE2 = "scope2"; - private static final String SCOPE3 = "scope3"; - private static final String SCOPE4 = "scope4"; - - @Test - public void test() { - UserScopes scopes1 = new UserScopes(); - List json1 = Arrays.asList(SCOPE1, SCOPE2, SCOPE3); - scopes1.setScopes(Arrays.asList(buildScope(null, ProblemNotification.QNAME))); - - assertTrue(scopes1.hasScope(new ReducedSchemaInfo(ProblemNotification.QNAME))); - assertFalse(scopes1.hasScope("RoadmA", new ReducedSchemaInfo(ObjectCreationNotification.QNAME))); - - assertTrue(scopes1.hasScope("RoadmA", new ReducedSchemaInfo(ProblemNotification.QNAME))); - - } - - - private static final Scope buildScope(String nodeId, QName qname) { - Scope scope = new Scope(); - scope.setNodeId(nodeId); - scope.setSchema(new SchemaInfo(qname)); - return scope; - } - -} -- cgit 1.2.3-korg