diff options
Diffstat (limited to 'sdnr/northbound/oofpcipoc')
16 files changed, 1342 insertions, 1 deletions
diff --git a/sdnr/northbound/oofpcipoc/consumer/pom.xml b/sdnr/northbound/oofpcipoc/consumer/pom.xml new file mode 100644 index 000000000..a4ad5b25a --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/pom.xml @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.onap.ccsdk.parent</groupId> + <artifactId>binding-parent</artifactId> + <version>1.3.0-SNAPSHOT</version> + <relativePath /> + </parent> + + <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId> + <artifactId>oofpcipoc-consumer</artifactId> + <version>0.5.0-SNAPSHOT</version> + <packaging>bundle</packaging> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.opendaylight.controller</groupId> + <artifactId>mdsal-artifacts</artifactId> + <version>1.6.1</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-core-artifacts</artifactId> + <version>${ccsdk.sli.core.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + </dependencies> + </dependencyManagement> + + + + <dependencies> + <dependency> + <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId> + <artifactId>oofpcipoc-model</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.features.sdnr.northbound</groupId> + <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> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.9.8</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>2.9.8</version> + </dependency> + + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>2.9.8</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-common</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>sli-provider</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.onap.ccsdk.sli.core</groupId> + <artifactId>utils-provider</artifactId> + <!-- <version>${sdnctl.sli.version}</version> --> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.velocity/velocity-engine-core --> + <dependency> + <groupId>org.apache.velocity</groupId> + <artifactId>velocity-engine-core</artifactId> + <version>2.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/org.json/json --> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20131018</version> + </dependency> + <dependency> + <groupId>commons-codec</groupId> + <artifactId>commons-codec</artifactId> + <version>1.9</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <version>1.7.21</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.6.1</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + </dependencies> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.codehaus.mojo</groupId> + <artifactId>properties-maven-plugin</artifactId> + <versionRange>[1.0.0,)</versionRange> + <goals> + <goal>set-system-properties</goal> + </goals> + </pluginExecutionFilter> + <action> + <execute /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + +</project> 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 new file mode 100644 index 000000000..af1daa317 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/OofpcipocHandleNotif.java @@ -0,0 +1,301 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 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; + +import java.io.Writer; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.List; +import java.io.IOException; +import java.util.Properties; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.CellConfig; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.FAPServiceList; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.LTE; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.LTENeighborListInUseLTECell; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.NeighborListInUse; +import org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.PayloadObject; +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.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.base.Preconditions; +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 + * helper class which provides storage for the most commonly used components of + * the MD-SAL. Additionally the base class provides some basic logging and + * initialization / clean up methods. + * + */ +public class OofpcipocHandleNotif implements AutoCloseable, OofpcipocListener { + + private static final Logger LOG = LoggerFactory.getLogger(OofpcipocHandleNotif.class); + + private static final String APPLICATION_NAME = "Oofpcipoc"; + + private static final String TRUE = "true"; + private static final String FALSE = "false"; + private static final String UTF_8 = "UTF-8"; + + private static final String PARAMETER_NAME = "parameter-name"; + private static final String STRING_VALUE = "string-value"; + + private final ExecutorService executor; + + protected DataBroker dataBroker; + + private final OofpcipocClient OofpcipocClient; + + public OofpcipocHandleNotif(final DataBroker dataBroker, final OofpcipocClient OofpcipocClient) { + + this.LOG.info("Creating listener for {}", APPLICATION_NAME); + executor = Executors.newFixedThreadPool(1); + this.dataBroker = dataBroker; + this.OofpcipocClient = OofpcipocClient; + initialize(); + } + + public void initialize() { + 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); + executor.shutdown(); + LOG.info("Successfully closed listener for {}", APPLICATION_NAME); + } + + @Override + public void onNbrlistChangeNotification(final NbrlistChangeNotification notification) { + + LOG.info("Reached onNbrlistChangeNotification"); + + LOG.info("Number of FAPService Entries Changed {}", notification.getFapServiceNumberOfEntriesChanged()); + + // START: Create RadioAccess payload object/string from the notification + + String payloadString = null; + PayloadObject payloadObject = new PayloadObject(); + org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.Payload payload = new org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos.Payload(); + RadioAccess radioAccess = new RadioAccess(); + List<FAPServiceList> fAPServiceList = new ArrayList<>(); + + radioAccess.setFAPServiceNumberOfEntries(notification.getFapServiceNumberOfEntriesChanged().toString()); + + for (FapService fapSvc : notification.getFapService()) { + + 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()) { + LTENeighborListInUseLTECell lTENeighborListInUseLTECellElement = new LTENeighborListInUseLTECell(); + lTENeighborListInUseLTECellElement.setAlias(lteRanElement.getCid()); + lTENeighborListInUseLTECellElement.setBlacklisted(lteRanElement.isBlacklisted().toString()); + lTENeighborListInUseLTECellElement.setCid(lteRanElement.getCid()); + lTENeighborListInUseLTECellElement.setEnable(TRUE); + lTENeighborListInUseLTECellElement.setMustInclude(TRUE); + lTENeighborListInUseLTECellElement.setPhyCellId(lteRanElement.getPhyCellId().toString()); + lTENeighborListInUseLTECellElement.setPlmnid(lteRanElement.getPlmnid()); + lTENeighborListInUseLTECellElement.setPnfName(lteRanElement.getPnfName()); + + lTENeighborListInUseLTECell.add(lTENeighborListInUseLTECellElement); + } + + NeighborListInUse neighborListInUse = new NeighborListInUse(); + neighborListInUse.setLTECellNumberOfEntries( + String.valueOf(fapSvc.getLteRanNeighborListInUseLteCellChanged().size())); + neighborListInUse.setLTENeighborListInUseLTECell(lTENeighborListInUseLTECell); + + CellConfig cellConfig = new CellConfig(); + LTE lTE = new LTE(); + RAN rAN = new RAN(); + + rAN.setCellIdentity(fapSvc.getCid()); + rAN.setNeighborListInUse(neighborListInUse); + + lTE.setRAN(rAN); + cellConfig.setLTE(lTE); + fapServiceElement.setCellConfig(cellConfig); + + fAPServiceList.add(fapServiceElement); + } + radioAccess.setFAPServiceList(fAPServiceList); + payload.setRadioAccess(radioAccess); + payloadObject.setPayload(payload); + + ObjectMapper mapper = new ObjectMapper(); + + try { + payloadString = mapper.writeValueAsString(payloadObject.getPayload()); + LOG.info("Stringified Payload Object::" + payloadString + "\n" + "\n"); + } catch (JsonProcessingException jsonProcessingException) { + LOG.error("Error while processing Payload Object", jsonProcessingException); + return; + } + + // END: Create RadioAccess payload object/string from the notification + + // START: Build RPC message and invoke RPC + + String rpcMessageBody = null; + + try { + rpcMessageBody = buildHandleNbrlistChangeNotifRPCMsg(radioAccess, payloadString, "/opt/onap/ccsdk/data/properties/rpc-message-sliapi-execute.vt"); + LOG.debug("rpc message body::" + rpcMessageBody); + invokeRPC(rpcMessageBody); + } catch (Exception e) { + LOG.error("Unable to build rpc message body::", e); + return; + } + } + private void invokeRPC(String rpcMsgbody) { + try { + String odlUrlBase = "http://sdnc.onap:8282/restconf/operations"; //using cluster SDNC URL + String odlUser = "admin"; + String odlPassword = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"; + String sdncEndpoint = " SLI-API:execute-graph"; + + if ((odlUrlBase != null) && (odlUrlBase.length() > 0)) { + SdncOdlConnection conn = SdncOdlConnection.newInstance(odlUrlBase + "/" + sdncEndpoint, odlUser, odlPassword); + + conn.send("POST", "application/json", rpcMsgbody); + } else { + LOG.info("POST message body would be:\n" + rpcMsgbody); + } + } catch (Exception e) { + LOG.error("Unable to process message", e); + } + } + + private String buildHandleNbrlistChangeNotifRPCMsg(RadioAccess radioAccess, String payloadString, String templatePath) throws IOException { + VelocityEngine velocityEngine = new VelocityEngine(); + velocityEngine.init(); + + String SLI_PARAMETERS = "sli_parameters"; + String HANDLE_NBRLIST_CHANGE_NOTIF = "handle-nbrlist-change-notif"; + String HANDLE_NBRLIST_CHANGE_NOTIF_INPUT = HANDLE_NBRLIST_CHANGE_NOTIF+"-input."; + String HANDLE_NBRLIST_CHANGE_NOTIF_INPUT_FAP_SERVICE = HANDLE_NBRLIST_CHANGE_NOTIF_INPUT+"fap-service"; + String FAP_SERVICE_NO_OF_ENTRIES_CHANGED= "fap-service-number-of-entries-changed"; + + JSONArray sliParametersArray = new JSONArray(); + + VelocityContext context = new VelocityContext(); + context.put("rpc_name", "handle-nbrlist-change-notif"); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, HANDLE_NBRLIST_CHANGE_NOTIF_INPUT+FAP_SERVICE_NO_OF_ENTRIES_CHANGED) + .put(STRING_VALUE, radioAccess.getFAPServiceNumberOfEntries())); + + int count = 0; + + for(FAPServiceList fapServiceListElement: radioAccess.getFAPServiceList()) { + + String prefix = HANDLE_NBRLIST_CHANGE_NOTIF_INPUT_FAP_SERVICE+"["+count+"]."; + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+"alias") + .put(STRING_VALUE, fapServiceListElement.getAlias())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+"cid") + .put(STRING_VALUE, fapServiceListElement.getAlias())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+"phy-cell-id-in-use") + .put(STRING_VALUE, fapServiceListElement.getX0005b9Lte().getPhyCellIdInUse())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+"pnf-name") + .put(STRING_VALUE, fapServiceListElement.getX0005b9Lte().getPnfName())); + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+"lte-cell-number-of-entries") + .put(STRING_VALUE, fapServiceListElement.getCellConfig().getLTE().getRAN().getNeighborListInUse().getLTECellNumberOfEntries())); + + int lteNbrListInUseCount = 0; + for(LTENeighborListInUseLTECell lTENeighborListInUseLTECellElement: fapServiceListElement.getCellConfig().getLTE().getRAN().getNeighborListInUse().getLTENeighborListInUseLTECell()) { + String lteNbrListPrefix = "lte-ran-neighbor-list-in-use-lte-cell-changed["+lteNbrListInUseCount+"]."; + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+lteNbrListPrefix+"plmnid") + .put(STRING_VALUE, lTENeighborListInUseLTECellElement.getPlmnid())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+lteNbrListPrefix+"cid") + .put(STRING_VALUE, lTENeighborListInUseLTECellElement.getCid())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+lteNbrListPrefix+"phy-cell-id") + .put(STRING_VALUE, lTENeighborListInUseLTECellElement.getPhyCellId())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+lteNbrListPrefix+"pnf-name") + .put(STRING_VALUE, lTENeighborListInUseLTECellElement.getPnfName())); + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, prefix+lteNbrListPrefix+"blacklisted") + .put(STRING_VALUE, lTENeighborListInUseLTECellElement.getBlacklisted())); + lteNbrListInUseCount++; + } + + count++; + } + + sliParametersArray.put(new JSONObject().put(PARAMETER_NAME, HANDLE_NBRLIST_CHANGE_NOTIF_INPUT+"payload") + .put(STRING_VALUE, payloadString)); + + context.put(SLI_PARAMETERS, sliParametersArray); + + Writer writer = new StringWriter(); + velocityEngine.mergeTemplate(templatePath, UTF_8, context, writer); + writer.flush(); + + return writer.toString(); + } + + @Override + public void onNetconfConfigChange(final NetconfConfigChange notification) { + + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/SdncOdlConnection.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/SdncOdlConnection.java new file mode 100644 index 000000000..c4687eb79 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/SdncOdlConnection.java @@ -0,0 +1,151 @@ +/*- + * ============LICENSE_START======================================================= + * openECOMP : SDN-C + * ================================================================================ + * Copyright (C) 2017 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; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.Authenticator; +import java.net.HttpURLConnection; +import java.net.PasswordAuthentication; +import java.net.URL; +import javax.net.ssl.HostnameVerifier; +import javax.net.ssl.HttpsURLConnection; +import javax.net.ssl.SSLSession; +import org.apache.commons.codec.binary.Base64; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + + +public class SdncOdlConnection { + + private static final Logger LOG = LoggerFactory + .getLogger(SdncOdlConnection.class); + + private HttpURLConnection httpConn = null; + + private String url = null; + private String user = null; + private String password = null; + + private class SdncAuthenticator extends Authenticator { + + private String user; + private String passwd; + + SdncAuthenticator(String user, String passwd) { + this.user = user; + this.passwd = passwd; + } + + @Override + protected PasswordAuthentication getPasswordAuthentication() { + return new PasswordAuthentication(user, passwd.toCharArray()); + } + } + + private SdncOdlConnection() { + + } + + private SdncOdlConnection(String url, String user, String password) { + this.url = url; + this.user = user; + this.password = password; + + try { + URL sdncUrl = new URL(url); + Authenticator.setDefault(new SdncAuthenticator(user, password)); + + this.httpConn = (HttpURLConnection) sdncUrl.openConnection(); + } catch (Exception e) { + LOG.error("Unable to create http connection", e); + } + } + + public static SdncOdlConnection newInstance(String url, String user, String password) { + return new SdncOdlConnection(url, user, password); + } + + + public String send(String method, String contentType, String msg) throws IOException { + + LOG.info(String.format("Sending REST %s to %s", method, url)); + LOG.info(String.format("Message body:%n%s", msg)); + String authStr = user + ":" + password; + String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes())); + + httpConn.addRequestProperty("Authentication", "Basic " + encodedAuthStr); + + httpConn.setRequestMethod(method); + httpConn.setRequestProperty("Content-Type", contentType); + httpConn.setRequestProperty("Accept", contentType); + + httpConn.setDoInput(true); + httpConn.setDoOutput(true); + httpConn.setUseCaches(false); + + if (httpConn instanceof HttpsURLConnection) { + HostnameVerifier hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + ((HttpsURLConnection) httpConn).setHostnameVerifier(hostnameVerifier); + } + + // Write message + httpConn.setRequestProperty("Content-Length", Integer.toString(msg.length())); + DataOutputStream outStr = new DataOutputStream(httpConn.getOutputStream()); + outStr.write(msg.getBytes()); + outStr.close(); + + // Read response + BufferedReader respRdr; + + LOG.info("Response: " + httpConn.getResponseCode() + " " + httpConn.getResponseMessage()); + + if (httpConn.getResponseCode() < 300) { + + respRdr = new BufferedReader(new InputStreamReader(httpConn.getInputStream())); + } else { + respRdr = new BufferedReader(new InputStreamReader(httpConn.getErrorStream())); + } + + StringBuilder respBuff = new StringBuilder(); + + String respLn; + + while ((respLn = respRdr.readLine()) != null) { + respBuff.append(respLn).append("\n"); + } + respRdr.close(); + + String respString = respBuff.toString(); + + LOG.info(String.format("Response body :%n%s", respString)); + + return respString; + } +} 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 new file mode 100644 index 000000000..def38a3db --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/CellConfig.java @@ -0,0 +1,48 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "LTE" +}) +public class CellConfig { + + @JsonProperty("LTE") + private LTE lTE; + + /** + * No args constructor for use in serialization + * + */ + public CellConfig() { + } + + /** + * + * @param lTE + */ + public CellConfig(LTE lTE) { + super(); + this.lTE = lTE; + } + + @JsonProperty("LTE") + public LTE getLTE() { + return lTE; + } + + @JsonProperty("LTE") + public void setLTE(LTE lTE) { + this.lTE = lTE; + } + + @Override + public String toString() { + return "CellConfig [lTE=" + lTE + "]"; + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/FAPServiceList.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/FAPServiceList.java new file mode 100644 index 000000000..4a74ed291 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/FAPServiceList.java @@ -0,0 +1,77 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "alias", + "X0005b9Lte", + "CellConfig" +}) +public class FAPServiceList { + + @JsonProperty("alias") + private String alias; + @JsonProperty("X0005b9Lte") + private X0005b9Lte x0005b9Lte; + @JsonProperty("CellConfig") + private CellConfig cellConfig; + + /** + * No args constructor for use in serialization + * + */ + public FAPServiceList() { + } + + /** + * + * @param alias + * @param cellConfig + * @param x0005b9Lte + */ + public FAPServiceList(String alias, X0005b9Lte x0005b9Lte, CellConfig cellConfig) { + super(); + this.alias = alias; + this.x0005b9Lte = x0005b9Lte; + this.cellConfig = cellConfig; + } + + @JsonProperty("alias") + public String getAlias() { + return alias; + } + + @JsonProperty("alias") + public void setAlias(String alias) { + this.alias = alias; + } + + @JsonProperty("X0005b9Lte") + public X0005b9Lte getX0005b9Lte() { + return x0005b9Lte; + } + + @JsonProperty("X0005b9Lte") + public void setX0005b9Lte(X0005b9Lte x0005b9Lte) { + this.x0005b9Lte = x0005b9Lte; + } + + @JsonProperty("CellConfig") + public CellConfig getCellConfig() { + return cellConfig; + } + + @JsonProperty("CellConfig") + public void setCellConfig(CellConfig cellConfig) { + this.cellConfig = cellConfig; + } + + @Override + public String toString() { + return "FAPServiceList [alias=" + alias + ", x0005b9Lte=" + x0005b9Lte + ", cellConfig=" + cellConfig + "]"; + } +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTE.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTE.java new file mode 100644 index 000000000..a43ebe067 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTE.java @@ -0,0 +1,48 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "RAN" +}) +public class LTE { + + @JsonProperty("RAN") + private RAN rAN; + + /** + * No args constructor for use in serialization + * + */ + public LTE() { + } + + /** + * + * @param rAN + */ + public LTE(RAN rAN) { + super(); + this.rAN = rAN; + } + + @JsonProperty("RAN") + public RAN getRAN() { + return rAN; + } + + @JsonProperty("RAN") + public void setRAN(RAN rAN) { + this.rAN = rAN; + } + + @Override + public String toString() { + return "LTE [rAN=" + rAN + "]"; + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTENeighborListInUseLTECell.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTENeighborListInUseLTECell.java new file mode 100644 index 000000000..e1585cdba --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/LTENeighborListInUseLTECell.java @@ -0,0 +1,155 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "pnfName", + "enable", + "alias", + "mustInclude", + "plmnid", + "cid", + "phyCellId", + "blacklisted" +}) +public class LTENeighborListInUseLTECell { + + @JsonProperty("pnfName") + private String pnfName; + @JsonProperty("enable") + private String enable; + @JsonProperty("alias") + private String alias; + @JsonProperty("mustInclude") + private String mustInclude; + @JsonProperty("plmnid") + private String plmnid; + @JsonProperty("cid") + private String cid; + @JsonProperty("phyCellId") + private String phyCellId; + @JsonProperty("blacklisted") + private String blacklisted; + + /** + * No args constructor for use in serialization + * + */ + public LTENeighborListInUseLTECell() { + } + + /** + * + * @param mustInclude + * @param phyCellId + * @param alias + * @param enable + * @param blacklisted + * @param cid + * @param pnfName + * @param plmnid + */ + public LTENeighborListInUseLTECell(String pnfName, String enable, String alias, String mustInclude, String plmnid, String cid, String phyCellId, String blacklisted) { + super(); + this.pnfName = pnfName; + this.enable = enable; + this.alias = alias; + this.mustInclude = mustInclude; + this.plmnid = plmnid; + this.cid = cid; + this.phyCellId = phyCellId; + this.blacklisted = blacklisted; + } + + @JsonProperty("pnfName") + public String getPnfName() { + return pnfName; + } + + @JsonProperty("pnfName") + public void setPnfName(String pnfName) { + this.pnfName = pnfName; + } + + @JsonProperty("enable") + public String getEnable() { + return enable; + } + + @JsonProperty("enable") + public void setEnable(String enable) { + this.enable = enable; + } + + @JsonProperty("alias") + public String getAlias() { + return alias; + } + + @JsonProperty("alias") + public void setAlias(String alias) { + this.alias = alias; + } + + @JsonProperty("mustInclude") + public String getMustInclude() { + return mustInclude; + } + + @JsonProperty("mustInclude") + public void setMustInclude(String mustInclude) { + this.mustInclude = mustInclude; + } + + @JsonProperty("plmnid") + public String getPlmnid() { + return plmnid; + } + + @JsonProperty("plmnid") + public void setPlmnid(String plmnid) { + this.plmnid = plmnid; + } + + @JsonProperty("cid") + public String getCid() { + return cid; + } + + @JsonProperty("cid") + public void setCid(String cid) { + this.cid = cid; + } + + @JsonProperty("phyCellId") + public String getPhyCellId() { + return phyCellId; + } + + @JsonProperty("phyCellId") + public void setPhyCellId(String phyCellId) { + this.phyCellId = phyCellId; + } + + @JsonProperty("blacklisted") + public String getBlacklisted() { + return blacklisted; + } + + @JsonProperty("blacklisted") + public void setBlacklisted(String blacklisted) { + this.blacklisted = blacklisted; + } + + @Override + public String toString() { + return "LTENeighborListInUseLTECell [pnfName=" + pnfName + ", enable=" + enable + ", alias=" + alias + + ", mustInclude=" + mustInclude + ", plmnid=" + plmnid + ", cid=" + cid + ", phyCellId=" + phyCellId + + ", blacklisted=" + blacklisted + "]"; + } + +} 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 new file mode 100644 index 000000000..39cc22208 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/NeighborListInUse.java @@ -0,0 +1,64 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "LTECellNumberOfEntries", + "LTENeighborListInUseLTECell" +}) +public class NeighborListInUse { + + @JsonProperty("LTECellNumberOfEntries") + private String lTECellNumberOfEntries; + @JsonProperty("LTENeighborListInUseLTECell") + private List<LTENeighborListInUseLTECell> lTENeighborListInUseLTECell = null; + + /** + * No args constructor for use in serialization + * + */ + public NeighborListInUse() { + } + + /** + * + * @param lTENeighborListInUseLTECell + * @param lTECellNumberOfEntries + */ + public NeighborListInUse(String lTECellNumberOfEntries, List<LTENeighborListInUseLTECell> lTENeighborListInUseLTECell) { + super(); + this.lTECellNumberOfEntries = lTECellNumberOfEntries; + this.lTENeighborListInUseLTECell = lTENeighborListInUseLTECell; + } + + @JsonProperty("LTECellNumberOfEntries") + public String getLTECellNumberOfEntries() { + return lTECellNumberOfEntries; + } + + @JsonProperty("LTECellNumberOfEntries") + public void setLTECellNumberOfEntries(String lTECellNumberOfEntries) { + this.lTECellNumberOfEntries = lTECellNumberOfEntries; + } + + @JsonProperty("LTENeighborListInUseLTECell") + public List<LTENeighborListInUseLTECell> getLTENeighborListInUseLTECell() { + return lTENeighborListInUseLTECell; + } + + @JsonProperty("LTENeighborListInUseLTECell") + public void setLTENeighborListInUseLTECell(List<LTENeighborListInUseLTECell> lTENeighborListInUseLTECell) { + this.lTENeighborListInUseLTECell = lTENeighborListInUseLTECell; + } + + @Override + public String toString() { + return "NeighborListInUse [lTECellNumberOfEntries=" + lTECellNumberOfEntries + ", lTENeighborListInUseLTECell=" + + lTENeighborListInUseLTECell + "]"; + } +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/Payload.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/Payload.java new file mode 100644 index 000000000..3e37f7529 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/Payload.java @@ -0,0 +1,48 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "RadioAccess" +}) +public class Payload { + + @JsonProperty("RadioAccess") + private RadioAccess radioAccess; + + /** + * No args constructor for use in serialization + * + */ + public Payload() { + } + + /** + * + * @param radioAccess + */ + public Payload(RadioAccess radioAccess) { + super(); + this.radioAccess = radioAccess; + } + + @JsonProperty("RadioAccess") + public RadioAccess getRadioAccess() { + return radioAccess; + } + + @JsonProperty("RadioAccess") + public void setRadioAccess(RadioAccess radioAccess) { + this.radioAccess = radioAccess; + } + + @Override + public String toString() { + return "Payload [radioAccess=" + radioAccess + "]"; + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/PayloadObject.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/PayloadObject.java new file mode 100644 index 000000000..6c5d3a8d7 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/PayloadObject.java @@ -0,0 +1,48 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "Payload" +}) +public class PayloadObject { + + @JsonProperty("Payload") + private Payload payload; + + /** + * No args constructor for use in serialization + * + */ + public PayloadObject() { + } + + /** + * + * @param payload + */ + public PayloadObject(Payload payload) { + super(); + this.payload = payload; + } + + @JsonProperty("Payload") + public Payload getPayload() { + return payload; + } + + @JsonProperty("Payload") + public void setPayload(Payload payload) { + this.payload = payload; + } + + @Override + public String toString() { + return "PayloadObject [payload=" + payload + "]"; + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RAN.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RAN.java new file mode 100644 index 000000000..6709cddc2 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RAN.java @@ -0,0 +1,62 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "CellIdentity", + "NeighborListInUse" +}) +public class RAN { + + @JsonProperty("CellIdentity") + private String cellIdentity; + @JsonProperty("NeighborListInUse") + private NeighborListInUse neighborListInUse; + + /** + * No args constructor for use in serialization + * + */ + public RAN() { + } + + /** + * + * @param neighborListInUse + * @param cellIdentity + */ + public RAN(String cellIdentity, NeighborListInUse neighborListInUse) { + super(); + this.cellIdentity = cellIdentity; + this.neighborListInUse = neighborListInUse; + } + + @JsonProperty("CellIdentity") + public String getCellIdentity() { + return cellIdentity; + } + + @JsonProperty("CellIdentity") + public void setCellIdentity(String cellIdentity) { + this.cellIdentity = cellIdentity; + } + + @JsonProperty("NeighborListInUse") + public NeighborListInUse getNeighborListInUse() { + return neighborListInUse; + } + + @JsonProperty("NeighborListInUse") + public void setNeighborListInUse(NeighborListInUse neighborListInUse) { + this.neighborListInUse = neighborListInUse; + } + + @Override + public String toString() { + return "RAN [cellIdentity=" + cellIdentity + ", neighborListInUse=" + neighborListInUse + "]"; + } +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RadioAccess.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RadioAccess.java new file mode 100644 index 000000000..f74ffc049 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/RadioAccess.java @@ -0,0 +1,65 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "FAPServiceNumberOfEntries", + "FAPServiceList" +}) +public class RadioAccess { + + @JsonProperty("FAPServiceNumberOfEntries") + private String fAPServiceNumberOfEntries; + @JsonProperty("FAPServiceList") + private List<FAPServiceList> fAPServiceList = null; + + /** + * No args constructor for use in serialization + * + */ + public RadioAccess() { + } + + /** + * + * @param fAPServiceList + * @param fAPServiceNumberOfEntries + */ + public RadioAccess(String fAPServiceNumberOfEntries, List<FAPServiceList> fAPServiceList) { + super(); + this.fAPServiceNumberOfEntries = fAPServiceNumberOfEntries; + this.fAPServiceList = fAPServiceList; + } + + @JsonProperty("FAPServiceNumberOfEntries") + public String getFAPServiceNumberOfEntries() { + return fAPServiceNumberOfEntries; + } + + @JsonProperty("FAPServiceNumberOfEntries") + public void setFAPServiceNumberOfEntries(String fAPServiceNumberOfEntries) { + this.fAPServiceNumberOfEntries = fAPServiceNumberOfEntries; + } + + @JsonProperty("FAPServiceList") + public List<FAPServiceList> getFAPServiceList() { + return fAPServiceList; + } + + @JsonProperty("FAPServiceList") + public void setFAPServiceList(List<FAPServiceList> fAPServiceList) { + this.fAPServiceList = fAPServiceList; + } + + @Override + public String toString() { + return "RadioAccess [fAPServiceNumberOfEntries=" + fAPServiceNumberOfEntries + ", fAPServiceList=" + + fAPServiceList + "]"; + } + +} diff --git a/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/X0005b9Lte.java b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/X0005b9Lte.java new file mode 100644 index 000000000..98cc4500a --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/java/org/onap/ccsdk/features/sdnr/northbound/oofpcipoc/handlenotif/pojos/X0005b9Lte.java @@ -0,0 +1,65 @@ + +package org.onap.ccsdk.features.sdnr.northbound.oofpcipoc.handlenotif.pojos; + +import java.math.BigInteger; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "phyCellIdInUse", + "pnfName" +}) +public class X0005b9Lte { + + @JsonProperty("phyCellIdInUse") + private String phyCellIdInUse; + @JsonProperty("pnfName") + private String pnfName; + + /** + * No args constructor for use in serialization + * + */ + public X0005b9Lte() { + } + + /** + * + * @param bigInteger + * @param pnfName + */ + public X0005b9Lte(String phyCellIdInUse, String pnfName) { + super(); + this.phyCellIdInUse = phyCellIdInUse; + this.pnfName = pnfName; + } + + @JsonProperty("phyCellIdInUse") + public String getPhyCellIdInUse() { + return phyCellIdInUse; + } + + @JsonProperty("phyCellIdInUse") + public void setPhyCellIdInUse(String phyCellIdInUse) { + this.phyCellIdInUse = phyCellIdInUse; + } + + @JsonProperty("pnfName") + public String getPnfName() { + return pnfName; + } + + @JsonProperty("pnfName") + public void setPnfName(String pnfName) { + this.pnfName = pnfName; + } + + @Override + public String toString() { + return "X0005b9Lte [phyCellIdInUse=" + phyCellIdInUse + ", pnfName=" + pnfName + "]"; + } + +} 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 new file mode 100644 index 000000000..6bb5e3833 --- /dev/null +++ b/sdnr/northbound/oofpcipoc/consumer/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- Copyright © ${copyrightYear} ${copyright} and others. All rights reserved. This program and the accompanying materials + are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available + at http://www.eclipse.org/legal/epl-v10.html --> + +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" + xmlns:odl="http://opendaylight.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/installer/pom.xml b/sdnr/northbound/oofpcipoc/installer/pom.xml index e12dfdfc9..048995445 100644 --- a/sdnr/northbound/oofpcipoc/installer/pom.xml +++ b/sdnr/northbound/oofpcipoc/installer/pom.xml @@ -87,7 +87,7 @@ <useRepositoryLayout>true</useRepositoryLayout> <addParentPoms>false</addParentPoms> <copyPom>false</copyPom> - <includeArtifactIds>oofpcipoc-model,oofpcipoc-provider,sdnr-oofpcipoc</includeArtifactIds> + <includeArtifactIds>oofpcipoc-model,oofpcipoc-provider,oofpcipoc-consumer,sdnr-oofpcipoc</includeArtifactIds> <scope>provided</scope> </configuration> </execution> diff --git a/sdnr/northbound/oofpcipoc/pom.xml b/sdnr/northbound/oofpcipoc/pom.xml index fca71548e..1e3a9e2b3 100644 --- a/sdnr/northbound/oofpcipoc/pom.xml +++ b/sdnr/northbound/oofpcipoc/pom.xml @@ -20,6 +20,7 @@ <module>model</module> <module>feature</module> <module>provider</module> + <module>consumer</module> <module>installer</module> </modules> |