Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.1.1 impl ro develop #389

Merged
merged 44 commits into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0989b2c
working on issue 340
at00825957 Feb 19, 2024
8649d44
Revert "support the latest version 2.1.1 schema changes to the server…
IswaryaaS Feb 20, 2024
2cf7f14
Merge pull request #343 from openBackhaul/revert-342-Aman/issue338
IswaryaaS Feb 20, 2024
11766f7
Revert "aman/issue338"
IswaryaaS Feb 20, 2024
b182d65
Merge pull request #344 from openBackhaul/revert-343-revert-342-Aman/…
IswaryaaS Feb 20, 2024
efd7cc3
Fixes #338
IswaryaaS Feb 22, 2024
eb96c49
Merge pull request #346 from openBackhaul/IswaryaaS/issue338
PrathibaJee Feb 22, 2024
8149efe
adding integer profile
at00825957 Feb 26, 2024
20536c3
remove duplicate attribute
at00825957 Feb 28, 2024
66da0f8
Remove unused callback from /v1/bequeath-your-data-and-die (#347)
at00825957 Feb 28, 2024
8cb8226
Merge branch 'v2.1.1_impl' into Aman/issue340
at00825957 Mar 4, 2024
f099c05
implement maxWaitTimeToRecieveOperationKey
at00825957 Mar 5, 2024
ad404ef
get maximumNumberOfAttemptsToCreateLink and maximumWaitTimeToReceiveO…
at00825957 Mar 6, 2024
ed19f4a
change response code from 204 to 200
at00825957 Mar 11, 2024
96c7820
revert back validate security
at00825957 Mar 11, 2024
c262332
getting httpClientUuid based on application name and release number
at00825957 Apr 10, 2024
1f0f4cf
update new application patter package
at00825957 Apr 10, 2024
1f0ce36
Merge pull request #349 from openBackhaul/Aman/issue340
PrathibaJee Apr 11, 2024
f3c8bba
implement new application pattern changes
at00825957 May 7, 2024
1f188d5
rectify code
at00825957 May 7, 2024
863cd45
updating package-lock.json file
at00825957 May 11, 2024
49701ad
Merge pull request #353 from openBackhaul/Aman/issue340
PrathibaJee May 11, 2024
e739dde
change forwarding name for list of applications service (#354)
at00825957 Jun 4, 2024
312f834
RequestForInquiringServiceRecords and CreateLinkForReceivingServiceRe…
at00825957 Jun 5, 2024
194117b
Mechanism to handle 2 consecutive regard application request
IswaryaaS Jun 5, 2024
de1d095
adding test file
ManasaBM1 Jun 10, 2024
0d295bd
Resolved v1/regard-application service sending /v1/redirect-service-r…
at00825957 Jun 11, 2024
4db52d3
Resolved tarce-indicator issue
at00825957 Jun 14, 2024
c267cb7
Merge pull request #361 from openBackhaul/IswaryaaS/issue358
PrathibaJee Jun 16, 2024
fcaa161
Merge pull request #363 from ManasaBM1/ManasaBM1/issue362
PrathibaJee Jun 16, 2024
c3b9be1
Rename the function and cherry picked Dana's code from PR no 316
at00825957 Jun 18, 2024
4a33f2a
Merge branch 'v2.1.1_impl' into Aman/issue364
PrathibaJee Jun 18, 2024
469a503
Merge pull request #365 from openBackhaul/Aman/issue364
PrathibaJee Jun 18, 2024
d8d04c1
PrathibaJee/issue371 (#378)
PrathibaJee Jun 27, 2024
5541743
deleting a file
ManasaBM1 Jul 9, 2024
0d4aff6
Merge pull request #379 from ManasaBM1/pacakage
PrathibaJee Jul 9, 2024
fda096b
incuding a package-lock.json file
ManasaBM1 Jul 15, 2024
51c897b
Merge pull request #380 from ManasaBM1/packagelockfile
PrathibaJee Jul 15, 2024
3d457ca
updating a docker file (#381)
ManasaBM1 Jul 17, 2024
d1bb570
updateClientOfSubsequentRelease gives 500 Internal server error (#383)
PrathibaJee Jul 17, 2024
04723a3
a condition shall be included to check and resolve result once maxNum…
PrathibaJee Jul 23, 2024
db55e57
To include GENERIC_RESPONSE_PROFILE instance for the release "2.1.1" …
PrathibaJee Jul 25, 2024
c2f38a2
Merge branch 'develop' into v2.1.1_impl
PrathibaJee Jul 26, 2024
8997573
Update IndividualServicesService.js
PrathibaJee Jul 26, 2024
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
180 changes: 138 additions & 42 deletions server/controllers/BasicServices.js

Large diffs are not rendered by default.

37 changes: 29 additions & 8 deletions server/controllers/IndividualServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ module.exports.bequeathYourDataAndDie = async function bequeathYourDataAndDie(re
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.disregardApplication = async function disregardApplication (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -41,7 +44,10 @@ module.exports.disregardApplication = async function disregardApplication (req,
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.listApplications = async function listApplications (req, res, next, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -60,7 +66,10 @@ module.exports.listApplications = async function listApplications (req, res, nex
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.listRecords = async function listRecords (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -79,7 +88,10 @@ module.exports.listRecords = async function listRecords (req, res, next, body, u
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.listRecordsOfFlow = async function listRecordsOfFlow (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -98,7 +110,10 @@ module.exports.listRecordsOfFlow = async function listRecordsOfFlow (req, res, n
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.listRecordsOfUnsuccessful = async function listRecordsOfUnsuccessful (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -117,7 +132,10 @@ module.exports.listRecordsOfUnsuccessful = async function listRecordsOfUnsuccess
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};

module.exports.recordServiceRequest = async function recordServiceRequest (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
Expand All @@ -139,7 +157,7 @@ module.exports.recordServiceRequest = async function recordServiceRequest (req,

module.exports.regardApplication = async function regardApplication (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
let startTime = process.hrtime();
let responseCode = responseCodeEnum.code.NO_CONTENT;
let responseCode = responseCodeEnum.code.OK;
let responseBodyToDocument = {};
await IndividualServices.regardApplication(body, user, originator, xCorrelator, traceIndicator, customerJourney, req.url)
.then(async function (responseBody) {
Expand All @@ -153,5 +171,8 @@ module.exports.regardApplication = async function regardApplication (req, res, n
responseCode = sentResp.code;
responseBodyToDocument = sentResp.body;
});
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
let execTime = await restResponseHeader.executionTimeInMilliseconds(startTime);
if (!execTime) execTime = 0;
else execTime = Math.round(execTime);
executionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument, execTime);
};
83 changes: 53 additions & 30 deletions server/controllers/IntegerProfile.js
Original file line number Diff line number Diff line change
@@ -1,74 +1,97 @@
'use strict';

var utils = require('../utils/writer.js');
var IntegerProfile = require('../service/IntegerProfileService');
var responseBuilder = require('onf-core-model-ap/applicationPattern/rest/server/ResponseBuilder');
var responseCodeEnum = require('onf-core-model-ap/applicationPattern/rest/server/ResponseCode');
var oamLogService = require('onf-core-model-ap/applicationPattern/services/OamLogService');

module.exports.getIntegerProfileIntegerName = function getIntegerProfileIntegerName (req, res, next, uuid) {
IntegerProfile.getIntegerProfileIntegerName(uuid)
module.exports.getIntegerProfileIntegerName = async function getIntegerProfileIntegerName (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfileIntegerName(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getIntegerProfileIntegerValue = function getIntegerProfileIntegerValue (req, res, next, uuid) {
IntegerProfile.getIntegerProfileIntegerValue(uuid)
module.exports.getIntegerProfileIntegerValue = async function getIntegerProfileIntegerValue (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfileIntegerValue(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getIntegerProfileMaximum = function getIntegerProfileMaximum (req, res, next, uuid) {
IntegerProfile.getIntegerProfileMaximum(uuid)
module.exports.getIntegerProfileMaximum = async function getIntegerProfileMaximum (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfileMaximum(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getIntegerProfileMinimum = function getIntegerProfileMinimum (req, res, next, uuid) {
IntegerProfile.getIntegerProfileMinimum(uuid)
module.exports.getIntegerProfileMinimum = async function getIntegerProfileMinimum (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfileMinimum(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getIntegerProfilePurpose = function getIntegerProfilePurpose (req, res, next, uuid) {
IntegerProfile.getIntegerProfilePurpose(uuid)
module.exports.getIntegerProfilePurpose = async function getIntegerProfilePurpose (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfilePurpose(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getIntegerProfileUnit = function getIntegerProfileUnit (req, res, next, uuid) {
IntegerProfile.getIntegerProfileUnit(uuid)
module.exports.getIntegerProfileUnit = async function getIntegerProfileUnit (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
await IntegerProfile.getIntegerProfileUnit(req.url)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.putIntegerProfileIntegerValue = function putIntegerProfileIntegerValue (req, res, next, body, uuid) {
IntegerProfile.putIntegerProfileIntegerValue(body, uuid)
module.exports.putIntegerProfileIntegerValue = async function putIntegerProfileIntegerValue (req, res, next, body, uuid) {
let responseCode = responseCodeEnum.code.NO_CONTENT;
await IntegerProfile.putIntegerProfileIntegerValue(req.url, body, uuid)
.then(function (response) {
utils.writeJson(res, response);
responseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
utils.writeJson(res, response);
let sentResp = responseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
};
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};
39 changes: 29 additions & 10 deletions server/database/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,25 @@
}
}
},
{
"uuid": "eatl-2-1-0-response-p-009",
"profile-name": "response-profile-1-0:PROFILE_NAME_TYPE_GENERIC_RESPONSE_PROFILE",
"response-profile-1-0:response-profile-pac": {
"response-profile-capability": {
"operation-name": "/v1/inform-about-release-history-in-generic-representation",
"field-name": {
"field-name-reference": "/core-model-1-4:control-construct/logical-termination-point=eatl-2-1-0-http-s-000/layer-protocol=0/http-server-interface-1-0:http-server-interface-pac/http-server-interface-capability/release-list=2/release-number"
},
"description": "List of release numbers and changes",
"datatype": "string"
},
"response-profile-configuration": {
"value": {
"value-reference": "/core-model-1-4:control-construct/logical-termination-point=eatl-2-1-0-http-s-000/layer-protocol=0/http-server-interface-1-0:http-server-interface-pac/http-server-interface-capability/release-list=2/changes"
}
}
}
},
{
"uuid": "eatl-2-1-0-integer-p-000",
"profile-name": "integer-profile-1-0:PROFILE_NAME_TYPE_INTEGER_PROFILE",
Expand All @@ -231,7 +250,7 @@
"maximum": 5000
},
"integer-profile-configuration": {
"integer-value": 500
"integer-value": 5000
}
}
},
Expand Down Expand Up @@ -1203,7 +1222,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "NewRelease",
"release-number": "2.1.0"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1374,7 +1393,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "RegistryOffice",
"release-number": "2.1.0"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1410,7 +1429,7 @@
"ltp-direction": "core-model-1-4:TERMINATION_DIRECTION_SINK",
"client-ltp": [],
"server-ltp": [
"eatl-2-1-0-http-c-eatl-2-0-1-000"
"eatl-2-1-0-http-c-tar-2-1-0-000"
],
"layer-protocol": [
{
Expand Down Expand Up @@ -1445,7 +1464,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "TypeApprovalRegister",
"release-number": "2.1.0"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1542,7 +1561,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "ExecutionAndTraceLog",
"release-number": "2.0.1"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1638,7 +1657,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "OamLog",
"release-number": "2.0.1"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1734,7 +1753,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "AdministratorAdministration",
"release-number": "2.0.1"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -1980,7 +1999,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "ApplicationLayerTopology",
"release-number": "2.1.0"
"release-number": "2.1.1"
}
}
}
Expand Down Expand Up @@ -2051,7 +2070,7 @@
"http-client-interface-1-0:http-client-interface-pac": {
"http-client-interface-configuration": {
"application-name": "OperationKeyManagement",
"release-number": "2.1.0"
"release-number": "2.1.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion server/dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:16-alpine
FROM node:18

# set nodejs to production mode
ENV NODE_ENV production
Expand Down
3 changes: 2 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ prepareElasticsearch(false).catch(err => {
});
appCommons.performApplicationRegistration();
}
);
);

Loading
Loading