[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

@ -8,7 +8,13 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_create(
OpenAPI_auth_type_e auth_type,
char *supported_features,
OpenAPI_authentication_vector_t *authentication_vector,
char *supi
char *supi,
bool is_akma_ind,
int akma_ind,
bool is_auth_aaa,
int auth_aaa,
char *routing_id,
OpenAPI_list_t *pvs_info
)
{
OpenAPI_authentication_info_result_t *authentication_info_result_local_var = ogs_malloc(sizeof(OpenAPI_authentication_info_result_t));
@ -18,6 +24,12 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_create(
authentication_info_result_local_var->supported_features = supported_features;
authentication_info_result_local_var->authentication_vector = authentication_vector;
authentication_info_result_local_var->supi = supi;
authentication_info_result_local_var->is_akma_ind = is_akma_ind;
authentication_info_result_local_var->akma_ind = akma_ind;
authentication_info_result_local_var->is_auth_aaa = is_auth_aaa;
authentication_info_result_local_var->auth_aaa = auth_aaa;
authentication_info_result_local_var->routing_id = routing_id;
authentication_info_result_local_var->pvs_info = pvs_info;
return authentication_info_result_local_var;
}
@ -41,6 +53,17 @@ void OpenAPI_authentication_info_result_free(OpenAPI_authentication_info_result_
ogs_free(authentication_info_result->supi);
authentication_info_result->supi = NULL;
}
if (authentication_info_result->routing_id) {
ogs_free(authentication_info_result->routing_id);
authentication_info_result->routing_id = NULL;
}
if (authentication_info_result->pvs_info) {
OpenAPI_list_for_each(authentication_info_result->pvs_info, node) {
OpenAPI_server_addressing_info_free(node->data);
}
OpenAPI_list_free(authentication_info_result->pvs_info);
authentication_info_result->pvs_info = NULL;
}
ogs_free(authentication_info_result);
}
@ -91,6 +114,43 @@ cJSON *OpenAPI_authentication_info_result_convertToJSON(OpenAPI_authentication_i
}
}
if (authentication_info_result->is_akma_ind) {
if (cJSON_AddBoolToObject(item, "akmaInd", authentication_info_result->akma_ind) == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [akma_ind]");
goto end;
}
}
if (authentication_info_result->is_auth_aaa) {
if (cJSON_AddBoolToObject(item, "authAaa", authentication_info_result->auth_aaa) == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [auth_aaa]");
goto end;
}
}
if (authentication_info_result->routing_id) {
if (cJSON_AddStringToObject(item, "routingId", authentication_info_result->routing_id) == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [routing_id]");
goto end;
}
}
if (authentication_info_result->pvs_info) {
cJSON *pvs_infoList = cJSON_AddArrayToObject(item, "pvsInfo");
if (pvs_infoList == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [pvs_info]");
goto end;
}
OpenAPI_list_for_each(authentication_info_result->pvs_info, node) {
cJSON *itemLocal = OpenAPI_server_addressing_info_convertToJSON(node->data);
if (itemLocal == NULL) {
ogs_error("OpenAPI_authentication_info_result_convertToJSON() failed [pvs_info]");
goto end;
}
cJSON_AddItemToArray(pvs_infoList, itemLocal);
}
}
end:
return item;
}
@ -105,6 +165,11 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr
cJSON *authentication_vector = NULL;
OpenAPI_authentication_vector_t *authentication_vector_local_nonprim = NULL;
cJSON *supi = NULL;
cJSON *akma_ind = NULL;
cJSON *auth_aaa = NULL;
cJSON *routing_id = NULL;
cJSON *pvs_info = NULL;
OpenAPI_list_t *pvs_infoList = NULL;
auth_type = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "authType");
if (!auth_type) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [auth_type]");
@ -137,11 +202,66 @@ OpenAPI_authentication_info_result_t *OpenAPI_authentication_info_result_parseFr
}
}
akma_ind = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "akmaInd");
if (akma_ind) {
if (!cJSON_IsBool(akma_ind)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [akma_ind]");
goto end;
}
}
auth_aaa = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "authAaa");
if (auth_aaa) {
if (!cJSON_IsBool(auth_aaa)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [auth_aaa]");
goto end;
}
}
routing_id = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "routingId");
if (routing_id) {
if (!cJSON_IsString(routing_id) && !cJSON_IsNull(routing_id)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [routing_id]");
goto end;
}
}
pvs_info = cJSON_GetObjectItemCaseSensitive(authentication_info_resultJSON, "pvsInfo");
if (pvs_info) {
cJSON *pvs_info_local = NULL;
if (!cJSON_IsArray(pvs_info)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [pvs_info]");
goto end;
}
pvs_infoList = OpenAPI_list_create();
cJSON_ArrayForEach(pvs_info_local, pvs_info) {
if (!cJSON_IsObject(pvs_info_local)) {
ogs_error("OpenAPI_authentication_info_result_parseFromJSON() failed [pvs_info]");
goto end;
}
OpenAPI_server_addressing_info_t *pvs_infoItem = OpenAPI_server_addressing_info_parseFromJSON(pvs_info_local);
if (!pvs_infoItem) {
ogs_error("No pvs_infoItem");
OpenAPI_list_free(pvs_infoList);
goto end;
}
OpenAPI_list_add(pvs_infoList, pvs_infoItem);
}
}
authentication_info_result_local_var = OpenAPI_authentication_info_result_create (
auth_typeVariable,
supported_features && !cJSON_IsNull(supported_features) ? ogs_strdup(supported_features->valuestring) : NULL,
authentication_vector ? authentication_vector_local_nonprim : NULL,
supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL
supi && !cJSON_IsNull(supi) ? ogs_strdup(supi->valuestring) : NULL,
akma_ind ? true : false,
akma_ind ? akma_ind->valueint : 0,
auth_aaa ? true : false,
auth_aaa ? auth_aaa->valueint : 0,
routing_id && !cJSON_IsNull(routing_id) ? ogs_strdup(routing_id->valuestring) : NULL,
pvs_info ? pvs_infoList : NULL
);
return authentication_info_result_local_var;
@ -150,6 +270,13 @@ end:
OpenAPI_authentication_vector_free(authentication_vector_local_nonprim);
authentication_vector_local_nonprim = NULL;
}
if (pvs_infoList) {
OpenAPI_list_for_each(pvs_infoList, node) {
OpenAPI_server_addressing_info_free(node->data);
}
OpenAPI_list_free(pvs_infoList);
pvs_infoList = NULL;
}
return NULL;
}