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

style(pcf): Reformat files

parent b1b30304
No related branches found
No related tags found
1 merge request!26Refactoring of configuration file
Pipeline #37588 failed
......@@ -36,7 +36,8 @@ extern std::unique_ptr<oai::pcf::config::pcf_config> pcf_cfg;
namespace oai::pcf::api {
std::string sm_policies::get_route() {
return API_BASE + pcf_cfg->pcf().get_sbi().get_api_version() + sm_policies::CREATE_ROUTE;
return API_BASE + pcf_cfg->local().get_sbi().get_api_version() +
sm_policies::CREATE_ROUTE;
}
} // namespace oai::pcf::api
......@@ -105,10 +105,12 @@ int main(int argc, char** argv) {
// PCF application layer
pcf_app_inst = std::make_unique<pcf_app>(ev);
std::string v4_address = conv::toString(pcf_cfg->local().get_sbi().get_addr4());
std::string v4_address =
conv::toString(pcf_cfg->local().get_sbi().get_addr4());
// PCF Pistache API server (HTTP1)
Pistache::Address addr(v4_address, Pistache::Port(pcf_cfg->local().get_sbi().get_port_http1()));
Pistache::Address addr(
v4_address, Pistache::Port(pcf_cfg->local().get_sbi().get_port_http1()));
PCFApiServer test(addr, pcf_app_inst);
pcf_api_server_1 = std::make_unique<PCFApiServer>(addr, pcf_app_inst);
......
......@@ -107,9 +107,12 @@ http_status_code_e pcf_client::do_request(
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, NF_CURL_TIMEOUT_MS);
curl_easy_setopt(curl, CURLOPT_TCP_KEEPALIVE, 1);
curl_easy_setopt(curl, CURLOPT_INTERFACE, pcf_cfg->local().get_sbi().get_if_name().c_str());
curl_easy_setopt(
curl, CURLOPT_INTERFACE,
pcf_cfg->local().get_sbi().get_if_name().c_str());
// TODO refactor, we know that target is NRF, but it should be done based on sbi config
// TODO refactor, we know that target is NRF, but it should be done based on
// sbi config
if (pcf_cfg->nrf().get_sbi().use_http2()) {
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
......
......@@ -77,7 +77,8 @@ void pcf_nrf::generate_pcf_profile() {
m_nf_instance_profile.set_nf_heartBeat_timer(50);
m_nf_instance_profile.set_nf_priority(1);
m_nf_instance_profile.set_nf_capacity(100);
m_nf_instance_profile.add_nf_ipv4_addresses(pcf_cfg->local().get_sbi().get_addr4());
m_nf_instance_profile.add_nf_ipv4_addresses(
pcf_cfg->local().get_sbi().get_addr4());
// NF services
nf_service_t nf_service = {};
......
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