diff options
author | highstreetherbert <herbert.eiselt@highstreet-technologies.com> | 2021-04-29 19:06:54 +0200 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-06-11 00:45:36 +0000 |
commit | db9f267b3930a28054e967c75db228e27663aedc (patch) | |
tree | e8ecaeff503afaa9c00b31781003b92a6f1844f2 /sdnr/wt/websocketmanager | |
parent | e536aaa0422660283fa388c1a5d1a9c32dc52f9e (diff) |
migrate features to silicon
migrate features to silicon
Issue-ID: CCSDK-3278
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: Icabe6bd5b760438eedd8c6b78a70197c287c5199
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/websocketmanager')
4 files changed, 2 insertions, 178 deletions
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: <https://highstreet-technologies.com> - ONAP: <https://wiki.onap.org/display/DW/SDN-R+Websocketmanager+Upgrade>"; - - 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 @@ <artifactId>json</artifactId> </dependency> <dependency> - <groupId>com.typesafe.akka</groupId> - <artifactId>akka-actor_2.13</artifactId> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.typesafe.akka</groupId> - <artifactId>akka-cluster_2.13</artifactId> + <groupId>com.typesafe</groupId> + <artifactId>config</artifactId> <scope>provided</scope> </dependency> <dependency> 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<String> 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; - } - -} |