Skip to content

Commit

Permalink
Fix/consumption reporting changes (#7)
Browse files Browse the repository at this point in the history
* Minor corrections to consumption reporting endpoint

* Increase version number

* Add consumption reporting examples

* Increase version number to 1.1.0
  • Loading branch information
dsilhavy authored Dec 11, 2023
1 parent 8c16029 commit 4efad62
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion express-mock-af/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "express-mock-af",
"version": "0.0.0",
"version": "1.1.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
Expand Down
11 changes: 2 additions & 9 deletions express-mock-af/routes/consumption-reporting.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
var express = require('express');
var router = express.Router();

var querystring = require('querystring');
var querystring = require('body-parser');


router.post('/:provisisioningSessionId', function(req, res, next) {
const provisisioningSessionId = req.params.provisisioningSessionId;
//res.send("respond a resource for consumption-reporting with post for provisisioningSessionId:" + provisisioningSessionId);

router.post('/:provisioningSessionId', function(req, res, next) {
res.send(204);
});

module.exports = router;
module.exports = router;
5 changes: 3 additions & 2 deletions express-mock-af/routes/m8.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ var express = require('express');
var router = express.Router();

const m8 = {
m5BaseUrl: 'http://10.147.67.179:3003/3gpp-m5/v2/',
//m5BaseUrl: 'http://192.168.178.78:3003/3gpp-m5/v2/',
m5BaseUrl: 'http://10.147.67.10:3003/3gpp-m5/v2/',
serviceList: [
{
provisioningSessionId: 1,
Expand Down Expand Up @@ -47,4 +48,4 @@ router.get('/m8.json', function (req, res, next) {
res.json(m8)
});

module.exports = router;
module.exports = router;
19 changes: 15 additions & 4 deletions express-mock-af/routes/service-access-information.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
var express = require('express');
var router = express.Router();

//const baseUrl = 'http://192.168.178.78:3003';
const baseUrl = 'http://10.147.67.10:3003';
const sai = {
3: {
provisioningSessionId: 3,
Expand All @@ -21,9 +23,9 @@ const sai = {
]
},
clientConsumptionReportingConfiguration: {
serverAddresses: ['http://10.64.15.112:3003/3gpp-m5/v2/'],
locationReporting: false,
samplePercentage: 60.5,
serverAddresses: [`${baseUrl}/3gpp-m5/v2/`],
locationReporting: true,
samplePercentage: 99,
reportingInterval: 10,
accessReporting: true
}
Expand All @@ -41,14 +43,23 @@ const sai = {
]
}
]
},
clientConsumptionReportingConfiguration: {
serverAddresses: [`${baseUrl}/3gpp-m5/v2/`],
locationReporting: true,
samplePercentage: 100,
reportingInterval: 10,
accessReporting: true
}
}
}

/* GET users listing. */
router.get('/:provisioningSessionId', function (req, res, next) {
const id = req.params.provisioningSessionId;
res.setHeader('cache-control', 'max-age=5');
res.setHeader('last-modified', Date.now());
res.json(sai[id])
});

module.exports = router;
module.exports = router;

0 comments on commit 4efad62

Please sign in to comment.