Commit d0c7d846 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'static_ue_ip_addr' into 'develop'

Static ue ip addr

See merge request !9
parents 5d8d4adf f2500ef9
......@@ -35,6 +35,9 @@
#include "Helpers.h"
#include "logger.hpp"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -52,17 +55,23 @@ void AMF3GPPAccessRegistrationDocumentApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Patch(
*router, base + "/subscription-data/:ueId/context-data/amf-3gpp-access",
*router,
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-3gpp-access",
Routes::bind(
&AMF3GPPAccessRegistrationDocumentApi::amf_context3gpp_handler,
this));
Routes::Put(
*router, base + "/subscription-data/:ueId/context-data/amf-3gpp-access",
*router,
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-3gpp-access",
Routes::bind(
&AMF3GPPAccessRegistrationDocumentApi::create_amf_context3gpp_handler,
this));
Routes::Get(
*router, base + "/subscription-data/:ueId/context-data/amf-3gpp-access",
*router,
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-3gpp-access",
Routes::bind(
&AMF3GPPAccessRegistrationDocumentApi::query_amf_context3gpp_handler,
this));
......
......@@ -62,7 +62,7 @@ public:
virtual ~AMF3GPPAccessRegistrationDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "AMFNon3GPPAccessRegistrationDocumentApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -53,18 +56,19 @@ void AMFNon3GPPAccessRegistrationDocumentApi::setupRoutes() {
Routes::Patch(
*router,
base + "/subscription-data/:ueId/context-data/amf-non-3gpp-access",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-non-3gpp-access",
Routes::bind(
&AMFNon3GPPAccessRegistrationDocumentApi::amf_context_non3gpp_handler,
this));
Routes::Put(*router,
base +
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-non-3gpp-access",
Routes::bind(&AMFNon3GPPAccessRegistrationDocumentApi::
create_amf_context_non3gpp_handler,
this));
Routes::Get(*router,
base +
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/amf-non-3gpp-access",
Routes::bind(&AMFNon3GPPAccessRegistrationDocumentApi::
query_amf_context_non3gpp_handler,
......
......@@ -64,7 +64,7 @@ public:
virtual ~AMFNon3GPPAccessRegistrationDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "AccessAndMobilityDataApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -51,22 +54,30 @@ void AccessAndMobilityDataApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Put(
*router, base + "/exposure-data/:ueId/access-and-mobility-data",
*router,
base + udr_cfg.nudr.api_version +
"/exposure-data/:ueId/access-and-mobility-data",
Routes::bind(&AccessAndMobilityDataApi::
create_or_replace_access_and_mobility_data_handler,
this));
Routes::Delete(
*router, base + "/exposure-data/:ueId/access-and-mobility-data",
*router,
base + udr_cfg.nudr.api_version +
"/exposure-data/:ueId/access-and-mobility-data",
Routes::bind(
&AccessAndMobilityDataApi::delete_access_and_mobility_data_handler,
this));
Routes::Get(
*router, base + "/exposure-data/:ueId/access-and-mobility-data",
*router,
base + udr_cfg.nudr.api_version +
"/exposure-data/:ueId/access-and-mobility-data",
Routes::bind(
&AccessAndMobilityDataApi::query_access_and_mobility_data_handler,
this));
Routes::Patch(
*router, base + "/exposure-data/:ueId/access-and-mobility-data",
*router,
base + udr_cfg.nudr.api_version +
"/exposure-data/:ueId/access-and-mobility-data",
Routes::bind(
&AccessAndMobilityDataApi::update_access_and_mobility_data_handler,
this));
......
......@@ -59,7 +59,7 @@ public:
virtual ~AccessAndMobilityDataApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "AccessAndMobilityPolicyDataDocumentApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -50,7 +53,9 @@ void AccessAndMobilityPolicyDataDocumentApi::init() { setupRoutes(); }
void AccessAndMobilityPolicyDataDocumentApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Get(*router, base + "/policy-data/ues/:ueId/am-data",
Routes::Get(*router,
base + udr_cfg.nudr.api_version +
"/policy-data/ues/:ueId/am-data",
Routes::bind(&AccessAndMobilityPolicyDataDocumentApi::
read_access_and_mobility_policy_data_handler,
this));
......
......@@ -60,7 +60,7 @@ public:
virtual ~AccessAndMobilityPolicyDataDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -35,6 +35,9 @@
#include "Helpers.h"
#include "logger.hpp"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -54,7 +57,8 @@ void AccessAndMobilitySubscriptionDataDocumentApi::setupRoutes() {
Routes::Get(
*router,
base + "/subscription-data/:ueId/:servingPlmnId/provisioned-data/am-data",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/:servingPlmnId/provisioned-data/am-data",
Routes::bind(
&AccessAndMobilitySubscriptionDataDocumentApi::query_am_data_handler,
this));
......
......@@ -59,7 +59,7 @@ public:
virtual ~AccessAndMobilitySubscriptionDataDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "AmfSubscriptionInfoDocumentApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -52,8 +55,9 @@ void AmfSubscriptionInfoDocumentApi::setupRoutes() {
Routes::Patch(
*router,
base + "/subscription-data/:ueId/context-data/ee-subscriptions/:subsId/"
"amf-subscriptions",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/context-data/ee-subscriptions/:subsId/"
"amf-subscriptions",
Routes::bind(
&AmfSubscriptionInfoDocumentApi::modify_amf_subscription_info_handler,
this));
......
......@@ -61,7 +61,7 @@ public:
virtual ~AmfSubscriptionInfoDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "ApplicationDataSubscriptionsCollectionApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -52,12 +55,14 @@ void ApplicationDataSubscriptionsCollectionApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Post(
*router, base + "/application-data/subs-to-notify",
*router,
base + udr_cfg.nudr.api_version + "/application-data/subs-to-notify",
Routes::bind(&ApplicationDataSubscriptionsCollectionApi::
create_individual_application_data_subscription_handler,
this));
Routes::Get(
*router, base + "/application-data/subs-to-notify",
*router,
base + udr_cfg.nudr.api_version + "/application-data/subs-to-notify",
Routes::bind(&ApplicationDataSubscriptionsCollectionApi::
read_application_data_change_subscriptions_handler,
this));
......
......@@ -59,7 +59,7 @@ public:
virtual ~ApplicationDataSubscriptionsCollectionApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -34,6 +34,9 @@
#include "AuthenticationSoRDocumentApi.h"
#include "Helpers.h"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -52,13 +55,15 @@ void AuthenticationSoRDocumentApi::setupRoutes() {
Routes::Put(
*router,
base + "/subscription-data/:ueId/ue-update-confirmation-data/sor-data",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/ue-update-confirmation-data/sor-data",
Routes::bind(
&AuthenticationSoRDocumentApi::create_authentication_so_r_handler,
this));
Routes::Get(
*router,
base + "/subscription-data/:ueId/ue-update-confirmation-data/sor-data",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/ue-update-confirmation-data/sor-data",
Routes::bind(&AuthenticationSoRDocumentApi::query_auth_so_r_handler,
this));
......
......@@ -58,7 +58,7 @@ public:
virtual ~AuthenticationSoRDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -35,6 +35,9 @@
#include "Helpers.h"
#include "logger.hpp"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -53,7 +56,7 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
Routes::Put(
*router,
base +
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/authentication-data/authentication-status",
Routes::bind(&AuthenticationStatusDocumentApi::
create_authentication_status_handler,
......@@ -61,14 +64,14 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
Routes::Delete(
*router,
base +
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/authentication-data/authentication-status",
Routes::bind(&AuthenticationStatusDocumentApi::
delete_authentication_status_handler,
this));
Routes::Get(
*router,
base +
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/authentication-data/authentication-status",
Routes::bind(
&AuthenticationStatusDocumentApi::query_authentication_status_handler,
......
......@@ -58,7 +58,7 @@ public:
virtual ~AuthenticationStatusDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
......@@ -35,6 +35,9 @@
#include "Helpers.h"
#include "logger.hpp"
#include "udr_config.hpp"
extern oai::udr::config::udr_config udr_cfg;
namespace oai::udr::api {
......@@ -52,14 +55,16 @@ void AuthenticationSubscriptionDocumentApi::setupRoutes() {
using namespace Pistache::Rest;
Routes::Get(*router,
base + "/subscription-data/:ueId/authentication-data/"
"authentication-subscription",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/authentication-data/"
"authentication-subscription",
Routes::bind(&AuthenticationSubscriptionDocumentApi::
read_authentication_subscription_handler,
this));
Routes::Patch(*router,
base + "/subscription-data/:ueId/authentication-data/"
"authentication-subscription",
base + udr_cfg.nudr.api_version +
"/subscription-data/:ueId/authentication-data/"
"authentication-subscription",
Routes::bind(&AuthenticationSubscriptionDocumentApi::
modify_authentication_subscription_handler,
this));
......
......@@ -62,7 +62,7 @@ public:
virtual ~AuthenticationSubscriptionDocumentApi() {}
void init();
const std::string base = "/nudr-dr/v2";
const std::string base = "/nudr-dr/";
private:
void setupRoutes();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment