arch: DB schema Changes (#796)

- New function : NSSF
- New feature : SMF selection
This commit is contained in:
Sukchan Lee 2021-03-08 21:25:09 +09:00
parent c6bfbed922
commit 9af4268bab
691 changed files with 40727 additions and 18985 deletions

View file

@ -6,7 +6,9 @@
OpenAPI_qos_flow_notify_item_t *OpenAPI_qos_flow_notify_item_create(
int qfi,
OpenAPI_notification_cause_e notification_cause
OpenAPI_notification_cause_e notification_cause,
int current_qos_profile_index,
int null_qo_s_profile_index
)
{
OpenAPI_qos_flow_notify_item_t *qos_flow_notify_item_local_var = OpenAPI_malloc(sizeof(OpenAPI_qos_flow_notify_item_t));
@ -15,6 +17,8 @@ OpenAPI_qos_flow_notify_item_t *OpenAPI_qos_flow_notify_item_create(
}
qos_flow_notify_item_local_var->qfi = qfi;
qos_flow_notify_item_local_var->notification_cause = notification_cause;
qos_flow_notify_item_local_var->current_qos_profile_index = current_qos_profile_index;
qos_flow_notify_item_local_var->null_qo_s_profile_index = null_qo_s_profile_index;
return qos_flow_notify_item_local_var;
}
@ -56,6 +60,20 @@ cJSON *OpenAPI_qos_flow_notify_item_convertToJSON(OpenAPI_qos_flow_notify_item_t
goto end;
}
if (qos_flow_notify_item->current_qos_profile_index) {
if (cJSON_AddNumberToObject(item, "currentQosProfileIndex", qos_flow_notify_item->current_qos_profile_index) == NULL) {
ogs_error("OpenAPI_qos_flow_notify_item_convertToJSON() failed [current_qos_profile_index]");
goto end;
}
}
if (qos_flow_notify_item->null_qo_s_profile_index) {
if (cJSON_AddBoolToObject(item, "nullQoSProfileIndex", qos_flow_notify_item->null_qo_s_profile_index) == NULL) {
ogs_error("OpenAPI_qos_flow_notify_item_convertToJSON() failed [null_qo_s_profile_index]");
goto end;
}
}
end:
return item;
}
@ -89,9 +107,29 @@ OpenAPI_qos_flow_notify_item_t *OpenAPI_qos_flow_notify_item_parseFromJSON(cJSON
}
notification_causeVariable = OpenAPI_notification_cause_FromString(notification_cause->valuestring);
cJSON *current_qos_profile_index = cJSON_GetObjectItemCaseSensitive(qos_flow_notify_itemJSON, "currentQosProfileIndex");
if (current_qos_profile_index) {
if (!cJSON_IsNumber(current_qos_profile_index)) {
ogs_error("OpenAPI_qos_flow_notify_item_parseFromJSON() failed [current_qos_profile_index]");
goto end;
}
}
cJSON *null_qo_s_profile_index = cJSON_GetObjectItemCaseSensitive(qos_flow_notify_itemJSON, "nullQoSProfileIndex");
if (null_qo_s_profile_index) {
if (!cJSON_IsBool(null_qo_s_profile_index)) {
ogs_error("OpenAPI_qos_flow_notify_item_parseFromJSON() failed [null_qo_s_profile_index]");
goto end;
}
}
qos_flow_notify_item_local_var = OpenAPI_qos_flow_notify_item_create (
qfi->valuedouble,
notification_causeVariable
notification_causeVariable,
current_qos_profile_index ? current_qos_profile_index->valuedouble : 0,
null_qo_s_profile_index ? null_qo_s_profile_index->valueint : 0
);
return qos_flow_notify_item_local_var;