summaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/oofpcipoc/consumer
diff options
context:
space:
mode:
authorRavi Pendurty <ravi.pendurty@highstreet-technologies.com>2021-02-03 14:09:25 +0100
committerDan Timoney <dtimoney@att.com>2021-02-05 22:55:34 +0000
commit2f9e781a7c3e22bf25df83dcc3ff44b885a80957 (patch)
treed14ec0201ea7012cfc6c70954dcef6475370cfc9 /sdnr/northbound/oofpcipoc/consumer
parent80ebbf5b525b1a251f8e0eebd4a841d85716cf65 (diff)
Adapt SDNR northbound to Aluminium
Adapt SDNR northbound to Aluminium Issue-ID: CCSDK-3128 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com> Change-Id: Id2dc38d4f2573d5c6aeedfb42349433f22aa86f5 Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/northbound/oofpcipoc/consumer')
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/pom.xml16
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java44
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java20
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java20
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml45
-rw-r--r--sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml2
6 files changed, 62 insertions, 85 deletions
diff --git a/sdnr/northbound/oofpcipoc/consumer/pom.xml b/sdnr/northbound/oofpcipoc/consumer/pom.xml
index b05464d5a..950ee3524 100644
--- a/sdnr/northbound/oofpcipoc/consumer/pom.xml
+++ b/sdnr/northbound/oofpcipoc/consumer/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.onap.ccsdk.parent</groupId>
<artifactId>binding-parent</artifactId>
- <version>2.1.0</version>
+ <version>2.1.1-SNAPSHOT</version>
<relativePath/>
</parent>
@@ -66,20 +66,6 @@
<artifactId>oofpcipoc-provider</artifactId>
<version>${project.version}</version>
</dependency>
- <!-- <dependency> <groupId>org.opendaylight.controller</groupId> <artifactId>sal-binding-config</artifactId>
- </dependency> -->
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-binding-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-common-util</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-core-api</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-data-impl</artifactId>
diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java
index 98b16f549..dd1ca7086 100644
--- a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java
+++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java
@@ -25,8 +25,8 @@ import java.io.Writer;
import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.io.IOException;
-import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -41,32 +41,23 @@ import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.Paylo
import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.RAN;
import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.RadioAccess;
import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.X0005b9Lte;
-import org.onap.ccsdk.sli.core.sli.provider.MdsalHelper;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.yang.gen.v1.org.onap.ccsdk.rev190308.*;
+
+import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.OofpcipocListener;
-import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.Payload;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.NbrlistChangeNotification;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.NetconfConfigChange;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.nbrlist.change.notification.*;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.rev190308.nbrlist.change.notification.fap.service.*;
-import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.common.base.Preconditions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.json.JSONArray;
import org.json.JSONObject;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.MoreExecutors;
/**
* Defines a base implementation for your listener. This class extends from a
@@ -92,25 +83,28 @@ public class OofpcipocHandleNotif implements AutoCloseable, OofpcipocListener {
protected DataBroker dataBroker;
- private final OofpcipocClient OofpcipocClient;
+ private OofpcipocClient OofpcipocClient;
- public OofpcipocHandleNotif(final DataBroker dataBroker, final OofpcipocClient OofpcipocClient) {
+ public OofpcipocHandleNotif() {
this.LOG.info("Creating listener for {}", APPLICATION_NAME);
executor = Executors.newFixedThreadPool(1);
+ this.dataBroker = null;
+ this.OofpcipocClient = null;
+ }
+
+ public void setDataBroker(DataBroker dataBroker) {
this.dataBroker = dataBroker;
+ }
+
+ public void setClient(OofpcipocClient OofpcipocClient) {
this.OofpcipocClient = OofpcipocClient;
- initialize();
}
- public void initialize() {
+ public void init() {
LOG.info("Placeholder: Initializing listener for {}", APPLICATION_NAME);
}
- protected void initializeChild() {
- // Override if you have custom initialization intelligence
- }
-
@Override
public void close() throws Exception {
LOG.info("Closing listener for {}", APPLICATION_NAME);
@@ -134,18 +128,20 @@ public class OofpcipocHandleNotif implements AutoCloseable, OofpcipocListener {
List<FAPServiceList> fAPServiceList = new ArrayList<>();
radioAccess.setFAPServiceNumberOfEntries(notification.getFapServiceNumberOfEntriesChanged().toString());
+ Map<FapServiceKey, FapService> fapSvcs = notification.getFapService();
- for (FapService fapSvc : notification.getFapService()) {
+ for (Map.Entry<FapServiceKey,FapService> entry : fapSvcs.entrySet() ) {
+ FapService fapSvc = entry.getValue();
FAPServiceList fapServiceElement = new FAPServiceList();
fapServiceElement.setAlias(fapSvc.getAlias());
fapServiceElement.setX0005b9Lte(new X0005b9Lte(fapSvc.getPhyCellIdInUse().toString(), fapSvc.getPnfName()));
List<LTENeighborListInUseLTECell> lTENeighborListInUseLTECell = new ArrayList<>();
-
- for (LteRanNeighborListInUseLteCellChanged lteRanElement : fapSvc
- .getLteRanNeighborListInUseLteCellChanged()) {
+ Map<LteRanNeighborListInUseLteCellChangedKey, LteRanNeighborListInUseLteCellChanged> lteRanElements = fapSvc.getLteRanNeighborListInUseLteCellChanged();
+ for (Map.Entry<LteRanNeighborListInUseLteCellChangedKey, LteRanNeighborListInUseLteCellChanged> lteRanEntry : lteRanElements.entrySet()) {
+ LteRanNeighborListInUseLteCellChanged lteRanElement = lteRanEntry.getValue();
LTENeighborListInUseLTECell lTENeighborListInUseLTECellElement = new LTENeighborListInUseLTECell();
lTENeighborListInUseLTECellElement.setAlias(lteRanElement.getCid());
lTENeighborListInUseLTECellElement.setBlacklisted(lteRanElement.isBlacklisted().toString());
diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java
index def38a3db..36c0ce623 100644
--- a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java
+++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2020 AT&T 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.northbound.oofpcipoc.handlenotif.pojos;
diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java
index 39cc22208..634d9707b 100644
--- a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java
+++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2020 AT&T 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.northbound.oofpcipoc.handlenotif.pojos;
diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml b/sdnr/northbound/oofpcipoc/consumer/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml
deleted file mode 100644
index 90ae11a51..000000000
--- a/sdnr/northbound/oofpcipoc/consumer/src/main/resources/OSGI-INF/blueprint/impl-blueprint.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ ============LICENSE_START=======================================================
- ~ ONAP : ccsdk features
- ~ ================================================================================
- ~ Copyright (C) 2020 AT&T 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=======================================================
- ~
- -->
-
-<blueprint xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
- xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" odl:use-default-for-reference-types="true">
-
- <reference id="svcLogicService"
- interface="org.onap.ccsdk.sli.core.sli.provider.SvcLogicService"/>
-
- <bean id="client" class="org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.OofpcipocClient">
- <argument ref="svcLogicService"/>
- </bean>
-
- <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
- odl:type="default"/>
-
- <!-- Register the OofpcipocListener to receive yang notifications -->
-
- <odl:notification-listener ref="listener"/>
-
- <bean id="listener" class="org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.OofpcipocHandleNotif">
- <argument ref="dataBroker"/>
- <argument ref="client"/>
- </bean>
-
-</blueprint>
diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
index 90ae11a51..33d4142f6 100644
--- a/sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
+++ b/sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
@@ -30,7 +30,7 @@
<argument ref="svcLogicService"/>
</bean>
- <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+ <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"
odl:type="default"/>
<!-- Register the OofpcipocListener to receive yang notifications -->