Skip to content
Snippets Groups Projects
Commit 147acda0 authored by Stefan Spettel's avatar Stefan Spettel
Browse files

style(config): move policy cfg to pcf inner level

parent 7e4d41a1
No related branches found
No related tags found
1 merge request!26Refactoring of configuration file
...@@ -220,7 +220,8 @@ local_subscription_infos: ...@@ -220,7 +220,8 @@ local_subscription_infos:
session_ambr_ul: "1000Mbps" session_ambr_ul: "1000Mbps"
session_ambr_dl: "1000Mbps" session_ambr_dl: "1000Mbps"
local_policy: pcf:
policy_decisions_path: /openair-pcf/policies/policy_decisions local_policy:
pcc_rules_path: /openair-pcf/policies/pcc_rules policy_decisions_path: /openair-pcf/policies/policy_decisions
traffic_rules_path: /openair-pcf/policies/traffic_rules pcc_rules_path: /openair-pcf/policies/pcc_rules
\ No newline at end of file traffic_rules_path: /openair-pcf/policies/traffic_rules
\ No newline at end of file
Subproject commit f50ec52f7c806f34366345f02d358ad2ebf90027 Subproject commit 6d39d4d4c36536115d43608eb78104ae84d490bc
...@@ -37,14 +37,15 @@ class pcf_config : public oai::config::config { ...@@ -37,14 +37,15 @@ class pcf_config : public oai::config::config {
public: public:
explicit pcf_config( explicit pcf_config(
const std::string& config_path, bool log_stdout, bool log_rot_file) const std::string& config_path, bool log_stdout, bool log_rot_file)
: config(config_path, oai::config::PCF_CONFIG_NAME, log_stdout, log_rot_file) { : config(
config_path, oai::config::PCF_CONFIG_NAME, log_stdout,
log_rot_file) {
m_used_sbi_values = {oai::config::PCF_CONFIG_NAME, m_used_sbi_values = {oai::config::PCF_CONFIG_NAME,
oai::config::NRF_CONFIG_NAME}; oai::config::NRF_CONFIG_NAME};
m_used_config_values = {oai::config::LOG_LEVEL_CONFIG_NAME, m_used_config_values = {
oai::config::REGISTER_NF_CONFIG_NAME, oai::config::LOG_LEVEL_CONFIG_NAME,
oai::config::NF_LIST_CONFIG_NAME, oai::config::REGISTER_NF_CONFIG_NAME, oai::config::NF_LIST_CONFIG_NAME,
oai::config::LOCAL_POLICY_CONFIG_NAME}; oai::config::LOCAL_POLICY_CONFIG_NAME, oai::config::PCF_CONFIG_NAME};
update_used_nfs(); update_used_nfs();
} }
......
...@@ -53,15 +53,19 @@ bool policy_provisioning_file::read_all_policy_files() { ...@@ -53,15 +53,19 @@ bool policy_provisioning_file::read_all_policy_files() {
std::vector<YAML::Node> pcc_rules; std::vector<YAML::Node> pcc_rules;
std::vector<YAML::Node> policy_decisions; std::vector<YAML::Node> policy_decisions;
if (!read_all_files_in_dir(pcf_cfg->get_policy().get_traffic_rules_path(), traffic_controls)) { if (!read_all_files_in_dir(
pcf_cfg->get_pcf_policy().get_traffic_rules_path(),
traffic_controls)) {
Logger::pcf_app().warn("Could not load Traffic Control Description files"); Logger::pcf_app().warn("Could not load Traffic Control Description files");
} }
if (!read_all_files_in_dir(pcf_cfg->get_policy().get_pcc_rules_path(), pcc_rules)) { if (!read_all_files_in_dir(
pcf_cfg->get_pcf_policy().get_pcc_rules_path(), pcc_rules)) {
Logger::pcf_app().error("Could not load mandatory PCC rules"); Logger::pcf_app().error("Could not load mandatory PCC rules");
return false; return false;
} }
if (!read_all_files_in_dir( if (!read_all_files_in_dir(
pcf_cfg->get_policy().get_policy_decisions_path(), policy_decisions)) { pcf_cfg->get_pcf_policy().get_policy_decisions_path(),
policy_decisions)) {
Logger::pcf_app().error( Logger::pcf_app().error(
"Could not load mandatory policy decisions configuration"); "Could not load mandatory policy decisions configuration");
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment