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

support the latest version 2.1.1 schema changes to the server side implementation #342

Merged
merged 2 commits into from
Feb 20, 2024
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
9,939 changes: 4,732 additions & 5,207 deletions server/api/openapi.yaml

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions server/controllers/BasicServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ var responseCodeEnum = require('onf-core-model-ap/applicationPattern/rest/server
var RestResponseHeader = require('onf-core-model-ap/applicationPattern/rest/server/ResponseHeader');
var RestResponseBuilder = require('onf-core-model-ap/applicationPattern/rest/server/ResponseBuilder');
var ExecutionAndTraceService = require('onf-core-model-ap/applicationPattern/services/ExecutionAndTraceService');
var utils = require('../utils/writer.js');

const NEW_RELEASE_FORWARDING_NAME = 'PromptForBequeathingDataCausesTransferOfListOfApplications';

module.exports.disposeRemaindersOfDeregisteredApplication = function disposeRemaindersOfDeregisteredApplication (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
BasicServices.disposeRemaindersOfDeregisteredApplication(body, user, originator, xCorrelator, traceIndicator, customerJourney)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.embedYourself = async function embedYourself(req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
let startTime = process.hrtime();
let responseCode = responseCodeEnum.code.NO_CONTENT;
Expand Down Expand Up @@ -85,6 +96,16 @@ module.exports.informAboutApplicationInGenericRepresentation = async function in
ExecutionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
};

module.exports.informAboutPrecedingRelease = function informAboutPrecedingRelease (req, res, next, user, originator, xCorrelator, traceIndicator, customerJourney) {
BasicServices.informAboutPrecedingRelease(user, originator, xCorrelator, traceIndicator, customerJourney)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.informAboutReleaseHistory = async function informAboutReleaseHistory(req, res, next, user, originator, xCorrelator, traceIndicator, customerJourney) {
let startTime = process.hrtime();
let responseCode = responseCodeEnum.code.OK;
Expand Down Expand Up @@ -123,6 +144,16 @@ module.exports.informAboutReleaseHistoryInGenericRepresentation = async function
ExecutionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
};

module.exports.inquireBasicAuthRequestApprovals = function inquireBasicAuthRequestApprovals (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
BasicServices.inquireBasicAuthRequestApprovals(body, user, originator, xCorrelator, traceIndicator, customerJourney)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.inquireOamRequestApprovals = async function inquireOamRequestApprovals(req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
let startTime = process.hrtime();
let responseCode = responseCodeEnum.code.NO_CONTENT;
Expand Down Expand Up @@ -283,6 +314,16 @@ module.exports.updateClient = async function updateClient(req, res, next, body,
ExecutionAndTraceService.recordServiceRequest(xCorrelator, traceIndicator, user, originator, req.url, responseCode, req.body, responseBodyToDocument);
};

module.exports.updateClientOfSubsequentRelease = function updateClientOfSubsequentRelease (req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
BasicServices.updateClientOfSubsequentRelease(body, user, originator, xCorrelator, traceIndicator, customerJourney)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.updateOperationClient = async function updateOperationClient(req, res, next, body, user, originator, xCorrelator, traceIndicator, customerJourney) {
let startTime = process.hrtime();
let responseCode = responseCodeEnum.code.NO_CONTENT;
Expand Down
74 changes: 74 additions & 0 deletions server/controllers/IntegerProfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
'use strict';

var utils = require('../utils/writer.js');
var IntegerProfile = require('../service/IntegerProfileService');

module.exports.getIntegerProfileIntegerName = function getIntegerProfileIntegerName (req, res, next, uuid) {
IntegerProfile.getIntegerProfileIntegerName(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.getIntegerProfileIntegerValue = function getIntegerProfileIntegerValue (req, res, next, uuid) {
IntegerProfile.getIntegerProfileIntegerValue(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.getIntegerProfileMaximum = function getIntegerProfileMaximum (req, res, next, uuid) {
IntegerProfile.getIntegerProfileMaximum(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.getIntegerProfileMinimum = function getIntegerProfileMinimum (req, res, next, uuid) {
IntegerProfile.getIntegerProfileMinimum(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.getIntegerProfilePurpose = function getIntegerProfilePurpose (req, res, next, uuid) {
IntegerProfile.getIntegerProfilePurpose(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.getIntegerProfileUnit = function getIntegerProfileUnit (req, res, next, uuid) {
IntegerProfile.getIntegerProfileUnit(uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};

module.exports.putIntegerProfileIntegerValue = function putIntegerProfileIntegerValue (req, res, next, body, uuid) {
IntegerProfile.putIntegerProfileIntegerValue(body, uuid)
.then(function (response) {
utils.writeJson(res, response);
})
.catch(function (response) {
utils.writeJson(res, response);
});
};
Loading
Loading