[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

@ -6,7 +6,8 @@
OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_create(
char *pgw_fqdn,
char *smf_instance_id
char *smf_instance_id,
OpenAPI_plmn_id_t *plmn_id
)
{
OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw_local_var = ogs_malloc(sizeof(OpenAPI_eps_iwk_pgw_t));
@ -14,6 +15,7 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_create(
eps_iwk_pgw_local_var->pgw_fqdn = pgw_fqdn;
eps_iwk_pgw_local_var->smf_instance_id = smf_instance_id;
eps_iwk_pgw_local_var->plmn_id = plmn_id;
return eps_iwk_pgw_local_var;
}
@ -33,6 +35,10 @@ void OpenAPI_eps_iwk_pgw_free(OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw)
ogs_free(eps_iwk_pgw->smf_instance_id);
eps_iwk_pgw->smf_instance_id = NULL;
}
if (eps_iwk_pgw->plmn_id) {
OpenAPI_plmn_id_free(eps_iwk_pgw->plmn_id);
eps_iwk_pgw->plmn_id = NULL;
}
ogs_free(eps_iwk_pgw);
}
@ -65,6 +71,19 @@ cJSON *OpenAPI_eps_iwk_pgw_convertToJSON(OpenAPI_eps_iwk_pgw_t *eps_iwk_pgw)
goto end;
}
if (eps_iwk_pgw->plmn_id) {
cJSON *plmn_id_local_JSON = OpenAPI_plmn_id_convertToJSON(eps_iwk_pgw->plmn_id);
if (plmn_id_local_JSON == NULL) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [plmn_id]");
goto end;
}
cJSON_AddItemToObject(item, "plmnId", plmn_id_local_JSON);
if (item->child == NULL) {
ogs_error("OpenAPI_eps_iwk_pgw_convertToJSON() failed [plmn_id]");
goto end;
}
}
end:
return item;
}
@ -75,6 +94,8 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON)
OpenAPI_lnode_t *node = NULL;
cJSON *pgw_fqdn = NULL;
cJSON *smf_instance_id = NULL;
cJSON *plmn_id = NULL;
OpenAPI_plmn_id_t *plmn_id_local_nonprim = NULL;
pgw_fqdn = cJSON_GetObjectItemCaseSensitive(eps_iwk_pgwJSON, "pgwFqdn");
if (!pgw_fqdn) {
ogs_error("OpenAPI_eps_iwk_pgw_parseFromJSON() failed [pgw_fqdn]");
@ -95,13 +116,23 @@ OpenAPI_eps_iwk_pgw_t *OpenAPI_eps_iwk_pgw_parseFromJSON(cJSON *eps_iwk_pgwJSON)
goto end;
}
plmn_id = cJSON_GetObjectItemCaseSensitive(eps_iwk_pgwJSON, "plmnId");
if (plmn_id) {
plmn_id_local_nonprim = OpenAPI_plmn_id_parseFromJSON(plmn_id);
}
eps_iwk_pgw_local_var = OpenAPI_eps_iwk_pgw_create (
ogs_strdup(pgw_fqdn->valuestring),
ogs_strdup(smf_instance_id->valuestring)
ogs_strdup(smf_instance_id->valuestring),
plmn_id ? plmn_id_local_nonprim : NULL
);
return eps_iwk_pgw_local_var;
end:
if (plmn_id_local_nonprim) {
OpenAPI_plmn_id_free(plmn_id_local_nonprim);
plmn_id_local_nonprim = NULL;
}
return NULL;
}