[Release-17] Upgrade SBI to v17.x.0

This commit is contained in:
Sukchan Lee 2023-03-01 19:56:49 +09:00
parent 969c116e77
commit 4d44b1843e
1687 changed files with 121604 additions and 9310 deletions

View file

@ -12,7 +12,16 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_create(
OpenAPI_list_t *temp_vals,
OpenAPI_up_path_chg_event_t *up_path_chg_sub,
bool is_addr_preser_ind,
int addr_preser_ind
int addr_preser_ind,
bool is_sim_conn_ind,
int sim_conn_ind,
bool is_sim_conn_term,
int sim_conn_term,
OpenAPI_list_t *eas_ip_replace_infos,
bool is_eas_redis_ind,
int eas_redis_ind,
bool is_max_allowed_up_lat,
int max_allowed_up_lat
)
{
OpenAPI_af_routing_requirement_t *af_routing_requirement_local_var = ogs_malloc(sizeof(OpenAPI_af_routing_requirement_t));
@ -26,6 +35,15 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_create(
af_routing_requirement_local_var->up_path_chg_sub = up_path_chg_sub;
af_routing_requirement_local_var->is_addr_preser_ind = is_addr_preser_ind;
af_routing_requirement_local_var->addr_preser_ind = addr_preser_ind;
af_routing_requirement_local_var->is_sim_conn_ind = is_sim_conn_ind;
af_routing_requirement_local_var->sim_conn_ind = sim_conn_ind;
af_routing_requirement_local_var->is_sim_conn_term = is_sim_conn_term;
af_routing_requirement_local_var->sim_conn_term = sim_conn_term;
af_routing_requirement_local_var->eas_ip_replace_infos = eas_ip_replace_infos;
af_routing_requirement_local_var->is_eas_redis_ind = is_eas_redis_ind;
af_routing_requirement_local_var->eas_redis_ind = eas_redis_ind;
af_routing_requirement_local_var->is_max_allowed_up_lat = is_max_allowed_up_lat;
af_routing_requirement_local_var->max_allowed_up_lat = max_allowed_up_lat;
return af_routing_requirement_local_var;
}
@ -59,6 +77,13 @@ void OpenAPI_af_routing_requirement_free(OpenAPI_af_routing_requirement_t *af_ro
OpenAPI_up_path_chg_event_free(af_routing_requirement->up_path_chg_sub);
af_routing_requirement->up_path_chg_sub = NULL;
}
if (af_routing_requirement->eas_ip_replace_infos) {
OpenAPI_list_for_each(af_routing_requirement->eas_ip_replace_infos, node) {
OpenAPI_eas_ip_replacement_info_free(node->data);
}
OpenAPI_list_free(af_routing_requirement->eas_ip_replace_infos);
af_routing_requirement->eas_ip_replace_infos = NULL;
}
ogs_free(af_routing_requirement);
}
@ -145,6 +170,50 @@ cJSON *OpenAPI_af_routing_requirement_convertToJSON(OpenAPI_af_routing_requireme
}
}
if (af_routing_requirement->is_sim_conn_ind) {
if (cJSON_AddBoolToObject(item, "simConnInd", af_routing_requirement->sim_conn_ind) == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sim_conn_ind]");
goto end;
}
}
if (af_routing_requirement->is_sim_conn_term) {
if (cJSON_AddNumberToObject(item, "simConnTerm", af_routing_requirement->sim_conn_term) == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [sim_conn_term]");
goto end;
}
}
if (af_routing_requirement->eas_ip_replace_infos) {
cJSON *eas_ip_replace_infosList = cJSON_AddArrayToObject(item, "easIpReplaceInfos");
if (eas_ip_replace_infosList == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [eas_ip_replace_infos]");
goto end;
}
OpenAPI_list_for_each(af_routing_requirement->eas_ip_replace_infos, node) {
cJSON *itemLocal = OpenAPI_eas_ip_replacement_info_convertToJSON(node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [eas_ip_replace_infos]");
goto end;
}
cJSON_AddItemToArray(eas_ip_replace_infosList, itemLocal);
}
}
if (af_routing_requirement->is_eas_redis_ind) {
if (cJSON_AddBoolToObject(item, "easRedisInd", af_routing_requirement->eas_redis_ind) == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [eas_redis_ind]");
goto end;
}
}
if (af_routing_requirement->is_max_allowed_up_lat) {
if (cJSON_AddNumberToObject(item, "maxAllowedUpLat", af_routing_requirement->max_allowed_up_lat) == NULL) {
ogs_error("OpenAPI_af_routing_requirement_convertToJSON() failed [max_allowed_up_lat]");
goto end;
}
}
end:
return item;
}
@ -163,6 +232,12 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c
cJSON *up_path_chg_sub = NULL;
OpenAPI_up_path_chg_event_t *up_path_chg_sub_local_nonprim = NULL;
cJSON *addr_preser_ind = NULL;
cJSON *sim_conn_ind = NULL;
cJSON *sim_conn_term = NULL;
cJSON *eas_ip_replace_infos = NULL;
OpenAPI_list_t *eas_ip_replace_infosList = NULL;
cJSON *eas_redis_ind = NULL;
cJSON *max_allowed_up_lat = NULL;
app_reloc = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "appReloc");
if (app_reloc) {
if (!cJSON_IsBool(app_reloc)) {
@ -239,6 +314,63 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c
}
}
sim_conn_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "simConnInd");
if (sim_conn_ind) {
if (!cJSON_IsBool(sim_conn_ind)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [sim_conn_ind]");
goto end;
}
}
sim_conn_term = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "simConnTerm");
if (sim_conn_term) {
if (!cJSON_IsNumber(sim_conn_term)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [sim_conn_term]");
goto end;
}
}
eas_ip_replace_infos = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "easIpReplaceInfos");
if (eas_ip_replace_infos) {
cJSON *eas_ip_replace_infos_local = NULL;
if (!cJSON_IsArray(eas_ip_replace_infos)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [eas_ip_replace_infos]");
goto end;
}
eas_ip_replace_infosList = OpenAPI_list_create();
cJSON_ArrayForEach(eas_ip_replace_infos_local, eas_ip_replace_infos) {
if (!cJSON_IsObject(eas_ip_replace_infos_local)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [eas_ip_replace_infos]");
goto end;
}
OpenAPI_eas_ip_replacement_info_t *eas_ip_replace_infosItem = OpenAPI_eas_ip_replacement_info_parseFromJSON(eas_ip_replace_infos_local);
if (!eas_ip_replace_infosItem) {
ogs_error("No eas_ip_replace_infosItem");
OpenAPI_list_free(eas_ip_replace_infosList);
goto end;
}
OpenAPI_list_add(eas_ip_replace_infosList, eas_ip_replace_infosItem);
}
}
eas_redis_ind = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "easRedisInd");
if (eas_redis_ind) {
if (!cJSON_IsBool(eas_redis_ind)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [eas_redis_ind]");
goto end;
}
}
max_allowed_up_lat = cJSON_GetObjectItemCaseSensitive(af_routing_requirementJSON, "maxAllowedUpLat");
if (max_allowed_up_lat) {
if (!cJSON_IsNumber(max_allowed_up_lat)) {
ogs_error("OpenAPI_af_routing_requirement_parseFromJSON() failed [max_allowed_up_lat]");
goto end;
}
}
af_routing_requirement_local_var = OpenAPI_af_routing_requirement_create (
app_reloc ? true : false,
app_reloc ? app_reloc->valueint : 0,
@ -247,7 +379,16 @@ OpenAPI_af_routing_requirement_t *OpenAPI_af_routing_requirement_parseFromJSON(c
temp_vals ? temp_valsList : NULL,
up_path_chg_sub ? up_path_chg_sub_local_nonprim : NULL,
addr_preser_ind ? true : false,
addr_preser_ind ? addr_preser_ind->valueint : 0
addr_preser_ind ? addr_preser_ind->valueint : 0,
sim_conn_ind ? true : false,
sim_conn_ind ? sim_conn_ind->valueint : 0,
sim_conn_term ? true : false,
sim_conn_term ? sim_conn_term->valuedouble : 0,
eas_ip_replace_infos ? eas_ip_replace_infosList : NULL,
eas_redis_ind ? true : false,
eas_redis_ind ? eas_redis_ind->valueint : 0,
max_allowed_up_lat ? true : false,
max_allowed_up_lat ? max_allowed_up_lat->valuedouble : 0
);
return af_routing_requirement_local_var;
@ -274,6 +415,13 @@ end:
OpenAPI_up_path_chg_event_free(up_path_chg_sub_local_nonprim);
up_path_chg_sub_local_nonprim = NULL;
}
if (eas_ip_replace_infosList) {
OpenAPI_list_for_each(eas_ip_replace_infosList, node) {
OpenAPI_eas_ip_replacement_info_free(node->data);
}
OpenAPI_list_free(eas_ip_replace_infosList);
eas_ip_replace_infosList = NULL;
}
return NULL;
}