Skip to content

Commit

Permalink
support the latest version 2.1.1 schema changes to the server side im…
Browse files Browse the repository at this point in the history
…plementation
  • Loading branch information
at00825957 committed Feb 20, 2024
1 parent 1a539ba commit a6f559b
Show file tree
Hide file tree
Showing 6 changed files with 5,628 additions and 5,784 deletions.
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

0 comments on commit a6f559b

Please sign in to comment.