Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports.recordServiceRequestFromClient = async function (serverApplicationName,
* @param {number} responseCode response code of the rest call execution<br>
* @param {object} requestBody request body<br>
* @param {object} responseBody response body<br>
* @param {String} execTime time taken to execute this request
* @param {Number} execTime time taken to execute this request
* @returns {Promise<boolean>} returns true if the operation is successful. Promise is never rejected.<br>
*/
exports.recordServiceRequest = async function (xCorrelator, traceIndicator, userName, originator,
Expand Down
2 changes: 1 addition & 1 deletion server/applicationPattern/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onf-core-model-ap",
"version": "2.1.1-alpha.7",
"version": "2.1.1-beta.1",
"description": "onf core model application pattern",
"main": "index.js",
"scripts": {
Expand Down
28 changes: 14 additions & 14 deletions server/basicServices/basicServices/BasicServicesService.js
Original file line number Diff line number Diff line change
Expand Up @@ -874,32 +874,32 @@ exports.updateClient = async function (body, user, xCorrelator, traceIndicator,

if (httpClientUuidOfFutureApplication) {
let tcpClientUuidOfFutureApplication = await LogicalTerminationPoint.getServerLtpListAsync(httpClientUuidOfFutureApplication);
let existingIpAddressOfFutureApplication = await tcpClientInterface.getRemoteAddressAsync(tcpClientUuidOfFutureApplication);
let existingProtocolOfFutureApplication = await tcpClientInterface.getRemoteProtocolAsync(tcpClientUuidOfFutureApplication);
let existingPortOfFutureApplication = await tcpClientInterface.getRemotePortAsync(tcpClientUuidOfFutureApplication);
let existingIpAddressOfFutureApplication = await tcpClientInterface.getRemoteAddressAsync(tcpClientUuidOfFutureApplication[0]);
let existingProtocolOfFutureApplication = await tcpClientInterface.getRemoteProtocolAsync(tcpClientUuidOfFutureApplication[0]);
let existingPortOfFutureApplication = await tcpClientInterface.getRemotePortAsync(tcpClientUuidOfFutureApplication[0]);

let isIpAddressOfFutureApplicationUpdated = false;
let isProtocolOfFutureApplicationUpdated = false;
let isPortOfFutureApplicationUpdated = false;

if (JSON.stringify(futureAddress) != JSON.stringify(existingIpAddressOfFutureApplication)) {
isIpAddressOfFutureApplicationUpdated = await tcpClientInterface.setRemoteAddressAsync(
tcpClientUuidOfFutureApplication,
tcpClientUuidOfFutureApplication[0],
futureAddress);
}
if (futureProtocol != existingProtocolOfFutureApplication) {
isProtocolOfFutureApplicationUpdated = await tcpClientInterface.setRemoteProtocolAsync(
tcpClientUuidOfFutureApplication,
tcpClientUuidOfFutureApplication[0],
futureProtocol);
}
if (futurePort != existingPortOfFutureApplication) {
isPortOfFutureApplicationUpdated = await tcpClientInterface.setRemotePortAsync(
tcpClientUuidOfFutureApplication,
tcpClientUuidOfFutureApplication[0],
futurePort);
}

if (isIpAddressOfFutureApplicationUpdated || isProtocolOfFutureApplicationUpdated || isPortOfFutureApplicationUpdated) {
ltpConfigurationList.push(tcpClientUuidOfFutureApplication);
ltpConfigurationList.push(tcpClientUuidOfFutureApplication[0]);
}

if (httpClientUuidOfCurrentApplication) {
Expand All @@ -908,27 +908,27 @@ exports.updateClient = async function (body, user, xCorrelator, traceIndicator,
}
} else if (httpClientUuidOfCurrentApplication) {
let tcpClientUuidOfCurrentApplication = await LogicalTerminationPoint.getServerLtpListAsync(httpClientUuidOfCurrentApplication);
let existingIpAddressOfCurrentApplication = await tcpClientInterface.getRemoteAddressAsync(tcpClientUuidOfCurrentApplication);
let existingProtocolOfCurrentApplication = await tcpClientInterface.getRemoteProtocolAsync(tcpClientUuidOfCurrentApplication);
let existingPortOfCurrentApplication = await tcpClientInterface.getRemotePortAsync(tcpClientUuidOfCurrentApplication);
let existingIpAddressOfCurrentApplication = await tcpClientInterface.getRemoteAddressAsync(tcpClientUuidOfCurrentApplication[0]);
let existingProtocolOfCurrentApplication = await tcpClientInterface.getRemoteProtocolAsync(tcpClientUuidOfCurrentApplication[0]);
let existingPortOfCurrentApplication = await tcpClientInterface.getRemotePortAsync(tcpClientUuidOfCurrentApplication[0]);

let isIpAddressOfCurrentApplicationUpdated = false;
let isProtocolOfCurrentApplicationUpdated = false;
let isPortOfCurrentApplicationUpdated = false;

if (JSON.stringify(futureAddress) != JSON.stringify(existingIpAddressOfCurrentApplication)) {
isIpAddressOfCurrentApplicationUpdated = await tcpClientInterface.setRemoteAddressAsync(
tcpClientUuidOfCurrentApplication,
tcpClientUuidOfCurrentApplication[0],
futureAddress);
}
if (futureProtocol != existingProtocolOfCurrentApplication) {
isProtocolOfCurrentApplicationUpdated = await tcpClientInterface.setRemoteProtocolAsync(
tcpClientUuidOfCurrentApplication,
tcpClientUuidOfCurrentApplication[0],
futureProtocol);
}
if (futurePort != existingPortOfCurrentApplication) {
isPortOfCurrentApplicationUpdated = await tcpClientInterface.setRemotePortAsync(
tcpClientUuidOfCurrentApplication,
tcpClientUuidOfCurrentApplication[0],
futurePort);
}

Expand All @@ -941,7 +941,7 @@ exports.updateClient = async function (body, user, xCorrelator, traceIndicator,
futureReleaseNumber);

if (isIpAddressOfCurrentApplicationUpdated || isProtocolOfCurrentApplicationUpdated || isPortOfCurrentApplicationUpdated) {
ltpConfigurationList.push(tcpClientUuidOfCurrentApplication);
ltpConfigurationList.push(tcpClientUuidOfCurrentApplication[0]);
}

if (isApplicationNameUpdated || isReleaseNumberUpdated) {
Expand Down
4 changes: 2 additions & 2 deletions server/basicServices/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onf-core-model-ap-bs",
"version": "2.1.1-alpha.7",
"version": "2.1.1-beta.1",
"description": "onf core model application pattern",
"main": "index.js",
"scripts": {
Expand All @@ -14,7 +14,7 @@
"js-yaml": "^3.3.0",
"moment": "^2.29.1",
"node-statsd": "^0.1.1",
"onf-core-model-ap": "2.1.1-alpha.7",
"onf-core-model-ap": "2.1.1-beta.1",
"openbackhaul-oas3-tools": "2.3.1-alpha.3",
"randexp": "^0.5.3",
"response-time": "^2.3.2"
Expand Down