Commit 27aed6ee authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Fix issue for class hierarchical

parent 35351305
...@@ -79,7 +79,9 @@ bool cassandra_db::query_authentication_subscription( ...@@ -79,7 +79,9 @@ bool cassandra_db::query_authentication_subscription(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool cassandra_db::update_authentication_subscription( bool cassandra_db::update_authentication_subscription(
const std::string& id, const nlohmann::json& json_data) { const std::string& id,
const std::vector<oai::udr::model::PatchItem>& patchItem,
nlohmann::json& json_data) {
return true; return true;
} }
...@@ -104,7 +106,8 @@ bool cassandra_db::query_amf_context_3gpp( ...@@ -104,7 +106,8 @@ bool cassandra_db::query_amf_context_3gpp(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool cassandra_db::cassandra_db::insert_authentication_status( bool cassandra_db::cassandra_db::insert_authentication_status(
const std::string& ue_id, const nlohmann::json& json_data) { const std::string& ue_id, const oai::udr::model::AuthEvent& authEvent,
nlohmann::json& json_data) {
return true; return true;
} }
...@@ -136,13 +139,15 @@ bool cassandra_db::cassandra_db::delete_sdm_subscription( ...@@ -136,13 +139,15 @@ bool cassandra_db::cassandra_db::delete_sdm_subscription(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool cassandra_db::update_sdm_subscription( bool cassandra_db::update_sdm_subscription(
const std::string& ue_id, const std::string& subs_id, const std::string& ue_id, const std::string& subs_id,
oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data) { nlohmann::json& json_data) {
return true; return true;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool cassandra_db::create_sdm_subscriptions( bool cassandra_db::create_sdm_subscriptions(
const std::string& ue_id, nlohmann::json& json_data) { const std::string& ue_id, oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data) {
return true; return true;
} }
...@@ -163,6 +168,7 @@ bool cassandra_db::query_sm_data( ...@@ -163,6 +168,7 @@ bool cassandra_db::query_sm_data(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool cassandra_db::insert_smf_context_non_3gpp( bool cassandra_db::insert_smf_context_non_3gpp(
const std::string& ue_id, const int32_t& pdu_session_id, const std::string& ue_id, const int32_t& pdu_session_id,
const oai::udr::model::SmfRegistration& smfRegistration,
nlohmann::json& json_data) { nlohmann::json& json_data) {
return true; return true;
} }
......
...@@ -55,7 +55,9 @@ class cassandra_db : public database_wrapper<cassandra_db> { ...@@ -55,7 +55,9 @@ class cassandra_db : public database_wrapper<cassandra_db> {
const std::string& id, nlohmann::json& json_data); const std::string& id, nlohmann::json& json_data);
bool update_authentication_subscription( bool update_authentication_subscription(
const std::string& id, const nlohmann::json& json_data); const std::string& id,
const std::vector<oai::udr::model::PatchItem>& patchItem,
nlohmann::json& json_data);
bool query_am_data( bool query_am_data(
const std::string& ue_id, const std::string& serving_plmn_id, const std::string& ue_id, const std::string& serving_plmn_id,
...@@ -68,7 +70,8 @@ class cassandra_db : public database_wrapper<cassandra_db> { ...@@ -68,7 +70,8 @@ class cassandra_db : public database_wrapper<cassandra_db> {
const std::string& ue_id, nlohmann::json& json_data); const std::string& ue_id, nlohmann::json& json_data);
bool insert_authentication_status( bool insert_authentication_status(
const std::string& ue_id, const nlohmann::json& json_data); const std::string& ue_id, const oai::udr::model::AuthEvent& authEvent,
nlohmann::json& json_data);
bool delete_authentication_status(const std::string& ue_id); bool delete_authentication_status(const std::string& ue_id);
...@@ -84,10 +87,13 @@ class cassandra_db : public database_wrapper<cassandra_db> { ...@@ -84,10 +87,13 @@ class cassandra_db : public database_wrapper<cassandra_db> {
bool update_sdm_subscription( bool update_sdm_subscription(
const std::string& ue_id, const std::string& subs_id, const std::string& ue_id, const std::string& subs_id,
oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data); nlohmann::json& json_data);
bool create_sdm_subscriptions( bool create_sdm_subscriptions(
const std::string& ue_id, nlohmann::json& json_data); const std::string& ue_id,
oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data);
bool query_sdm_subscriptions( bool query_sdm_subscriptions(
const std::string& ue_id, nlohmann::json& json_data); const std::string& ue_id, nlohmann::json& json_data);
...@@ -99,6 +105,7 @@ class cassandra_db : public database_wrapper<cassandra_db> { ...@@ -99,6 +105,7 @@ class cassandra_db : public database_wrapper<cassandra_db> {
bool insert_smf_context_non_3gpp( bool insert_smf_context_non_3gpp(
const std::string& ue_id, const int32_t& pdu_session_id, const std::string& ue_id, const int32_t& pdu_session_id,
const oai::udr::model::SmfRegistration& smfRegistration,
nlohmann::json& json_data); nlohmann::json& json_data);
bool delete_smf_context( bool delete_smf_context(
......
...@@ -55,7 +55,6 @@ class database_wrapper : public database_wrapper_abstraction { ...@@ -55,7 +55,6 @@ class database_wrapper : public database_wrapper_abstraction {
Logger::udr_app().debug("Initialize from database_wrapper"); Logger::udr_app().debug("Initialize from database_wrapper");
auto derived = static_cast<DerivedT*>(this); auto derived = static_cast<DerivedT*>(this);
return derived->initialize(); return derived->initialize();
return true;
} }
bool close_connection() override { bool close_connection() override {
...@@ -69,122 +68,148 @@ class database_wrapper : public database_wrapper_abstraction { ...@@ -69,122 +68,148 @@ class database_wrapper : public database_wrapper_abstraction {
const oai::udr::model::AuthenticationSubscription& const oai::udr::model::AuthenticationSubscription&
authentication_subscription, authentication_subscription,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->insert_authentication_subscription(
id, authentication_subscription, json_data);
} }
bool delete_authentication_subscription(const std::string& id) override { bool delete_authentication_subscription(const std::string& id) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->delete_authentication_subscription(id);
} }
bool query_authentication_subscription( bool query_authentication_subscription(
const std::string& id, nlohmann::json& json_data) override { const std::string& id, nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_authentication_subscription(id, json_data);
} }
bool update_authentication_subscription( bool update_authentication_subscription(
const std::string& id, const std::string& id,
const std::vector<oai::udr::model::PatchItem>& patchItem, const std::vector<oai::udr::model::PatchItem>& patchItem,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->update_authentication_subscription(
id, patchItem, json_data);
} }
bool query_am_data( bool query_am_data(
const std::string& ue_id, const std::string& serving_plmn_id, const std::string& ue_id, const std::string& serving_plmn_id,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_am_data(ue_id, serving_plmn_id, json_data);
} }
bool create_amf_context_3gpp( bool create_amf_context_3gpp(
const std::string& ue_id, const std::string& ue_id,
oai::udr::model::Amf3GppAccessRegistration& amf3GppAccessRegistration) oai::udr::model::Amf3GppAccessRegistration& amf3GppAccessRegistration)
override { override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->create_amf_context_3gpp(ue_id, amf3GppAccessRegistration);
} }
bool query_amf_context_3gpp( bool query_amf_context_3gpp(
const std::string& ue_id, nlohmann::json& json_data) override { const std::string& ue_id, nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_amf_context_3gpp(ue_id, json_data);
} }
bool insert_authentication_status( bool insert_authentication_status(
const std::string& ue_id, const oai::udr::model::AuthEvent& authEvent, const std::string& ue_id, const oai::udr::model::AuthEvent& authEvent,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->insert_authentication_status(ue_id, authEvent, json_data);
} }
bool delete_authentication_status(const std::string& ue_id) override { bool delete_authentication_status(const std::string& ue_id) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->delete_authentication_status(ue_id);
} }
bool query_authentication_status( bool query_authentication_status(
const std::string& ue_id, nlohmann::json& json_data) override { const std::string& ue_id, nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_authentication_status(ue_id, json_data);
} }
bool query_sdm_subscription( bool query_sdm_subscription(
const std::string& ue_id, const std::string& subs_id, const std::string& ue_id, const std::string& subs_id,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_sdm_subscription(ue_id, subs_id, json_data);
} }
bool delete_sdm_subscription( bool delete_sdm_subscription(
const std::string& ue_id, const std::string& subs_id) override { const std::string& ue_id, const std::string& subs_id) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->delete_sdm_subscription(ue_id, subs_id);
} }
bool update_sdm_subscription( bool update_sdm_subscription(
const std::string& ue_id, const std::string& subs_id, const std::string& ue_id, const std::string& subs_id,
oai::udr::model::SdmSubscription& sdmSubscription, oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->update_sdm_subscription(
ue_id, subs_id, sdmSubscription, json_data);
} }
bool create_sdm_subscriptions( bool create_sdm_subscriptions(
const std::string& ue_id, const std::string& ue_id,
oai::udr::model::SdmSubscription& sdmSubscription, oai::udr::model::SdmSubscription& sdmSubscription,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->create_sdm_subscriptions(ue_id, sdmSubscription, json_data);
} }
bool query_sdm_subscriptions( bool query_sdm_subscriptions(
const std::string& ue_id, nlohmann::json& json_data) override { const std::string& ue_id, nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_sdm_subscriptions(ue_id, json_data);
} }
bool query_sm_data( bool query_sm_data(
const std::string& ue_id, const std::string& serving_plmn_id, const std::string& ue_id, const std::string& serving_plmn_id,
nlohmann::json& json_data, const oai::udr::model::Snssai& snssai = {}, nlohmann::json& json_data, const oai::udr::model::Snssai& snssai = {},
const std::string& dnn = {}) override { const std::string& dnn = {}) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_sm_data(
ue_id, serving_plmn_id, json_data, snssai, dnn);
} }
bool insert_smf_context_non_3gpp( bool insert_smf_context_non_3gpp(
const std::string& ue_id, const int32_t& pdu_session_id, const std::string& ue_id, const int32_t& pdu_session_id,
const oai::udr::model::SmfRegistration& smfRegistration, const oai::udr::model::SmfRegistration& smfRegistration,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->insert_smf_context_non_3gpp(
ue_id, pdu_session_id, smfRegistration, json_data);
} }
bool delete_smf_context( bool delete_smf_context(
const std::string& ue_id, const int32_t& pdu_session_id) override { const std::string& ue_id, const int32_t& pdu_session_id) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->delete_smf_context(ue_id, pdu_session_id);
} }
bool query_smf_registration( bool query_smf_registration(
const std::string& ue_id, const int32_t& pdu_session_id, const std::string& ue_id, const int32_t& pdu_session_id,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_smf_registration(ue_id, pdu_session_id, json_data);
} }
bool query_smf_reg_list( bool query_smf_reg_list(
const std::string& ue_id, nlohmann::json& json_data) override { const std::string& ue_id, nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_smf_reg_list(ue_id, json_data);
} }
bool query_smf_select_data( bool query_smf_select_data(
const std::string& ue_id, const std::string& serving_plmn_id, const std::string& ue_id, const std::string& serving_plmn_id,
nlohmann::json& json_data) override { nlohmann::json& json_data) override {
return true; auto derived = static_cast<DerivedT*>(this);
return derived->query_smf_select_data(ue_id, serving_plmn_id, json_data);
} }
protected: protected:
......
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