Free the memory of list or map when json parsing fails
This commit is contained in:
@@ -116,6 +116,9 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list
|
||||
|
||||
core_v1_event_list_t *core_v1_event_list_local_var = NULL;
|
||||
|
||||
// define the local list for core_v1_event_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for core_v1_event_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ core_v1_event_list_t *core_v1_event_list_parseFromJSON(cJSON *core_v1_event_list
|
||||
|
||||
return core_v1_event_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
core_v1_event_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even
|
||||
|
||||
events_v1_event_list_t *events_v1_event_list_local_var = NULL;
|
||||
|
||||
// define the local list for events_v1_event_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for events_v1_event_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ events_v1_event_list_t *events_v1_event_list_parseFromJSON(cJSON *events_v1_even
|
||||
|
||||
return events_v1_event_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
events_v1_event_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -67,11 +67,13 @@ v1_aggregation_rule_t *v1_aggregation_rule_parseFromJSON(cJSON *v1_aggregation_r
|
||||
|
||||
v1_aggregation_rule_t *v1_aggregation_rule_local_var = NULL;
|
||||
|
||||
// define the local list for v1_aggregation_rule->cluster_role_selectors
|
||||
list_t *cluster_role_selectorsList = NULL;
|
||||
|
||||
// v1_aggregation_rule->cluster_role_selectors
|
||||
cJSON *cluster_role_selectors = cJSON_GetObjectItemCaseSensitive(v1_aggregation_ruleJSON, "clusterRoleSelectors");
|
||||
list_t *cluster_role_selectorsList;
|
||||
if (cluster_role_selectors) {
|
||||
cJSON *cluster_role_selectors_local_nonprimitive;
|
||||
cJSON *cluster_role_selectors_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(cluster_role_selectors)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -96,6 +98,15 @@ v1_aggregation_rule_t *v1_aggregation_rule_parseFromJSON(cJSON *v1_aggregation_r
|
||||
|
||||
return v1_aggregation_rule_local_var;
|
||||
end:
|
||||
if (cluster_role_selectorsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, cluster_role_selectorsList) {
|
||||
v1_label_selector_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(cluster_role_selectorsList);
|
||||
cluster_role_selectorsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -164,6 +164,12 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){
|
||||
// define the local variable for v1_api_group->preferred_version
|
||||
v1_group_version_for_discovery_t *preferred_version_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_api_group->server_address_by_client_cidrs
|
||||
list_t *server_address_by_client_cidrsList = NULL;
|
||||
|
||||
// define the local list for v1_api_group->versions
|
||||
list_t *versionsList = NULL;
|
||||
|
||||
// v1_api_group->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -202,9 +208,8 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){
|
||||
|
||||
// v1_api_group->server_address_by_client_cidrs
|
||||
cJSON *server_address_by_client_cidrs = cJSON_GetObjectItemCaseSensitive(v1_api_groupJSON, "serverAddressByClientCIDRs");
|
||||
list_t *server_address_by_client_cidrsList;
|
||||
if (server_address_by_client_cidrs) {
|
||||
cJSON *server_address_by_client_cidrs_local_nonprimitive;
|
||||
cJSON *server_address_by_client_cidrs_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(server_address_by_client_cidrs)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -228,9 +233,8 @@ v1_api_group_t *v1_api_group_parseFromJSON(cJSON *v1_api_groupJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *versionsList;
|
||||
|
||||
cJSON *versions_local_nonprimitive;
|
||||
cJSON *versions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(versions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -263,6 +267,24 @@ end:
|
||||
v1_group_version_for_discovery_free(preferred_version_local_nonprim);
|
||||
preferred_version_local_nonprim = NULL;
|
||||
}
|
||||
if (server_address_by_client_cidrsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, server_address_by_client_cidrsList) {
|
||||
v1_server_address_by_client_cidr_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(server_address_by_client_cidrsList);
|
||||
server_address_by_client_cidrsList = NULL;
|
||||
}
|
||||
if (versionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, versionsList) {
|
||||
v1_group_version_for_discovery_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(versionsList);
|
||||
versionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -97,6 +97,9 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO
|
||||
|
||||
v1_api_group_list_t *v1_api_group_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_group_list->groups
|
||||
list_t *groupsList = NULL;
|
||||
|
||||
// v1_api_group_list->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_group_listJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -112,9 +115,8 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *groupsList;
|
||||
|
||||
cJSON *groups_local_nonprimitive;
|
||||
cJSON *groups_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(groups)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -149,6 +151,15 @@ v1_api_group_list_t *v1_api_group_list_parseFromJSON(cJSON *v1_api_group_listJSO
|
||||
|
||||
return v1_api_group_list_local_var;
|
||||
end:
|
||||
if (groupsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, groupsList) {
|
||||
v1_api_group_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(groupsList);
|
||||
groupsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -220,11 +220,19 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){
|
||||
|
||||
v1_api_resource_t *v1_api_resource_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_resource->categories
|
||||
list_t *categoriesList = NULL;
|
||||
|
||||
// define the local list for v1_api_resource->short_names
|
||||
list_t *short_namesList = NULL;
|
||||
|
||||
// define the local list for v1_api_resource->verbs
|
||||
list_t *verbsList = NULL;
|
||||
|
||||
// v1_api_resource->categories
|
||||
cJSON *categories = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "categories");
|
||||
list_t *categoriesList;
|
||||
if (categories) {
|
||||
cJSON *categories_local;
|
||||
cJSON *categories_local = NULL;
|
||||
if(!cJSON_IsArray(categories)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -287,9 +295,8 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){
|
||||
|
||||
// v1_api_resource->short_names
|
||||
cJSON *short_names = cJSON_GetObjectItemCaseSensitive(v1_api_resourceJSON, "shortNames");
|
||||
list_t *short_namesList;
|
||||
if (short_names) {
|
||||
cJSON *short_names_local;
|
||||
cJSON *short_names_local = NULL;
|
||||
if(!cJSON_IsArray(short_names)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -332,9 +339,8 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *verbsList;
|
||||
|
||||
cJSON *verbs_local;
|
||||
cJSON *verbs_local = NULL;
|
||||
if(!cJSON_IsArray(verbs)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -374,6 +380,33 @@ v1_api_resource_t *v1_api_resource_parseFromJSON(cJSON *v1_api_resourceJSON){
|
||||
|
||||
return v1_api_resource_local_var;
|
||||
end:
|
||||
if (categoriesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, categoriesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(categoriesList);
|
||||
categoriesList = NULL;
|
||||
}
|
||||
if (short_namesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, short_namesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(short_namesList);
|
||||
short_namesList = NULL;
|
||||
}
|
||||
if (verbsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, verbsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(verbsList);
|
||||
verbsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -113,6 +113,9 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc
|
||||
|
||||
v1_api_resource_list_t *v1_api_resource_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_resource_list->resources
|
||||
list_t *resourcesList = NULL;
|
||||
|
||||
// v1_api_resource_list->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_resource_listJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -149,9 +152,8 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *resourcesList;
|
||||
|
||||
cJSON *resources_local_nonprimitive;
|
||||
cJSON *resources_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(resources)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_api_resource_list_t *v1_api_resource_list_parseFromJSON(cJSON *v1_api_resourc
|
||||
|
||||
return v1_api_resource_list_local_var;
|
||||
end:
|
||||
if (resourcesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, resourcesList) {
|
||||
v1_api_resource_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(resourcesList);
|
||||
resourcesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l
|
||||
|
||||
v1_api_service_list_t *v1_api_service_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_service_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_api_service_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_api_service_list_t *v1_api_service_list_parseFromJSON(cJSON *v1_api_service_l
|
||||
|
||||
return v1_api_service_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_api_service_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -67,11 +67,13 @@ v1_api_service_status_t *v1_api_service_status_parseFromJSON(cJSON *v1_api_servi
|
||||
|
||||
v1_api_service_status_t *v1_api_service_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_service_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// v1_api_service_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_api_service_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -96,6 +98,15 @@ v1_api_service_status_t *v1_api_service_status_parseFromJSON(cJSON *v1_api_servi
|
||||
|
||||
return v1_api_service_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_api_service_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -125,6 +125,12 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){
|
||||
|
||||
v1_api_versions_t *v1_api_versions_local_var = NULL;
|
||||
|
||||
// define the local list for v1_api_versions->server_address_by_client_cidrs
|
||||
list_t *server_address_by_client_cidrsList = NULL;
|
||||
|
||||
// define the local list for v1_api_versions->versions
|
||||
list_t *versionsList = NULL;
|
||||
|
||||
// v1_api_versions->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_api_versionsJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -149,9 +155,8 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *server_address_by_client_cidrsList;
|
||||
|
||||
cJSON *server_address_by_client_cidrs_local_nonprimitive;
|
||||
cJSON *server_address_by_client_cidrs_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(server_address_by_client_cidrs)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -174,9 +179,8 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *versionsList;
|
||||
|
||||
cJSON *versions_local;
|
||||
cJSON *versions_local = NULL;
|
||||
if(!cJSON_IsArray(versions)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -201,6 +205,24 @@ v1_api_versions_t *v1_api_versions_parseFromJSON(cJSON *v1_api_versionsJSON){
|
||||
|
||||
return v1_api_versions_local_var;
|
||||
end:
|
||||
if (server_address_by_client_cidrsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, server_address_by_client_cidrsList) {
|
||||
v1_server_address_by_client_cidr_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(server_address_by_client_cidrsList);
|
||||
server_address_by_client_cidrsList = NULL;
|
||||
}
|
||||
if (versionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, versionsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(versionsList);
|
||||
versionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -90,11 +90,16 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){
|
||||
|
||||
v1_capabilities_t *v1_capabilities_local_var = NULL;
|
||||
|
||||
// define the local list for v1_capabilities->add
|
||||
list_t *addList = NULL;
|
||||
|
||||
// define the local list for v1_capabilities->drop
|
||||
list_t *dropList = NULL;
|
||||
|
||||
// v1_capabilities->add
|
||||
cJSON *add = cJSON_GetObjectItemCaseSensitive(v1_capabilitiesJSON, "add");
|
||||
list_t *addList;
|
||||
if (add) {
|
||||
cJSON *add_local;
|
||||
cJSON *add_local = NULL;
|
||||
if(!cJSON_IsArray(add)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -112,9 +117,8 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){
|
||||
|
||||
// v1_capabilities->drop
|
||||
cJSON *drop = cJSON_GetObjectItemCaseSensitive(v1_capabilitiesJSON, "drop");
|
||||
list_t *dropList;
|
||||
if (drop) {
|
||||
cJSON *drop_local;
|
||||
cJSON *drop_local = NULL;
|
||||
if(!cJSON_IsArray(drop)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -138,6 +142,24 @@ v1_capabilities_t *v1_capabilities_parseFromJSON(cJSON *v1_capabilitiesJSON){
|
||||
|
||||
return v1_capabilities_local_var;
|
||||
end:
|
||||
if (addList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, addList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(addList);
|
||||
addList = NULL;
|
||||
}
|
||||
if (dropList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, dropList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(dropList);
|
||||
dropList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -137,6 +137,9 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse
|
||||
|
||||
v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ceph_fs_persistent_volume_source->monitors
|
||||
list_t *monitorsList = NULL;
|
||||
|
||||
// define the local variable for v1_ceph_fs_persistent_volume_source->secret_ref
|
||||
v1_secret_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -146,9 +149,8 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *monitorsList;
|
||||
|
||||
cJSON *monitors_local;
|
||||
cJSON *monitors_local = NULL;
|
||||
if(!cJSON_IsArray(monitors)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -217,6 +219,15 @@ v1_ceph_fs_persistent_volume_source_t *v1_ceph_fs_persistent_volume_source_parse
|
||||
|
||||
return v1_ceph_fs_persistent_volume_source_local_var;
|
||||
end:
|
||||
if (monitorsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, monitorsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(monitorsList);
|
||||
monitorsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_secret_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -137,6 +137,9 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep
|
||||
|
||||
v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ceph_fs_volume_source->monitors
|
||||
list_t *monitorsList = NULL;
|
||||
|
||||
// define the local variable for v1_ceph_fs_volume_source->secret_ref
|
||||
v1_local_object_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -146,9 +149,8 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *monitorsList;
|
||||
|
||||
cJSON *monitors_local;
|
||||
cJSON *monitors_local = NULL;
|
||||
if(!cJSON_IsArray(monitors)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -217,6 +219,15 @@ v1_ceph_fs_volume_source_t *v1_ceph_fs_volume_source_parseFromJSON(cJSON *v1_cep
|
||||
|
||||
return v1_ceph_fs_volume_source_local_var;
|
||||
end:
|
||||
if (monitorsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, monitorsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(monitorsList);
|
||||
monitorsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_local_object_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse
|
||||
|
||||
v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_certificate_signing_request_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_certificate_signing_request_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_certificate_signing_request_list_t *v1_certificate_signing_request_list_parse
|
||||
|
||||
return v1_certificate_signing_request_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_certificate_signing_request_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -188,6 +188,15 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse
|
||||
|
||||
v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_local_var = NULL;
|
||||
|
||||
// define the local map for v1_certificate_signing_request_spec->extra
|
||||
list_t *extraList = NULL;
|
||||
|
||||
// define the local list for v1_certificate_signing_request_spec->groups
|
||||
list_t *groupsList = NULL;
|
||||
|
||||
// define the local list for v1_certificate_signing_request_spec->usages
|
||||
list_t *usagesList = NULL;
|
||||
|
||||
// v1_certificate_signing_request_spec->expiration_seconds
|
||||
cJSON *expiration_seconds = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "expirationSeconds");
|
||||
if (expiration_seconds) {
|
||||
@@ -199,9 +208,8 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse
|
||||
|
||||
// v1_certificate_signing_request_spec->extra
|
||||
cJSON *extra = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "extra");
|
||||
list_t *extraList;
|
||||
if (extra) {
|
||||
cJSON *extra_local_map;
|
||||
cJSON *extra_local_map = NULL;
|
||||
if(!cJSON_IsObject(extra)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -216,9 +224,8 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse
|
||||
|
||||
// v1_certificate_signing_request_spec->groups
|
||||
cJSON *groups = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "groups");
|
||||
list_t *groupsList;
|
||||
if (groups) {
|
||||
cJSON *groups_local;
|
||||
cJSON *groups_local = NULL;
|
||||
if(!cJSON_IsArray(groups)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -269,9 +276,8 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse
|
||||
|
||||
// v1_certificate_signing_request_spec->usages
|
||||
cJSON *usages = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_specJSON, "usages");
|
||||
list_t *usagesList;
|
||||
if (usages) {
|
||||
cJSON *usages_local;
|
||||
cJSON *usages_local = NULL;
|
||||
if(!cJSON_IsArray(usages)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -310,6 +316,36 @@ v1_certificate_signing_request_spec_t *v1_certificate_signing_request_spec_parse
|
||||
|
||||
return v1_certificate_signing_request_spec_local_var;
|
||||
end:
|
||||
if (extraList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, extraList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(extraList);
|
||||
extraList = NULL;
|
||||
}
|
||||
if (groupsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, groupsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(groupsList);
|
||||
groupsList = NULL;
|
||||
}
|
||||
if (usagesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, usagesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(usagesList);
|
||||
usagesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,6 +81,9 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p
|
||||
|
||||
v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_certificate_signing_request_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// v1_certificate_signing_request_status->certificate
|
||||
cJSON *certificate = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_statusJSON, "certificate");
|
||||
if (certificate) {
|
||||
@@ -92,9 +95,8 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p
|
||||
|
||||
// v1_certificate_signing_request_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_certificate_signing_request_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -120,6 +122,15 @@ v1_certificate_signing_request_status_t *v1_certificate_signing_request_status_p
|
||||
|
||||
return v1_certificate_signing_request_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_certificate_signing_request_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -139,6 +139,9 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){
|
||||
// define the local variable for v1_cluster_role->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_cluster_role->rules
|
||||
list_t *rulesList = NULL;
|
||||
|
||||
// v1_cluster_role->aggregation_rule
|
||||
cJSON *aggregation_rule = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "aggregationRule");
|
||||
if (aggregation_rule) {
|
||||
@@ -171,9 +174,8 @@ v1_cluster_role_t *v1_cluster_role_parseFromJSON(cJSON *v1_cluster_roleJSON){
|
||||
|
||||
// v1_cluster_role->rules
|
||||
cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_cluster_roleJSON, "rules");
|
||||
list_t *rulesList;
|
||||
if (rules) {
|
||||
cJSON *rules_local_nonprimitive;
|
||||
cJSON *rules_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(rules)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -210,6 +212,15 @@ end:
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
}
|
||||
if (rulesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, rulesList) {
|
||||
v1_policy_rule_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(rulesList);
|
||||
rulesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -141,6 +141,9 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust
|
||||
// define the local variable for v1_cluster_role_binding->role_ref
|
||||
v1_role_ref_t *role_ref_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_cluster_role_binding->subjects
|
||||
list_t *subjectsList = NULL;
|
||||
|
||||
// v1_cluster_role_binding->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -176,9 +179,8 @@ v1_cluster_role_binding_t *v1_cluster_role_binding_parseFromJSON(cJSON *v1_clust
|
||||
|
||||
// v1_cluster_role_binding->subjects
|
||||
cJSON *subjects = cJSON_GetObjectItemCaseSensitive(v1_cluster_role_bindingJSON, "subjects");
|
||||
list_t *subjectsList;
|
||||
if (subjects) {
|
||||
cJSON *subjects_local_nonprimitive;
|
||||
cJSON *subjects_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(subjects)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -215,6 +217,15 @@ end:
|
||||
v1_role_ref_free(role_ref_local_nonprim);
|
||||
role_ref_local_nonprim = NULL;
|
||||
}
|
||||
if (subjectsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, subjectsList) {
|
||||
v1_subject_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(subjectsList);
|
||||
subjectsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON
|
||||
|
||||
v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_cluster_role_binding_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_cluster_role_binding_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_cluster_role_binding_list_t *v1_cluster_role_binding_list_parseFromJSON(cJSON
|
||||
|
||||
return v1_cluster_role_binding_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_cluster_role_binding_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol
|
||||
|
||||
v1_cluster_role_list_t *v1_cluster_role_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_cluster_role_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_cluster_role_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_cluster_role_list_t *v1_cluster_role_list_parseFromJSON(cJSON *v1_cluster_rol
|
||||
|
||||
return v1_cluster_role_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_cluster_role_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -114,6 +114,9 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta
|
||||
|
||||
v1_component_status_t *v1_component_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_component_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// define the local variable for v1_component_status->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -128,9 +131,8 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta
|
||||
|
||||
// v1_component_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_component_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -173,6 +175,15 @@ v1_component_status_t *v1_component_status_parseFromJSON(cJSON *v1_component_sta
|
||||
|
||||
return v1_component_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_component_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com
|
||||
|
||||
v1_component_status_list_t *v1_component_status_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_component_status_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_component_status_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_component_status_list_t *v1_component_status_list_parseFromJSON(cJSON *v1_com
|
||||
|
||||
return v1_component_status_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_component_status_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -159,6 +159,12 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){
|
||||
|
||||
v1_config_map_t *v1_config_map_local_var = NULL;
|
||||
|
||||
// define the local map for v1_config_map->binary_data
|
||||
list_t *binary_dataList = NULL;
|
||||
|
||||
// define the local map for v1_config_map->data
|
||||
list_t *dataList = NULL;
|
||||
|
||||
// define the local variable for v1_config_map->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -173,9 +179,8 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){
|
||||
|
||||
// v1_config_map->binary_data
|
||||
cJSON *binary_data = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "binaryData");
|
||||
list_t *binary_dataList;
|
||||
if (binary_data) {
|
||||
cJSON *binary_data_local_map;
|
||||
cJSON *binary_data_local_map = NULL;
|
||||
if(!cJSON_IsObject(binary_data)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -195,9 +200,8 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){
|
||||
|
||||
// v1_config_map->data
|
||||
cJSON *data = cJSON_GetObjectItemCaseSensitive(v1_config_mapJSON, "data");
|
||||
list_t *dataList;
|
||||
if (data) {
|
||||
cJSON *data_local_map;
|
||||
cJSON *data_local_map = NULL;
|
||||
if(!cJSON_IsObject(data)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -251,6 +255,34 @@ v1_config_map_t *v1_config_map_parseFromJSON(cJSON *v1_config_mapJSON){
|
||||
|
||||
return v1_config_map_local_var;
|
||||
end:
|
||||
if (binary_dataList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, binary_dataList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(binary_dataList);
|
||||
binary_dataList = NULL;
|
||||
}
|
||||
if (dataList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, dataList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(dataList);
|
||||
dataList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list
|
||||
|
||||
v1_config_map_list_t *v1_config_map_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_config_map_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_config_map_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_config_map_list_t *v1_config_map_list_parseFromJSON(cJSON *v1_config_map_list
|
||||
|
||||
return v1_config_map_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_config_map_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -91,11 +91,13 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con
|
||||
|
||||
v1_config_map_projection_t *v1_config_map_projection_local_var = NULL;
|
||||
|
||||
// define the local list for v1_config_map_projection->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// v1_config_map_projection->items
|
||||
cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_config_map_projectionJSON, "items");
|
||||
list_t *itemsList;
|
||||
if (items) {
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -140,6 +142,15 @@ v1_config_map_projection_t *v1_config_map_projection_parseFromJSON(cJSON *v1_con
|
||||
|
||||
return v1_config_map_projection_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_key_to_path_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -101,6 +101,9 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON *
|
||||
|
||||
v1_config_map_volume_source_t *v1_config_map_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_config_map_volume_source->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// v1_config_map_volume_source->default_mode
|
||||
cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "defaultMode");
|
||||
if (default_mode) {
|
||||
@@ -112,9 +115,8 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON *
|
||||
|
||||
// v1_config_map_volume_source->items
|
||||
cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_config_map_volume_sourceJSON, "items");
|
||||
list_t *itemsList;
|
||||
if (items) {
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -160,6 +162,15 @@ v1_config_map_volume_source_t *v1_config_map_volume_source_parseFromJSON(cJSON *
|
||||
|
||||
return v1_config_map_volume_source_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_key_to_path_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -465,12 +465,27 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
v1_container_t *v1_container_local_var = NULL;
|
||||
|
||||
// define the local list for v1_container->args
|
||||
list_t *argsList = NULL;
|
||||
|
||||
// define the local list for v1_container->command
|
||||
list_t *commandList = NULL;
|
||||
|
||||
// define the local list for v1_container->env
|
||||
list_t *envList = NULL;
|
||||
|
||||
// define the local list for v1_container->env_from
|
||||
list_t *env_fromList = NULL;
|
||||
|
||||
// define the local variable for v1_container->lifecycle
|
||||
v1_lifecycle_t *lifecycle_local_nonprim = NULL;
|
||||
|
||||
// define the local variable for v1_container->liveness_probe
|
||||
v1_probe_t *liveness_probe_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_container->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// define the local variable for v1_container->readiness_probe
|
||||
v1_probe_t *readiness_probe_local_nonprim = NULL;
|
||||
|
||||
@@ -483,11 +498,16 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
// define the local variable for v1_container->startup_probe
|
||||
v1_probe_t *startup_probe_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_container->volume_devices
|
||||
list_t *volume_devicesList = NULL;
|
||||
|
||||
// define the local list for v1_container->volume_mounts
|
||||
list_t *volume_mountsList = NULL;
|
||||
|
||||
// v1_container->args
|
||||
cJSON *args = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "args");
|
||||
list_t *argsList;
|
||||
if (args) {
|
||||
cJSON *args_local;
|
||||
cJSON *args_local = NULL;
|
||||
if(!cJSON_IsArray(args)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -505,9 +525,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->command
|
||||
cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "command");
|
||||
list_t *commandList;
|
||||
if (command) {
|
||||
cJSON *command_local;
|
||||
cJSON *command_local = NULL;
|
||||
if(!cJSON_IsArray(command)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -525,9 +544,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->env
|
||||
cJSON *env = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "env");
|
||||
list_t *envList;
|
||||
if (env) {
|
||||
cJSON *env_local_nonprimitive;
|
||||
cJSON *env_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(env)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -547,9 +565,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->env_from
|
||||
cJSON *env_from = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "envFrom");
|
||||
list_t *env_fromList;
|
||||
if (env_from) {
|
||||
cJSON *env_from_local_nonprimitive;
|
||||
cJSON *env_from_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(env_from)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -611,9 +628,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -702,9 +718,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->volume_devices
|
||||
cJSON *volume_devices = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "volumeDevices");
|
||||
list_t *volume_devicesList;
|
||||
if (volume_devices) {
|
||||
cJSON *volume_devices_local_nonprimitive;
|
||||
cJSON *volume_devices_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(volume_devices)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -724,9 +739,8 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
// v1_container->volume_mounts
|
||||
cJSON *volume_mounts = cJSON_GetObjectItemCaseSensitive(v1_containerJSON, "volumeMounts");
|
||||
list_t *volume_mountsList;
|
||||
if (volume_mounts) {
|
||||
cJSON *volume_mounts_local_nonprimitive;
|
||||
cJSON *volume_mounts_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(volume_mounts)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -781,6 +795,42 @@ v1_container_t *v1_container_parseFromJSON(cJSON *v1_containerJSON){
|
||||
|
||||
return v1_container_local_var;
|
||||
end:
|
||||
if (argsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, argsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(argsList);
|
||||
argsList = NULL;
|
||||
}
|
||||
if (commandList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, commandList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(commandList);
|
||||
commandList = NULL;
|
||||
}
|
||||
if (envList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, envList) {
|
||||
v1_env_var_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(envList);
|
||||
envList = NULL;
|
||||
}
|
||||
if (env_fromList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, env_fromList) {
|
||||
v1_env_from_source_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(env_fromList);
|
||||
env_fromList = NULL;
|
||||
}
|
||||
if (lifecycle_local_nonprim) {
|
||||
v1_lifecycle_free(lifecycle_local_nonprim);
|
||||
lifecycle_local_nonprim = NULL;
|
||||
@@ -789,6 +839,15 @@ end:
|
||||
v1_probe_free(liveness_probe_local_nonprim);
|
||||
liveness_probe_local_nonprim = NULL;
|
||||
}
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
v1_container_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
if (readiness_probe_local_nonprim) {
|
||||
v1_probe_free(readiness_probe_local_nonprim);
|
||||
readiness_probe_local_nonprim = NULL;
|
||||
@@ -805,6 +864,24 @@ end:
|
||||
v1_probe_free(startup_probe_local_nonprim);
|
||||
startup_probe_local_nonprim = NULL;
|
||||
}
|
||||
if (volume_devicesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_devicesList) {
|
||||
v1_volume_device_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(volume_devicesList);
|
||||
volume_devicesList = NULL;
|
||||
}
|
||||
if (volume_mountsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_mountsList) {
|
||||
v1_volume_mount_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(volume_mountsList);
|
||||
volume_mountsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -74,11 +74,13 @@ v1_container_image_t *v1_container_image_parseFromJSON(cJSON *v1_container_image
|
||||
|
||||
v1_container_image_t *v1_container_image_local_var = NULL;
|
||||
|
||||
// define the local list for v1_container_image->names
|
||||
list_t *namesList = NULL;
|
||||
|
||||
// v1_container_image->names
|
||||
cJSON *names = cJSON_GetObjectItemCaseSensitive(v1_container_imageJSON, "names");
|
||||
list_t *namesList;
|
||||
if (names) {
|
||||
cJSON *names_local;
|
||||
cJSON *names_local = NULL;
|
||||
if(!cJSON_IsArray(names)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -111,6 +113,15 @@ v1_container_image_t *v1_container_image_parseFromJSON(cJSON *v1_container_image
|
||||
|
||||
return v1_container_image_local_var;
|
||||
end:
|
||||
if (namesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, namesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(namesList);
|
||||
namesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON *
|
||||
|
||||
v1_controller_revision_list_t *v1_controller_revision_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_controller_revision_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_controller_revision_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON *
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_controller_revision_list_t *v1_controller_revision_list_parseFromJSON(cJSON *
|
||||
|
||||
return v1_controller_revision_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_controller_revision_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){
|
||||
|
||||
v1_cron_job_list_t *v1_cron_job_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_cron_job_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_cron_job_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_cron_job_list_t *v1_cron_job_list_parseFromJSON(cJSON *v1_cron_job_listJSON){
|
||||
|
||||
return v1_cron_job_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_cron_job_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -95,11 +95,13 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status
|
||||
|
||||
v1_cron_job_status_t *v1_cron_job_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_cron_job_status->active
|
||||
list_t *activeList = NULL;
|
||||
|
||||
// v1_cron_job_status->active
|
||||
cJSON *active = cJSON_GetObjectItemCaseSensitive(v1_cron_job_statusJSON, "active");
|
||||
list_t *activeList;
|
||||
if (active) {
|
||||
cJSON *active_local_nonprimitive;
|
||||
cJSON *active_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(active)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -144,6 +146,15 @@ v1_cron_job_status_t *v1_cron_job_status_parseFromJSON(cJSON *v1_cron_job_status
|
||||
|
||||
return v1_cron_job_status_local_var;
|
||||
end:
|
||||
if (activeList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, activeList) {
|
||||
v1_object_reference_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(activeList);
|
||||
activeList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list
|
||||
|
||||
v1_csi_driver_list_t *v1_csi_driver_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_csi_driver_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_csi_driver_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_csi_driver_list_t *v1_csi_driver_list_parseFromJSON(cJSON *v1_csi_driver_list
|
||||
|
||||
return v1_csi_driver_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_csi_driver_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -147,6 +147,12 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec
|
||||
|
||||
v1_csi_driver_spec_t *v1_csi_driver_spec_local_var = NULL;
|
||||
|
||||
// define the local list for v1_csi_driver_spec->token_requests
|
||||
list_t *token_requestsList = NULL;
|
||||
|
||||
// define the local list for v1_csi_driver_spec->volume_lifecycle_modes
|
||||
list_t *volume_lifecycle_modesList = NULL;
|
||||
|
||||
// v1_csi_driver_spec->attach_required
|
||||
cJSON *attach_required = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "attachRequired");
|
||||
if (attach_required) {
|
||||
@@ -194,9 +200,8 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec
|
||||
|
||||
// v1_csi_driver_spec->token_requests
|
||||
cJSON *token_requests = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "tokenRequests");
|
||||
list_t *token_requestsList;
|
||||
if (token_requests) {
|
||||
cJSON *token_requests_local_nonprimitive;
|
||||
cJSON *token_requests_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(token_requests)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -216,9 +221,8 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec
|
||||
|
||||
// v1_csi_driver_spec->volume_lifecycle_modes
|
||||
cJSON *volume_lifecycle_modes = cJSON_GetObjectItemCaseSensitive(v1_csi_driver_specJSON, "volumeLifecycleModes");
|
||||
list_t *volume_lifecycle_modesList;
|
||||
if (volume_lifecycle_modes) {
|
||||
cJSON *volume_lifecycle_modes_local;
|
||||
cJSON *volume_lifecycle_modes_local = NULL;
|
||||
if(!cJSON_IsArray(volume_lifecycle_modes)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -247,6 +251,24 @@ v1_csi_driver_spec_t *v1_csi_driver_spec_parseFromJSON(cJSON *v1_csi_driver_spec
|
||||
|
||||
return v1_csi_driver_spec_local_var;
|
||||
end:
|
||||
if (token_requestsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, token_requestsList) {
|
||||
storage_v1_token_request_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(token_requestsList);
|
||||
token_requestsList = NULL;
|
||||
}
|
||||
if (volume_lifecycle_modesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_lifecycle_modesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(volume_lifecycle_modesList);
|
||||
volume_lifecycle_modesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -118,6 +118,9 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver
|
||||
// define the local variable for v1_csi_node_driver->allocatable
|
||||
v1_volume_node_resources_t *allocatable_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_csi_node_driver->topology_keys
|
||||
list_t *topology_keysList = NULL;
|
||||
|
||||
// v1_csi_node_driver->allocatable
|
||||
cJSON *allocatable = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "allocatable");
|
||||
if (allocatable) {
|
||||
@@ -150,9 +153,8 @@ v1_csi_node_driver_t *v1_csi_node_driver_parseFromJSON(cJSON *v1_csi_node_driver
|
||||
|
||||
// v1_csi_node_driver->topology_keys
|
||||
cJSON *topology_keys = cJSON_GetObjectItemCaseSensitive(v1_csi_node_driverJSON, "topologyKeys");
|
||||
list_t *topology_keysList;
|
||||
if (topology_keys) {
|
||||
cJSON *topology_keys_local;
|
||||
cJSON *topology_keys_local = NULL;
|
||||
if(!cJSON_IsArray(topology_keys)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -182,6 +184,15 @@ end:
|
||||
v1_volume_node_resources_free(allocatable_local_nonprim);
|
||||
allocatable_local_nonprim = NULL;
|
||||
}
|
||||
if (topology_keysList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, topology_keysList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(topology_keysList);
|
||||
topology_keysList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){
|
||||
|
||||
v1_csi_node_list_t *v1_csi_node_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_csi_node_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_csi_node_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_csi_node_list_t *v1_csi_node_list_parseFromJSON(cJSON *v1_csi_node_listJSON){
|
||||
|
||||
return v1_csi_node_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_csi_node_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -69,15 +69,17 @@ v1_csi_node_spec_t *v1_csi_node_spec_parseFromJSON(cJSON *v1_csi_node_specJSON){
|
||||
|
||||
v1_csi_node_spec_t *v1_csi_node_spec_local_var = NULL;
|
||||
|
||||
// define the local list for v1_csi_node_spec->drivers
|
||||
list_t *driversList = NULL;
|
||||
|
||||
// v1_csi_node_spec->drivers
|
||||
cJSON *drivers = cJSON_GetObjectItemCaseSensitive(v1_csi_node_specJSON, "drivers");
|
||||
if (!drivers) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *driversList;
|
||||
|
||||
cJSON *drivers_local_nonprimitive;
|
||||
cJSON *drivers_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(drivers)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -101,6 +103,15 @@ v1_csi_node_spec_t *v1_csi_node_spec_parseFromJSON(cJSON *v1_csi_node_specJSON){
|
||||
|
||||
return v1_csi_node_spec_local_var;
|
||||
end:
|
||||
if (driversList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, driversList) {
|
||||
v1_csi_node_driver_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(driversList);
|
||||
driversList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -214,6 +214,9 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON
|
||||
// define the local variable for v1_csi_persistent_volume_source->node_stage_secret_ref
|
||||
v1_secret_reference_t *node_stage_secret_ref_local_nonprim = NULL;
|
||||
|
||||
// define the local map for v1_csi_persistent_volume_source->volume_attributes
|
||||
list_t *volume_attributesList = NULL;
|
||||
|
||||
// v1_csi_persistent_volume_source->controller_expand_secret_ref
|
||||
cJSON *controller_expand_secret_ref = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "controllerExpandSecretRef");
|
||||
if (controller_expand_secret_ref) {
|
||||
@@ -270,9 +273,8 @@ v1_csi_persistent_volume_source_t *v1_csi_persistent_volume_source_parseFromJSON
|
||||
|
||||
// v1_csi_persistent_volume_source->volume_attributes
|
||||
cJSON *volume_attributes = cJSON_GetObjectItemCaseSensitive(v1_csi_persistent_volume_sourceJSON, "volumeAttributes");
|
||||
list_t *volume_attributesList;
|
||||
if (volume_attributes) {
|
||||
cJSON *volume_attributes_local_map;
|
||||
cJSON *volume_attributes_local_map = NULL;
|
||||
if(!cJSON_IsObject(volume_attributes)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -333,6 +335,20 @@ end:
|
||||
v1_secret_reference_free(node_stage_secret_ref_local_nonprim);
|
||||
node_stage_secret_ref_local_nonprim = NULL;
|
||||
}
|
||||
if (volume_attributesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_attributesList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(volume_attributesList);
|
||||
volume_attributesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -132,6 +132,9 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_
|
||||
// define the local variable for v1_csi_volume_source->node_publish_secret_ref
|
||||
v1_local_object_reference_t *node_publish_secret_ref_local_nonprim = NULL;
|
||||
|
||||
// define the local map for v1_csi_volume_source->volume_attributes
|
||||
list_t *volume_attributesList = NULL;
|
||||
|
||||
// v1_csi_volume_source->driver
|
||||
cJSON *driver = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "driver");
|
||||
if (!driver) {
|
||||
@@ -170,9 +173,8 @@ v1_csi_volume_source_t *v1_csi_volume_source_parseFromJSON(cJSON *v1_csi_volume_
|
||||
|
||||
// v1_csi_volume_source->volume_attributes
|
||||
cJSON *volume_attributes = cJSON_GetObjectItemCaseSensitive(v1_csi_volume_sourceJSON, "volumeAttributes");
|
||||
list_t *volume_attributesList;
|
||||
if (volume_attributes) {
|
||||
cJSON *volume_attributes_local_map;
|
||||
cJSON *volume_attributes_local_map = NULL;
|
||||
if(!cJSON_IsObject(volume_attributes)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -205,6 +207,20 @@ end:
|
||||
v1_local_object_reference_free(node_publish_secret_ref_local_nonprim);
|
||||
node_publish_secret_ref_local_nonprim = NULL;
|
||||
}
|
||||
if (volume_attributesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_attributesList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(volume_attributesList);
|
||||
volume_attributesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr
|
||||
|
||||
v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_custom_resource_definition_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_custom_resource_definition_list_t *v1_custom_resource_definition_list_parseFr
|
||||
|
||||
return v1_custom_resource_definition_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_custom_resource_definition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -150,11 +150,16 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse
|
||||
|
||||
v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_local_var = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_names->categories
|
||||
list_t *categoriesList = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_names->short_names
|
||||
list_t *short_namesList = NULL;
|
||||
|
||||
// v1_custom_resource_definition_names->categories
|
||||
cJSON *categories = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "categories");
|
||||
list_t *categoriesList;
|
||||
if (categories) {
|
||||
cJSON *categories_local;
|
||||
cJSON *categories_local = NULL;
|
||||
if(!cJSON_IsArray(categories)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -205,9 +210,8 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse
|
||||
|
||||
// v1_custom_resource_definition_names->short_names
|
||||
cJSON *short_names = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_namesJSON, "shortNames");
|
||||
list_t *short_namesList;
|
||||
if (short_names) {
|
||||
cJSON *short_names_local;
|
||||
cJSON *short_names_local = NULL;
|
||||
if(!cJSON_IsArray(short_names)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -244,6 +248,24 @@ v1_custom_resource_definition_names_t *v1_custom_resource_definition_names_parse
|
||||
|
||||
return v1_custom_resource_definition_names_local_var;
|
||||
end:
|
||||
if (categoriesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, categoriesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(categoriesList);
|
||||
categoriesList = NULL;
|
||||
}
|
||||
if (short_namesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, short_namesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(short_namesList);
|
||||
short_namesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -157,6 +157,9 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr
|
||||
// define the local variable for v1_custom_resource_definition_spec->names
|
||||
v1_custom_resource_definition_names_t *names_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_spec->versions
|
||||
list_t *versionsList = NULL;
|
||||
|
||||
// v1_custom_resource_definition_spec->conversion
|
||||
cJSON *conversion = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_specJSON, "conversion");
|
||||
if (conversion) {
|
||||
@@ -211,9 +214,8 @@ v1_custom_resource_definition_spec_t *v1_custom_resource_definition_spec_parseFr
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *versionsList;
|
||||
|
||||
cJSON *versions_local_nonprimitive;
|
||||
cJSON *versions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(versions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -250,6 +252,15 @@ end:
|
||||
v1_custom_resource_definition_names_free(names_local_nonprim);
|
||||
names_local_nonprim = NULL;
|
||||
}
|
||||
if (versionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, versionsList) {
|
||||
v1_custom_resource_definition_version_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(versionsList);
|
||||
versionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +115,12 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par
|
||||
// define the local variable for v1_custom_resource_definition_status->accepted_names
|
||||
v1_custom_resource_definition_names_t *accepted_names_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_status->stored_versions
|
||||
list_t *stored_versionsList = NULL;
|
||||
|
||||
// v1_custom_resource_definition_status->accepted_names
|
||||
cJSON *accepted_names = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "acceptedNames");
|
||||
if (accepted_names) {
|
||||
@@ -123,9 +129,8 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par
|
||||
|
||||
// v1_custom_resource_definition_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -145,9 +150,8 @@ v1_custom_resource_definition_status_t *v1_custom_resource_definition_status_par
|
||||
|
||||
// v1_custom_resource_definition_status->stored_versions
|
||||
cJSON *stored_versions = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_statusJSON, "storedVersions");
|
||||
list_t *stored_versionsList;
|
||||
if (stored_versions) {
|
||||
cJSON *stored_versions_local;
|
||||
cJSON *stored_versions_local = NULL;
|
||||
if(!cJSON_IsArray(stored_versions)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -176,6 +180,24 @@ end:
|
||||
v1_custom_resource_definition_names_free(accepted_names_local_nonprim);
|
||||
accepted_names_local_nonprim = NULL;
|
||||
}
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_custom_resource_definition_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
if (stored_versionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, stored_versionsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(stored_versionsList);
|
||||
stored_versionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -169,6 +169,9 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p
|
||||
|
||||
v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_local_var = NULL;
|
||||
|
||||
// define the local list for v1_custom_resource_definition_version->additional_printer_columns
|
||||
list_t *additional_printer_columnsList = NULL;
|
||||
|
||||
// define the local variable for v1_custom_resource_definition_version->schema
|
||||
v1_custom_resource_validation_t *schema_local_nonprim = NULL;
|
||||
|
||||
@@ -177,9 +180,8 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p
|
||||
|
||||
// v1_custom_resource_definition_version->additional_printer_columns
|
||||
cJSON *additional_printer_columns = cJSON_GetObjectItemCaseSensitive(v1_custom_resource_definition_versionJSON, "additionalPrinterColumns");
|
||||
list_t *additional_printer_columnsList;
|
||||
if (additional_printer_columns) {
|
||||
cJSON *additional_printer_columns_local_nonprimitive;
|
||||
cJSON *additional_printer_columns_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(additional_printer_columns)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -277,6 +279,15 @@ v1_custom_resource_definition_version_t *v1_custom_resource_definition_version_p
|
||||
|
||||
return v1_custom_resource_definition_version_local_var;
|
||||
end:
|
||||
if (additional_printer_columnsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, additional_printer_columnsList) {
|
||||
v1_custom_resource_column_definition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(additional_printer_columnsList);
|
||||
additional_printer_columnsList = NULL;
|
||||
}
|
||||
if (schema_local_nonprim) {
|
||||
v1_custom_resource_validation_free(schema_local_nonprim);
|
||||
schema_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list
|
||||
|
||||
v1_daemon_set_list_t *v1_daemon_set_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_daemon_set_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_daemon_set_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_daemon_set_list_t *v1_daemon_set_list_parseFromJSON(cJSON *v1_daemon_set_list
|
||||
|
||||
return v1_daemon_set_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_daemon_set_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -165,6 +165,9 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_
|
||||
|
||||
v1_daemon_set_status_t *v1_daemon_set_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_daemon_set_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// v1_daemon_set_status->collision_count
|
||||
cJSON *collision_count = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "collisionCount");
|
||||
if (collision_count) {
|
||||
@@ -176,9 +179,8 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_
|
||||
|
||||
// v1_daemon_set_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_daemon_set_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -296,6 +298,15 @@ v1_daemon_set_status_t *v1_daemon_set_status_parseFromJSON(cJSON *v1_daemon_set_
|
||||
|
||||
return v1_daemon_set_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_daemon_set_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -145,6 +145,9 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO
|
||||
|
||||
v1_delete_options_t *v1_delete_options_local_var = NULL;
|
||||
|
||||
// define the local list for v1_delete_options->dry_run
|
||||
list_t *dry_runList = NULL;
|
||||
|
||||
// define the local variable for v1_delete_options->preconditions
|
||||
v1_preconditions_t *preconditions_local_nonprim = NULL;
|
||||
|
||||
@@ -159,9 +162,8 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO
|
||||
|
||||
// v1_delete_options->dry_run
|
||||
cJSON *dry_run = cJSON_GetObjectItemCaseSensitive(v1_delete_optionsJSON, "dryRun");
|
||||
list_t *dry_runList;
|
||||
if (dry_run) {
|
||||
cJSON *dry_run_local;
|
||||
cJSON *dry_run_local = NULL;
|
||||
if(!cJSON_IsArray(dry_run)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -232,6 +234,15 @@ v1_delete_options_t *v1_delete_options_parseFromJSON(cJSON *v1_delete_optionsJSO
|
||||
|
||||
return v1_delete_options_local_var;
|
||||
end:
|
||||
if (dry_runList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, dry_runList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(dry_runList);
|
||||
dry_runList = NULL;
|
||||
}
|
||||
if (preconditions_local_nonprim) {
|
||||
v1_preconditions_free(preconditions_local_nonprim);
|
||||
preconditions_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list
|
||||
|
||||
v1_deployment_list_t *v1_deployment_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_deployment_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_deployment_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_deployment_list_t *v1_deployment_list_parseFromJSON(cJSON *v1_deployment_list
|
||||
|
||||
return v1_deployment_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_deployment_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -137,6 +137,9 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_
|
||||
|
||||
v1_deployment_status_t *v1_deployment_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_deployment_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// v1_deployment_status->available_replicas
|
||||
cJSON *available_replicas = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "availableReplicas");
|
||||
if (available_replicas) {
|
||||
@@ -157,9 +160,8 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_
|
||||
|
||||
// v1_deployment_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_deployment_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -236,6 +238,15 @@ v1_deployment_status_t *v1_deployment_status_parseFromJSON(cJSON *v1_deployment_
|
||||
|
||||
return v1_deployment_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_deployment_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,11 +67,13 @@ v1_downward_api_projection_t *v1_downward_api_projection_parseFromJSON(cJSON *v1
|
||||
|
||||
v1_downward_api_projection_t *v1_downward_api_projection_local_var = NULL;
|
||||
|
||||
// define the local list for v1_downward_api_projection->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// v1_downward_api_projection->items
|
||||
cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_downward_api_projectionJSON, "items");
|
||||
list_t *itemsList;
|
||||
if (items) {
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -96,6 +98,15 @@ v1_downward_api_projection_t *v1_downward_api_projection_parseFromJSON(cJSON *v1
|
||||
|
||||
return v1_downward_api_projection_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_downward_api_volume_file_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -77,6 +77,9 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS
|
||||
|
||||
v1_downward_api_volume_source_t *v1_downward_api_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_downward_api_volume_source->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// v1_downward_api_volume_source->default_mode
|
||||
cJSON *default_mode = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_sourceJSON, "defaultMode");
|
||||
if (default_mode) {
|
||||
@@ -88,9 +91,8 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS
|
||||
|
||||
// v1_downward_api_volume_source->items
|
||||
cJSON *items = cJSON_GetObjectItemCaseSensitive(v1_downward_api_volume_sourceJSON, "items");
|
||||
list_t *itemsList;
|
||||
if (items) {
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -116,6 +118,15 @@ v1_downward_api_volume_source_t *v1_downward_api_volume_source_parseFromJSON(cJS
|
||||
|
||||
return v1_downward_api_volume_source_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_downward_api_volume_file_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -197,9 +197,15 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){
|
||||
|
||||
v1_endpoint_t *v1_endpoint_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoint->addresses
|
||||
list_t *addressesList = NULL;
|
||||
|
||||
// define the local variable for v1_endpoint->conditions
|
||||
v1_endpoint_conditions_t *conditions_local_nonprim = NULL;
|
||||
|
||||
// define the local map for v1_endpoint->deprecated_topology
|
||||
list_t *deprecated_topologyList = NULL;
|
||||
|
||||
// define the local variable for v1_endpoint->hints
|
||||
v1_endpoint_hints_t *hints_local_nonprim = NULL;
|
||||
|
||||
@@ -212,9 +218,8 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *addressesList;
|
||||
|
||||
cJSON *addresses_local;
|
||||
cJSON *addresses_local = NULL;
|
||||
if(!cJSON_IsArray(addresses)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -237,9 +242,8 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){
|
||||
|
||||
// v1_endpoint->deprecated_topology
|
||||
cJSON *deprecated_topology = cJSON_GetObjectItemCaseSensitive(v1_endpointJSON, "deprecatedTopology");
|
||||
list_t *deprecated_topologyList;
|
||||
if (deprecated_topology) {
|
||||
cJSON *deprecated_topology_local_map;
|
||||
cJSON *deprecated_topology_local_map = NULL;
|
||||
if(!cJSON_IsObject(deprecated_topology)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -310,10 +314,33 @@ v1_endpoint_t *v1_endpoint_parseFromJSON(cJSON *v1_endpointJSON){
|
||||
|
||||
return v1_endpoint_local_var;
|
||||
end:
|
||||
if (addressesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, addressesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(addressesList);
|
||||
addressesList = NULL;
|
||||
}
|
||||
if (conditions_local_nonprim) {
|
||||
v1_endpoint_conditions_free(conditions_local_nonprim);
|
||||
conditions_local_nonprim = NULL;
|
||||
}
|
||||
if (deprecated_topologyList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, deprecated_topologyList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(deprecated_topologyList);
|
||||
deprecated_topologyList = NULL;
|
||||
}
|
||||
if (hints_local_nonprim) {
|
||||
v1_endpoint_hints_free(hints_local_nonprim);
|
||||
hints_local_nonprim = NULL;
|
||||
|
||||
@@ -67,11 +67,13 @@ v1_endpoint_hints_t *v1_endpoint_hints_parseFromJSON(cJSON *v1_endpoint_hintsJSO
|
||||
|
||||
v1_endpoint_hints_t *v1_endpoint_hints_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_hints->for_zones
|
||||
list_t *for_zonesList = NULL;
|
||||
|
||||
// v1_endpoint_hints->for_zones
|
||||
cJSON *for_zones = cJSON_GetObjectItemCaseSensitive(v1_endpoint_hintsJSON, "forZones");
|
||||
list_t *for_zonesList;
|
||||
if (for_zones) {
|
||||
cJSON *for_zones_local_nonprimitive;
|
||||
cJSON *for_zones_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(for_zones)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -96,6 +98,15 @@ v1_endpoint_hints_t *v1_endpoint_hints_parseFromJSON(cJSON *v1_endpoint_hintsJSO
|
||||
|
||||
return v1_endpoint_hints_local_var;
|
||||
end:
|
||||
if (for_zonesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, for_zonesList) {
|
||||
v1_for_zone_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(for_zonesList);
|
||||
for_zonesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -161,9 +161,15 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO
|
||||
|
||||
v1_endpoint_slice_t *v1_endpoint_slice_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_slice->endpoints
|
||||
list_t *endpointsList = NULL;
|
||||
|
||||
// define the local variable for v1_endpoint_slice->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_slice->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// v1_endpoint_slice->address_type
|
||||
cJSON *address_type = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "addressType");
|
||||
if (!address_type) {
|
||||
@@ -191,9 +197,8 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *endpointsList;
|
||||
|
||||
cJSON *endpoints_local_nonprimitive;
|
||||
cJSON *endpoints_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(endpoints)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -227,9 +232,8 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO
|
||||
|
||||
// v1_endpoint_slice->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_endpoint_sliceJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -259,10 +263,28 @@ v1_endpoint_slice_t *v1_endpoint_slice_parseFromJSON(cJSON *v1_endpoint_sliceJSO
|
||||
|
||||
return v1_endpoint_slice_local_var;
|
||||
end:
|
||||
if (endpointsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, endpointsList) {
|
||||
v1_endpoint_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(endpointsList);
|
||||
endpointsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
}
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
discovery_v1_endpoint_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin
|
||||
|
||||
v1_endpoint_slice_list_t *v1_endpoint_slice_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_slice_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_endpoint_slice_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_endpoint_slice_list_t *v1_endpoint_slice_list_parseFromJSON(cJSON *v1_endpoin
|
||||
|
||||
return v1_endpoint_slice_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_endpoint_slice_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -125,11 +125,19 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset
|
||||
|
||||
v1_endpoint_subset_t *v1_endpoint_subset_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_subset->addresses
|
||||
list_t *addressesList = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_subset->not_ready_addresses
|
||||
list_t *not_ready_addressesList = NULL;
|
||||
|
||||
// define the local list for v1_endpoint_subset->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// v1_endpoint_subset->addresses
|
||||
cJSON *addresses = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "addresses");
|
||||
list_t *addressesList;
|
||||
if (addresses) {
|
||||
cJSON *addresses_local_nonprimitive;
|
||||
cJSON *addresses_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(addresses)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -149,9 +157,8 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset
|
||||
|
||||
// v1_endpoint_subset->not_ready_addresses
|
||||
cJSON *not_ready_addresses = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "notReadyAddresses");
|
||||
list_t *not_ready_addressesList;
|
||||
if (not_ready_addresses) {
|
||||
cJSON *not_ready_addresses_local_nonprimitive;
|
||||
cJSON *not_ready_addresses_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(not_ready_addresses)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -171,9 +178,8 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset
|
||||
|
||||
// v1_endpoint_subset->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_endpoint_subsetJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -200,6 +206,33 @@ v1_endpoint_subset_t *v1_endpoint_subset_parseFromJSON(cJSON *v1_endpoint_subset
|
||||
|
||||
return v1_endpoint_subset_local_var;
|
||||
end:
|
||||
if (addressesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, addressesList) {
|
||||
v1_endpoint_address_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(addressesList);
|
||||
addressesList = NULL;
|
||||
}
|
||||
if (not_ready_addressesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, not_ready_addressesList) {
|
||||
v1_endpoint_address_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(not_ready_addressesList);
|
||||
not_ready_addressesList = NULL;
|
||||
}
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
core_v1_endpoint_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -117,6 +117,9 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){
|
||||
// define the local variable for v1_endpoints->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_endpoints->subsets
|
||||
list_t *subsetsList = NULL;
|
||||
|
||||
// v1_endpoints->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -143,9 +146,8 @@ v1_endpoints_t *v1_endpoints_parseFromJSON(cJSON *v1_endpointsJSON){
|
||||
|
||||
// v1_endpoints->subsets
|
||||
cJSON *subsets = cJSON_GetObjectItemCaseSensitive(v1_endpointsJSON, "subsets");
|
||||
list_t *subsetsList;
|
||||
if (subsets) {
|
||||
cJSON *subsets_local_nonprimitive;
|
||||
cJSON *subsets_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(subsets)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -177,6 +179,15 @@ end:
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
}
|
||||
if (subsetsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, subsetsList) {
|
||||
v1_endpoint_subset_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(subsetsList);
|
||||
subsetsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO
|
||||
|
||||
v1_endpoints_list_t *v1_endpoints_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_endpoints_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_endpoints_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_endpoints_list_t *v1_endpoints_list_parseFromJSON(cJSON *v1_endpoints_listJSO
|
||||
|
||||
return v1_endpoints_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_endpoints_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -479,12 +479,27 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
v1_ephemeral_container_t *v1_ephemeral_container_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->args
|
||||
list_t *argsList = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->command
|
||||
list_t *commandList = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->env
|
||||
list_t *envList = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->env_from
|
||||
list_t *env_fromList = NULL;
|
||||
|
||||
// define the local variable for v1_ephemeral_container->lifecycle
|
||||
v1_lifecycle_t *lifecycle_local_nonprim = NULL;
|
||||
|
||||
// define the local variable for v1_ephemeral_container->liveness_probe
|
||||
v1_probe_t *liveness_probe_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// define the local variable for v1_ephemeral_container->readiness_probe
|
||||
v1_probe_t *readiness_probe_local_nonprim = NULL;
|
||||
|
||||
@@ -497,11 +512,16 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
// define the local variable for v1_ephemeral_container->startup_probe
|
||||
v1_probe_t *startup_probe_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->volume_devices
|
||||
list_t *volume_devicesList = NULL;
|
||||
|
||||
// define the local list for v1_ephemeral_container->volume_mounts
|
||||
list_t *volume_mountsList = NULL;
|
||||
|
||||
// v1_ephemeral_container->args
|
||||
cJSON *args = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "args");
|
||||
list_t *argsList;
|
||||
if (args) {
|
||||
cJSON *args_local;
|
||||
cJSON *args_local = NULL;
|
||||
if(!cJSON_IsArray(args)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -519,9 +539,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->command
|
||||
cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "command");
|
||||
list_t *commandList;
|
||||
if (command) {
|
||||
cJSON *command_local;
|
||||
cJSON *command_local = NULL;
|
||||
if(!cJSON_IsArray(command)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -539,9 +558,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->env
|
||||
cJSON *env = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "env");
|
||||
list_t *envList;
|
||||
if (env) {
|
||||
cJSON *env_local_nonprimitive;
|
||||
cJSON *env_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(env)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -561,9 +579,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->env_from
|
||||
cJSON *env_from = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "envFrom");
|
||||
list_t *env_fromList;
|
||||
if (env_from) {
|
||||
cJSON *env_from_local_nonprimitive;
|
||||
cJSON *env_from_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(env_from)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -625,9 +642,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -725,9 +741,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->volume_devices
|
||||
cJSON *volume_devices = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "volumeDevices");
|
||||
list_t *volume_devicesList;
|
||||
if (volume_devices) {
|
||||
cJSON *volume_devices_local_nonprimitive;
|
||||
cJSON *volume_devices_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(volume_devices)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -747,9 +762,8 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
// v1_ephemeral_container->volume_mounts
|
||||
cJSON *volume_mounts = cJSON_GetObjectItemCaseSensitive(v1_ephemeral_containerJSON, "volumeMounts");
|
||||
list_t *volume_mountsList;
|
||||
if (volume_mounts) {
|
||||
cJSON *volume_mounts_local_nonprimitive;
|
||||
cJSON *volume_mounts_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(volume_mounts)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -805,6 +819,42 @@ v1_ephemeral_container_t *v1_ephemeral_container_parseFromJSON(cJSON *v1_ephemer
|
||||
|
||||
return v1_ephemeral_container_local_var;
|
||||
end:
|
||||
if (argsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, argsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(argsList);
|
||||
argsList = NULL;
|
||||
}
|
||||
if (commandList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, commandList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(commandList);
|
||||
commandList = NULL;
|
||||
}
|
||||
if (envList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, envList) {
|
||||
v1_env_var_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(envList);
|
||||
envList = NULL;
|
||||
}
|
||||
if (env_fromList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, env_fromList) {
|
||||
v1_env_from_source_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(env_fromList);
|
||||
env_fromList = NULL;
|
||||
}
|
||||
if (lifecycle_local_nonprim) {
|
||||
v1_lifecycle_free(lifecycle_local_nonprim);
|
||||
lifecycle_local_nonprim = NULL;
|
||||
@@ -813,6 +863,15 @@ end:
|
||||
v1_probe_free(liveness_probe_local_nonprim);
|
||||
liveness_probe_local_nonprim = NULL;
|
||||
}
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
v1_container_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
if (readiness_probe_local_nonprim) {
|
||||
v1_probe_free(readiness_probe_local_nonprim);
|
||||
readiness_probe_local_nonprim = NULL;
|
||||
@@ -829,6 +888,24 @@ end:
|
||||
v1_probe_free(startup_probe_local_nonprim);
|
||||
startup_probe_local_nonprim = NULL;
|
||||
}
|
||||
if (volume_devicesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_devicesList) {
|
||||
v1_volume_device_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(volume_devicesList);
|
||||
volume_devicesList = NULL;
|
||||
}
|
||||
if (volume_mountsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, volume_mountsList) {
|
||||
v1_volume_mount_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(volume_mountsList);
|
||||
volume_mountsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -64,11 +64,13 @@ v1_exec_action_t *v1_exec_action_parseFromJSON(cJSON *v1_exec_actionJSON){
|
||||
|
||||
v1_exec_action_t *v1_exec_action_local_var = NULL;
|
||||
|
||||
// define the local list for v1_exec_action->command
|
||||
list_t *commandList = NULL;
|
||||
|
||||
// v1_exec_action->command
|
||||
cJSON *command = cJSON_GetObjectItemCaseSensitive(v1_exec_actionJSON, "command");
|
||||
list_t *commandList;
|
||||
if (command) {
|
||||
cJSON *command_local;
|
||||
cJSON *command_local = NULL;
|
||||
if(!cJSON_IsArray(command)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -91,6 +93,15 @@ v1_exec_action_t *v1_exec_action_parseFromJSON(cJSON *v1_exec_actionJSON){
|
||||
|
||||
return v1_exec_action_local_var;
|
||||
end:
|
||||
if (commandList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, commandList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(commandList);
|
||||
commandList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -124,6 +124,12 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou
|
||||
|
||||
v1_fc_volume_source_t *v1_fc_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_fc_volume_source->target_wwns
|
||||
list_t *target_wwnsList = NULL;
|
||||
|
||||
// define the local list for v1_fc_volume_source->wwids
|
||||
list_t *wwidsList = NULL;
|
||||
|
||||
// v1_fc_volume_source->fs_type
|
||||
cJSON *fs_type = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "fsType");
|
||||
if (fs_type) {
|
||||
@@ -153,9 +159,8 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou
|
||||
|
||||
// v1_fc_volume_source->target_wwns
|
||||
cJSON *target_wwns = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "targetWWNs");
|
||||
list_t *target_wwnsList;
|
||||
if (target_wwns) {
|
||||
cJSON *target_wwns_local;
|
||||
cJSON *target_wwns_local = NULL;
|
||||
if(!cJSON_IsArray(target_wwns)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -173,9 +178,8 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou
|
||||
|
||||
// v1_fc_volume_source->wwids
|
||||
cJSON *wwids = cJSON_GetObjectItemCaseSensitive(v1_fc_volume_sourceJSON, "wwids");
|
||||
list_t *wwidsList;
|
||||
if (wwids) {
|
||||
cJSON *wwids_local;
|
||||
cJSON *wwids_local = NULL;
|
||||
if(!cJSON_IsArray(wwids)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -202,6 +206,24 @@ v1_fc_volume_source_t *v1_fc_volume_source_parseFromJSON(cJSON *v1_fc_volume_sou
|
||||
|
||||
return v1_fc_volume_source_local_var;
|
||||
end:
|
||||
if (target_wwnsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, target_wwnsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(target_wwnsList);
|
||||
target_wwnsList = NULL;
|
||||
}
|
||||
if (wwidsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, wwidsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(wwidsList);
|
||||
wwidsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -129,6 +129,9 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS
|
||||
|
||||
v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_local_var = NULL;
|
||||
|
||||
// define the local map for v1_flex_persistent_volume_source->options
|
||||
list_t *optionsList = NULL;
|
||||
|
||||
// define the local variable for v1_flex_persistent_volume_source->secret_ref
|
||||
v1_secret_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -155,9 +158,8 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS
|
||||
|
||||
// v1_flex_persistent_volume_source->options
|
||||
cJSON *options = cJSON_GetObjectItemCaseSensitive(v1_flex_persistent_volume_sourceJSON, "options");
|
||||
list_t *optionsList;
|
||||
if (options) {
|
||||
cJSON *options_local_map;
|
||||
cJSON *options_local_map = NULL;
|
||||
if(!cJSON_IsObject(options)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -201,6 +203,20 @@ v1_flex_persistent_volume_source_t *v1_flex_persistent_volume_source_parseFromJS
|
||||
|
||||
return v1_flex_persistent_volume_source_local_var;
|
||||
end:
|
||||
if (optionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, optionsList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(optionsList);
|
||||
optionsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_secret_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -129,6 +129,9 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu
|
||||
|
||||
v1_flex_volume_source_t *v1_flex_volume_source_local_var = NULL;
|
||||
|
||||
// define the local map for v1_flex_volume_source->options
|
||||
list_t *optionsList = NULL;
|
||||
|
||||
// define the local variable for v1_flex_volume_source->secret_ref
|
||||
v1_local_object_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -155,9 +158,8 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu
|
||||
|
||||
// v1_flex_volume_source->options
|
||||
cJSON *options = cJSON_GetObjectItemCaseSensitive(v1_flex_volume_sourceJSON, "options");
|
||||
list_t *optionsList;
|
||||
if (options) {
|
||||
cJSON *options_local_map;
|
||||
cJSON *options_local_map = NULL;
|
||||
if(!cJSON_IsObject(options)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -201,6 +203,20 @@ v1_flex_volume_source_t *v1_flex_volume_source_parseFromJSON(cJSON *v1_flex_volu
|
||||
|
||||
return v1_flex_volume_source_local_var;
|
||||
end:
|
||||
if (optionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, optionsList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(optionsList);
|
||||
optionsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_local_object_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom
|
||||
|
||||
v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_horizontal_pod_autoscaler_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_horizontal_pod_autoscaler_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_horizontal_pod_autoscaler_list_t *v1_horizontal_pod_autoscaler_list_parseFrom
|
||||
|
||||
return v1_horizontal_pod_autoscaler_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_horizontal_pod_autoscaler_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -78,11 +78,13 @@ v1_host_alias_t *v1_host_alias_parseFromJSON(cJSON *v1_host_aliasJSON){
|
||||
|
||||
v1_host_alias_t *v1_host_alias_local_var = NULL;
|
||||
|
||||
// define the local list for v1_host_alias->hostnames
|
||||
list_t *hostnamesList = NULL;
|
||||
|
||||
// v1_host_alias->hostnames
|
||||
cJSON *hostnames = cJSON_GetObjectItemCaseSensitive(v1_host_aliasJSON, "hostnames");
|
||||
list_t *hostnamesList;
|
||||
if (hostnames) {
|
||||
cJSON *hostnames_local;
|
||||
cJSON *hostnames_local = NULL;
|
||||
if(!cJSON_IsArray(hostnames)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -115,6 +117,15 @@ v1_host_alias_t *v1_host_alias_parseFromJSON(cJSON *v1_host_aliasJSON){
|
||||
|
||||
return v1_host_alias_local_var;
|
||||
end:
|
||||
if (hostnamesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, hostnamesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(hostnamesList);
|
||||
hostnamesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -130,6 +130,9 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action
|
||||
|
||||
v1_http_get_action_t *v1_http_get_action_local_var = NULL;
|
||||
|
||||
// define the local list for v1_http_get_action->http_headers
|
||||
list_t *http_headersList = NULL;
|
||||
|
||||
// define the local variable for v1_http_get_action->port
|
||||
int_or_string_t *port_local_nonprim = NULL;
|
||||
|
||||
@@ -144,9 +147,8 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action
|
||||
|
||||
// v1_http_get_action->http_headers
|
||||
cJSON *http_headers = cJSON_GetObjectItemCaseSensitive(v1_http_get_actionJSON, "httpHeaders");
|
||||
list_t *http_headersList;
|
||||
if (http_headers) {
|
||||
cJSON *http_headers_local_nonprimitive;
|
||||
cJSON *http_headers_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(http_headers)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -202,6 +204,15 @@ v1_http_get_action_t *v1_http_get_action_parseFromJSON(cJSON *v1_http_get_action
|
||||
|
||||
return v1_http_get_action_local_var;
|
||||
end:
|
||||
if (http_headersList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, http_headersList) {
|
||||
v1_http_header_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(http_headersList);
|
||||
http_headersList = NULL;
|
||||
}
|
||||
if (port_local_nonprim) {
|
||||
int_or_string_free(port_local_nonprim);
|
||||
port_local_nonprim = NULL;
|
||||
|
||||
@@ -69,15 +69,17 @@ v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_parseFromJSON(cJSON *v1
|
||||
|
||||
v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_local_var = NULL;
|
||||
|
||||
// define the local list for v1_http_ingress_rule_value->paths
|
||||
list_t *pathsList = NULL;
|
||||
|
||||
// v1_http_ingress_rule_value->paths
|
||||
cJSON *paths = cJSON_GetObjectItemCaseSensitive(v1_http_ingress_rule_valueJSON, "paths");
|
||||
if (!paths) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *pathsList;
|
||||
|
||||
cJSON *paths_local_nonprimitive;
|
||||
cJSON *paths_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(paths)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -101,6 +103,15 @@ v1_http_ingress_rule_value_t *v1_http_ingress_rule_value_parseFromJSON(cJSON *v1
|
||||
|
||||
return v1_http_ingress_rule_value_local_var;
|
||||
end:
|
||||
if (pathsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, pathsList) {
|
||||
v1_http_ingress_path_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(pathsList);
|
||||
pathsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c
|
||||
|
||||
v1_ingress_class_list_t *v1_ingress_class_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ingress_class_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_ingress_class_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_ingress_class_list_t *v1_ingress_class_list_parseFromJSON(cJSON *v1_ingress_c
|
||||
|
||||
return v1_ingress_class_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_ingress_class_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){
|
||||
|
||||
v1_ingress_list_t *v1_ingress_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ingress_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_ingress_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_ingress_list_t *v1_ingress_list_parseFromJSON(cJSON *v1_ingress_listJSON){
|
||||
|
||||
return v1_ingress_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_ingress_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -132,6 +132,12 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){
|
||||
// define the local variable for v1_ingress_spec->default_backend
|
||||
v1_ingress_backend_t *default_backend_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_ingress_spec->rules
|
||||
list_t *rulesList = NULL;
|
||||
|
||||
// define the local list for v1_ingress_spec->tls
|
||||
list_t *tlsList = NULL;
|
||||
|
||||
// v1_ingress_spec->default_backend
|
||||
cJSON *default_backend = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "defaultBackend");
|
||||
if (default_backend) {
|
||||
@@ -149,9 +155,8 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){
|
||||
|
||||
// v1_ingress_spec->rules
|
||||
cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "rules");
|
||||
list_t *rulesList;
|
||||
if (rules) {
|
||||
cJSON *rules_local_nonprimitive;
|
||||
cJSON *rules_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(rules)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -171,9 +176,8 @@ v1_ingress_spec_t *v1_ingress_spec_parseFromJSON(cJSON *v1_ingress_specJSON){
|
||||
|
||||
// v1_ingress_spec->tls
|
||||
cJSON *tls = cJSON_GetObjectItemCaseSensitive(v1_ingress_specJSON, "tls");
|
||||
list_t *tlsList;
|
||||
if (tls) {
|
||||
cJSON *tls_local_nonprimitive;
|
||||
cJSON *tls_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(tls)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -205,6 +209,24 @@ end:
|
||||
v1_ingress_backend_free(default_backend_local_nonprim);
|
||||
default_backend_local_nonprim = NULL;
|
||||
}
|
||||
if (rulesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, rulesList) {
|
||||
v1_ingress_rule_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(rulesList);
|
||||
rulesList = NULL;
|
||||
}
|
||||
if (tlsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, tlsList) {
|
||||
v1_ingress_tls_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(tlsList);
|
||||
tlsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -78,11 +78,13 @@ v1_ingress_tls_t *v1_ingress_tls_parseFromJSON(cJSON *v1_ingress_tlsJSON){
|
||||
|
||||
v1_ingress_tls_t *v1_ingress_tls_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ingress_tls->hosts
|
||||
list_t *hostsList = NULL;
|
||||
|
||||
// v1_ingress_tls->hosts
|
||||
cJSON *hosts = cJSON_GetObjectItemCaseSensitive(v1_ingress_tlsJSON, "hosts");
|
||||
list_t *hostsList;
|
||||
if (hosts) {
|
||||
cJSON *hosts_local;
|
||||
cJSON *hosts_local = NULL;
|
||||
if(!cJSON_IsArray(hosts)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -115,6 +117,15 @@ v1_ingress_tls_t *v1_ingress_tls_parseFromJSON(cJSON *v1_ingress_tlsJSON){
|
||||
|
||||
return v1_ingress_tls_local_var;
|
||||
end:
|
||||
if (hostsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, hostsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(hostsList);
|
||||
hostsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -80,6 +80,9 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){
|
||||
|
||||
v1_ip_block_t *v1_ip_block_local_var = NULL;
|
||||
|
||||
// define the local list for v1_ip_block->except
|
||||
list_t *exceptList = NULL;
|
||||
|
||||
// v1_ip_block->cidr
|
||||
cJSON *cidr = cJSON_GetObjectItemCaseSensitive(v1_ip_blockJSON, "cidr");
|
||||
if (!cidr) {
|
||||
@@ -94,9 +97,8 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){
|
||||
|
||||
// v1_ip_block->except
|
||||
cJSON *except = cJSON_GetObjectItemCaseSensitive(v1_ip_blockJSON, "except");
|
||||
list_t *exceptList;
|
||||
if (except) {
|
||||
cJSON *except_local;
|
||||
cJSON *except_local = NULL;
|
||||
if(!cJSON_IsArray(except)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -120,6 +122,15 @@ v1_ip_block_t *v1_ip_block_parseFromJSON(cJSON *v1_ip_blockJSON){
|
||||
|
||||
return v1_ip_block_local_var;
|
||||
end:
|
||||
if (exceptList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, exceptList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(exceptList);
|
||||
exceptList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -199,6 +199,9 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom
|
||||
|
||||
v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_iscsi_persistent_volume_source->portals
|
||||
list_t *portalsList = NULL;
|
||||
|
||||
// define the local variable for v1_iscsi_persistent_volume_source->secret_ref
|
||||
v1_secret_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -273,9 +276,8 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom
|
||||
|
||||
// v1_iscsi_persistent_volume_source->portals
|
||||
cJSON *portals = cJSON_GetObjectItemCaseSensitive(v1_iscsi_persistent_volume_sourceJSON, "portals");
|
||||
list_t *portalsList;
|
||||
if (portals) {
|
||||
cJSON *portals_local;
|
||||
cJSON *portals_local = NULL;
|
||||
if(!cJSON_IsArray(portals)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -335,6 +337,15 @@ v1_iscsi_persistent_volume_source_t *v1_iscsi_persistent_volume_source_parseFrom
|
||||
|
||||
return v1_iscsi_persistent_volume_source_local_var;
|
||||
end:
|
||||
if (portalsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portalsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portalsList);
|
||||
portalsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_secret_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -199,6 +199,9 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v
|
||||
|
||||
v1_iscsi_volume_source_t *v1_iscsi_volume_source_local_var = NULL;
|
||||
|
||||
// define the local list for v1_iscsi_volume_source->portals
|
||||
list_t *portalsList = NULL;
|
||||
|
||||
// define the local variable for v1_iscsi_volume_source->secret_ref
|
||||
v1_local_object_reference_t *secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -273,9 +276,8 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v
|
||||
|
||||
// v1_iscsi_volume_source->portals
|
||||
cJSON *portals = cJSON_GetObjectItemCaseSensitive(v1_iscsi_volume_sourceJSON, "portals");
|
||||
list_t *portalsList;
|
||||
if (portals) {
|
||||
cJSON *portals_local;
|
||||
cJSON *portals_local = NULL;
|
||||
if(!cJSON_IsArray(portals)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -335,6 +337,15 @@ v1_iscsi_volume_source_t *v1_iscsi_volume_source_parseFromJSON(cJSON *v1_iscsi_v
|
||||
|
||||
return v1_iscsi_volume_source_local_var;
|
||||
end:
|
||||
if (portalsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portalsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portalsList);
|
||||
portalsList = NULL;
|
||||
}
|
||||
if (secret_ref_local_nonprim) {
|
||||
v1_local_object_reference_free(secret_ref_local_nonprim);
|
||||
secret_ref_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){
|
||||
|
||||
v1_job_list_t *v1_job_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_job_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_job_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_job_list_t *v1_job_list_parseFromJSON(cJSON *v1_job_listJSON){
|
||||
|
||||
return v1_job_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_job_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -158,6 +158,9 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){
|
||||
|
||||
v1_job_status_t *v1_job_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_job_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// define the local variable for v1_job_status->uncounted_terminated_pods
|
||||
v1_uncounted_terminated_pods_t *uncounted_terminated_pods_local_nonprim = NULL;
|
||||
|
||||
@@ -190,9 +193,8 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){
|
||||
|
||||
// v1_job_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_job_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -257,6 +259,15 @@ v1_job_status_t *v1_job_status_parseFromJSON(cJSON *v1_job_statusJSON){
|
||||
|
||||
return v1_job_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_job_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
if (uncounted_terminated_pods_local_nonprim) {
|
||||
v1_uncounted_terminated_pods_free(uncounted_terminated_pods_local_nonprim);
|
||||
uncounted_terminated_pods_local_nonprim = NULL;
|
||||
|
||||
@@ -751,12 +751,42 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
v1_json_schema_props_t *v1_json_schema_props_local_var = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->all_of
|
||||
list_t *all_ofList = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->any_of
|
||||
list_t *any_ofList = NULL;
|
||||
|
||||
// define the local map for v1_json_schema_props->definitions
|
||||
list_t *definitionsList = NULL;
|
||||
|
||||
// define the local map for v1_json_schema_props->dependencies
|
||||
list_t *dependenciesList = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->_enum
|
||||
list_t *_enumList = NULL;
|
||||
|
||||
// define the local variable for v1_json_schema_props->external_docs
|
||||
v1_external_documentation_t *external_docs_local_nonprim = NULL;
|
||||
|
||||
// define the local variable for v1_json_schema_props->_not
|
||||
v1_json_schema_props_t *_not_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->one_of
|
||||
list_t *one_ofList = NULL;
|
||||
|
||||
// define the local map for v1_json_schema_props->pattern_properties
|
||||
list_t *pattern_propertiesList = NULL;
|
||||
|
||||
// define the local map for v1_json_schema_props->properties
|
||||
list_t *propertiesList = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->required
|
||||
list_t *requiredList = NULL;
|
||||
|
||||
// define the local list for v1_json_schema_props->x_kubernetes_list_map_keys
|
||||
list_t *x_kubernetes_list_map_keysList = NULL;
|
||||
|
||||
// v1_json_schema_props->ref
|
||||
cJSON *ref = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "$ref");
|
||||
if (ref) {
|
||||
@@ -791,9 +821,8 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->all_of
|
||||
cJSON *all_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "allOf");
|
||||
list_t *all_ofList;
|
||||
if (all_of) {
|
||||
cJSON *all_of_local_nonprimitive;
|
||||
cJSON *all_of_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(all_of)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -813,9 +842,8 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->any_of
|
||||
cJSON *any_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "anyOf");
|
||||
list_t *any_ofList;
|
||||
if (any_of) {
|
||||
cJSON *any_of_local_nonprimitive;
|
||||
cJSON *any_of_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(any_of)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -842,26 +870,16 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->definitions
|
||||
cJSON *definitions = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "definitions");
|
||||
list_t *definitionsList;
|
||||
if (definitions) {
|
||||
cJSON *definitions_local_map;
|
||||
if(!cJSON_IsObject(definitions)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
definitionsList = list_createList();
|
||||
keyValuePair_t *localMapKeyPair;
|
||||
cJSON_ArrayForEach(definitions_local_map, definitions)
|
||||
{
|
||||
cJSON *localMapObject = definitions_local_map;
|
||||
list_addElement(definitionsList , localMapKeyPair);
|
||||
}
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->definitions is currently not supported.
|
||||
|
||||
}
|
||||
|
||||
// v1_json_schema_props->dependencies
|
||||
cJSON *dependencies = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "dependencies");
|
||||
list_t *dependenciesList;
|
||||
if (dependencies) {
|
||||
cJSON *dependencies_local_map;
|
||||
cJSON *dependencies_local_map = NULL;
|
||||
if(!cJSON_IsObject(dependencies)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -885,9 +903,8 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->_enum
|
||||
cJSON *_enum = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "enum");
|
||||
list_t *_enumList;
|
||||
if (_enum) {
|
||||
cJSON *_enum_local_nonprimitive;
|
||||
cJSON *_enum_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(_enum)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -1059,9 +1076,8 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->one_of
|
||||
cJSON *one_of = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "oneOf");
|
||||
list_t *one_ofList;
|
||||
if (one_of) {
|
||||
cJSON *one_of_local_nonprimitive;
|
||||
cJSON *one_of_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(one_of)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -1090,43 +1106,24 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->pattern_properties
|
||||
cJSON *pattern_properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "patternProperties");
|
||||
list_t *pattern_propertiesList;
|
||||
if (pattern_properties) {
|
||||
cJSON *pattern_properties_local_map;
|
||||
if(!cJSON_IsObject(pattern_properties)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
pattern_propertiesList = list_createList();
|
||||
keyValuePair_t *localMapKeyPair;
|
||||
cJSON_ArrayForEach(pattern_properties_local_map, pattern_properties)
|
||||
{
|
||||
cJSON *localMapObject = pattern_properties_local_map;
|
||||
list_addElement(pattern_propertiesList , localMapKeyPair);
|
||||
}
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->pattern_properties is currently not supported.
|
||||
|
||||
}
|
||||
|
||||
// v1_json_schema_props->properties
|
||||
cJSON *properties = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "properties");
|
||||
list_t *propertiesList;
|
||||
if (properties) {
|
||||
cJSON *properties_local_map;
|
||||
if(!cJSON_IsObject(properties)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
propertiesList = list_createList();
|
||||
keyValuePair_t *localMapKeyPair;
|
||||
cJSON_ArrayForEach(properties_local_map, properties)
|
||||
{
|
||||
cJSON *localMapObject = properties_local_map;
|
||||
list_addElement(propertiesList , localMapKeyPair);
|
||||
}
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->properties is currently not supported.
|
||||
|
||||
}
|
||||
|
||||
// v1_json_schema_props->required
|
||||
cJSON *required = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "required");
|
||||
list_t *requiredList;
|
||||
if (required) {
|
||||
cJSON *required_local;
|
||||
cJSON *required_local = NULL;
|
||||
if(!cJSON_IsArray(required)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -1189,9 +1186,8 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
// v1_json_schema_props->x_kubernetes_list_map_keys
|
||||
cJSON *x_kubernetes_list_map_keys = cJSON_GetObjectItemCaseSensitive(v1_json_schema_propsJSON, "x-kubernetes-list-map-keys");
|
||||
list_t *x_kubernetes_list_map_keysList;
|
||||
if (x_kubernetes_list_map_keys) {
|
||||
cJSON *x_kubernetes_list_map_keys_local;
|
||||
cJSON *x_kubernetes_list_map_keys_local = NULL;
|
||||
if(!cJSON_IsArray(x_kubernetes_list_map_keys)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -1283,6 +1279,48 @@ v1_json_schema_props_t *v1_json_schema_props_parseFromJSON(cJSON *v1_json_schema
|
||||
|
||||
return v1_json_schema_props_local_var;
|
||||
end:
|
||||
if (all_ofList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, all_ofList) {
|
||||
v1_json_schema_props_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(all_ofList);
|
||||
all_ofList = NULL;
|
||||
}
|
||||
if (any_ofList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, any_ofList) {
|
||||
v1_json_schema_props_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(any_ofList);
|
||||
any_ofList = NULL;
|
||||
}
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->definitions is currently not supported.
|
||||
|
||||
if (dependenciesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, dependenciesList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(dependenciesList);
|
||||
dependenciesList = NULL;
|
||||
}
|
||||
if (_enumList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, _enumList) {
|
||||
object_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(_enumList);
|
||||
_enumList = NULL;
|
||||
}
|
||||
if (external_docs_local_nonprim) {
|
||||
v1_external_documentation_free(external_docs_local_nonprim);
|
||||
external_docs_local_nonprim = NULL;
|
||||
@@ -1291,6 +1329,39 @@ end:
|
||||
v1_json_schema_props_free(_not_local_nonprim);
|
||||
_not_local_nonprim = NULL;
|
||||
}
|
||||
if (one_ofList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, one_ofList) {
|
||||
v1_json_schema_props_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(one_ofList);
|
||||
one_ofList = NULL;
|
||||
}
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->pattern_properties is currently not supported.
|
||||
|
||||
|
||||
// The data type of the elements in v1_json_schema_props->properties is currently not supported.
|
||||
|
||||
if (requiredList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, requiredList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(requiredList);
|
||||
requiredList = NULL;
|
||||
}
|
||||
if (x_kubernetes_list_map_keysList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, x_kubernetes_list_map_keysList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(x_kubernetes_list_map_keysList);
|
||||
x_kubernetes_list_map_keysList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -99,11 +99,16 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO
|
||||
|
||||
v1_label_selector_t *v1_label_selector_local_var = NULL;
|
||||
|
||||
// define the local list for v1_label_selector->match_expressions
|
||||
list_t *match_expressionsList = NULL;
|
||||
|
||||
// define the local map for v1_label_selector->match_labels
|
||||
list_t *match_labelsList = NULL;
|
||||
|
||||
// v1_label_selector->match_expressions
|
||||
cJSON *match_expressions = cJSON_GetObjectItemCaseSensitive(v1_label_selectorJSON, "matchExpressions");
|
||||
list_t *match_expressionsList;
|
||||
if (match_expressions) {
|
||||
cJSON *match_expressions_local_nonprimitive;
|
||||
cJSON *match_expressions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(match_expressions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -123,9 +128,8 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO
|
||||
|
||||
// v1_label_selector->match_labels
|
||||
cJSON *match_labels = cJSON_GetObjectItemCaseSensitive(v1_label_selectorJSON, "matchLabels");
|
||||
list_t *match_labelsList;
|
||||
if (match_labels) {
|
||||
cJSON *match_labels_local_map;
|
||||
cJSON *match_labels_local_map = NULL;
|
||||
if(!cJSON_IsObject(match_labels)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -151,6 +155,29 @@ v1_label_selector_t *v1_label_selector_parseFromJSON(cJSON *v1_label_selectorJSO
|
||||
|
||||
return v1_label_selector_local_var;
|
||||
end:
|
||||
if (match_expressionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, match_expressionsList) {
|
||||
v1_label_selector_requirement_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(match_expressionsList);
|
||||
match_expressionsList = NULL;
|
||||
}
|
||||
if (match_labelsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, match_labelsList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(match_labelsList);
|
||||
match_labelsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS
|
||||
|
||||
v1_label_selector_requirement_t *v1_label_selector_requirement_local_var = NULL;
|
||||
|
||||
// define the local list for v1_label_selector_requirement->values
|
||||
list_t *valuesList = NULL;
|
||||
|
||||
// v1_label_selector_requirement->key
|
||||
cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_label_selector_requirementJSON, "key");
|
||||
if (!key) {
|
||||
@@ -122,9 +125,8 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS
|
||||
|
||||
// v1_label_selector_requirement->values
|
||||
cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_label_selector_requirementJSON, "values");
|
||||
list_t *valuesList;
|
||||
if (values) {
|
||||
cJSON *values_local;
|
||||
cJSON *values_local = NULL;
|
||||
if(!cJSON_IsArray(values)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -149,6 +151,15 @@ v1_label_selector_requirement_t *v1_label_selector_requirement_parseFromJSON(cJS
|
||||
|
||||
return v1_label_selector_requirement_local_var;
|
||||
end:
|
||||
if (valuesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, valuesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(valuesList);
|
||||
valuesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){
|
||||
|
||||
v1_lease_list_t *v1_lease_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_lease_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_lease_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_lease_list_t *v1_lease_list_parseFromJSON(cJSON *v1_lease_listJSON){
|
||||
|
||||
return v1_lease_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_lease_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -214,11 +214,25 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
v1_limit_range_item_t *v1_limit_range_item_local_var = NULL;
|
||||
|
||||
// define the local map for v1_limit_range_item->_default
|
||||
list_t *_defaultList = NULL;
|
||||
|
||||
// define the local map for v1_limit_range_item->default_request
|
||||
list_t *default_requestList = NULL;
|
||||
|
||||
// define the local map for v1_limit_range_item->max
|
||||
list_t *maxList = NULL;
|
||||
|
||||
// define the local map for v1_limit_range_item->max_limit_request_ratio
|
||||
list_t *max_limit_request_ratioList = NULL;
|
||||
|
||||
// define the local map for v1_limit_range_item->min
|
||||
list_t *minList = NULL;
|
||||
|
||||
// v1_limit_range_item->_default
|
||||
cJSON *_default = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "default");
|
||||
list_t *_defaultList;
|
||||
if (_default) {
|
||||
cJSON *_default_local_map;
|
||||
cJSON *_default_local_map = NULL;
|
||||
if(!cJSON_IsObject(_default)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -238,9 +252,8 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
// v1_limit_range_item->default_request
|
||||
cJSON *default_request = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "defaultRequest");
|
||||
list_t *default_requestList;
|
||||
if (default_request) {
|
||||
cJSON *default_request_local_map;
|
||||
cJSON *default_request_local_map = NULL;
|
||||
if(!cJSON_IsObject(default_request)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -260,9 +273,8 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
// v1_limit_range_item->max
|
||||
cJSON *max = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "max");
|
||||
list_t *maxList;
|
||||
if (max) {
|
||||
cJSON *max_local_map;
|
||||
cJSON *max_local_map = NULL;
|
||||
if(!cJSON_IsObject(max)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -282,9 +294,8 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
// v1_limit_range_item->max_limit_request_ratio
|
||||
cJSON *max_limit_request_ratio = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "maxLimitRequestRatio");
|
||||
list_t *max_limit_request_ratioList;
|
||||
if (max_limit_request_ratio) {
|
||||
cJSON *max_limit_request_ratio_local_map;
|
||||
cJSON *max_limit_request_ratio_local_map = NULL;
|
||||
if(!cJSON_IsObject(max_limit_request_ratio)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -304,9 +315,8 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
// v1_limit_range_item->min
|
||||
cJSON *min = cJSON_GetObjectItemCaseSensitive(v1_limit_range_itemJSON, "min");
|
||||
list_t *minList;
|
||||
if (min) {
|
||||
cJSON *min_local_map;
|
||||
cJSON *min_local_map = NULL;
|
||||
if(!cJSON_IsObject(min)) {
|
||||
goto end;//primitive map container
|
||||
}
|
||||
@@ -348,6 +358,76 @@ v1_limit_range_item_t *v1_limit_range_item_parseFromJSON(cJSON *v1_limit_range_i
|
||||
|
||||
return v1_limit_range_item_local_var;
|
||||
end:
|
||||
if (_defaultList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, _defaultList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(_defaultList);
|
||||
_defaultList = NULL;
|
||||
}
|
||||
if (default_requestList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, default_requestList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(default_requestList);
|
||||
default_requestList = NULL;
|
||||
}
|
||||
if (maxList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, maxList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(maxList);
|
||||
maxList = NULL;
|
||||
}
|
||||
if (max_limit_request_ratioList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, max_limit_request_ratioList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(max_limit_request_ratioList);
|
||||
max_limit_request_ratioList = NULL;
|
||||
}
|
||||
if (minList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, minList) {
|
||||
keyValuePair_t *localKeyValue = (keyValuePair_t*) listEntry->data;
|
||||
free(localKeyValue->key);
|
||||
localKeyValue->key = NULL;
|
||||
free(localKeyValue->value);
|
||||
localKeyValue->value = NULL;
|
||||
keyValuePair_free(localKeyValue);
|
||||
localKeyValue = NULL;
|
||||
}
|
||||
list_freeList(minList);
|
||||
minList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l
|
||||
|
||||
v1_limit_range_list_t *v1_limit_range_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_limit_range_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_limit_range_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_limit_range_list_t *v1_limit_range_list_parseFromJSON(cJSON *v1_limit_range_l
|
||||
|
||||
return v1_limit_range_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_limit_range_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -69,15 +69,17 @@ v1_limit_range_spec_t *v1_limit_range_spec_parseFromJSON(cJSON *v1_limit_range_s
|
||||
|
||||
v1_limit_range_spec_t *v1_limit_range_spec_local_var = NULL;
|
||||
|
||||
// define the local list for v1_limit_range_spec->limits
|
||||
list_t *limitsList = NULL;
|
||||
|
||||
// v1_limit_range_spec->limits
|
||||
cJSON *limits = cJSON_GetObjectItemCaseSensitive(v1_limit_range_specJSON, "limits");
|
||||
if (!limits) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *limitsList;
|
||||
|
||||
cJSON *limits_local_nonprimitive;
|
||||
cJSON *limits_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(limits)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -101,6 +103,15 @@ v1_limit_range_spec_t *v1_limit_range_spec_parseFromJSON(cJSON *v1_limit_range_s
|
||||
|
||||
return v1_limit_range_spec_local_var;
|
||||
end:
|
||||
if (limitsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, limitsList) {
|
||||
v1_limit_range_item_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(limitsList);
|
||||
limitsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -95,6 +95,9 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa
|
||||
|
||||
v1_load_balancer_ingress_t *v1_load_balancer_ingress_local_var = NULL;
|
||||
|
||||
// define the local list for v1_load_balancer_ingress->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// v1_load_balancer_ingress->hostname
|
||||
cJSON *hostname = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "hostname");
|
||||
if (hostname) {
|
||||
@@ -115,9 +118,8 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa
|
||||
|
||||
// v1_load_balancer_ingress->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_ingressJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -144,6 +146,15 @@ v1_load_balancer_ingress_t *v1_load_balancer_ingress_parseFromJSON(cJSON *v1_loa
|
||||
|
||||
return v1_load_balancer_ingress_local_var;
|
||||
end:
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
v1_port_status_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,11 +67,13 @@ v1_load_balancer_status_t *v1_load_balancer_status_parseFromJSON(cJSON *v1_load_
|
||||
|
||||
v1_load_balancer_status_t *v1_load_balancer_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_load_balancer_status->ingress
|
||||
list_t *ingressList = NULL;
|
||||
|
||||
// v1_load_balancer_status->ingress
|
||||
cJSON *ingress = cJSON_GetObjectItemCaseSensitive(v1_load_balancer_statusJSON, "ingress");
|
||||
list_t *ingressList;
|
||||
if (ingress) {
|
||||
cJSON *ingress_local_nonprimitive;
|
||||
cJSON *ingress_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ingress)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -96,6 +98,15 @@ v1_load_balancer_status_t *v1_load_balancer_status_parseFromJSON(cJSON *v1_load_
|
||||
|
||||
return v1_load_balancer_status_local_var;
|
||||
end:
|
||||
if (ingressList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, ingressList) {
|
||||
v1_load_balancer_ingress_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(ingressList);
|
||||
ingressList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -238,6 +238,9 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh
|
||||
|
||||
v1_mutating_webhook_t *v1_mutating_webhook_local_var = NULL;
|
||||
|
||||
// define the local list for v1_mutating_webhook->admission_review_versions
|
||||
list_t *admission_review_versionsList = NULL;
|
||||
|
||||
// define the local variable for v1_mutating_webhook->client_config
|
||||
admissionregistration_v1_webhook_client_config_t *client_config_local_nonprim = NULL;
|
||||
|
||||
@@ -247,15 +250,17 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh
|
||||
// define the local variable for v1_mutating_webhook->object_selector
|
||||
v1_label_selector_t *object_selector_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_mutating_webhook->rules
|
||||
list_t *rulesList = NULL;
|
||||
|
||||
// v1_mutating_webhook->admission_review_versions
|
||||
cJSON *admission_review_versions = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "admissionReviewVersions");
|
||||
if (!admission_review_versions) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *admission_review_versionsList;
|
||||
|
||||
cJSON *admission_review_versions_local;
|
||||
cJSON *admission_review_versions_local = NULL;
|
||||
if(!cJSON_IsArray(admission_review_versions)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -332,9 +337,8 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh
|
||||
|
||||
// v1_mutating_webhook->rules
|
||||
cJSON *rules = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhookJSON, "rules");
|
||||
list_t *rulesList;
|
||||
if (rules) {
|
||||
cJSON *rules_local_nonprimitive;
|
||||
cJSON *rules_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(rules)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -390,6 +394,15 @@ v1_mutating_webhook_t *v1_mutating_webhook_parseFromJSON(cJSON *v1_mutating_webh
|
||||
|
||||
return v1_mutating_webhook_local_var;
|
||||
end:
|
||||
if (admission_review_versionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, admission_review_versionsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(admission_review_versionsList);
|
||||
admission_review_versionsList = NULL;
|
||||
}
|
||||
if (client_config_local_nonprim) {
|
||||
admissionregistration_v1_webhook_client_config_free(client_config_local_nonprim);
|
||||
client_config_local_nonprim = NULL;
|
||||
@@ -402,6 +415,15 @@ end:
|
||||
v1_label_selector_free(object_selector_local_nonprim);
|
||||
object_selector_local_nonprim = NULL;
|
||||
}
|
||||
if (rulesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, rulesList) {
|
||||
v1_rule_with_operations_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(rulesList);
|
||||
rulesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -117,6 +117,9 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom
|
||||
// define the local variable for v1_mutating_webhook_configuration->metadata
|
||||
v1_object_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_mutating_webhook_configuration->webhooks
|
||||
list_t *webhooksList = NULL;
|
||||
|
||||
// v1_mutating_webhook_configuration->api_version
|
||||
cJSON *api_version = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "apiVersion");
|
||||
if (api_version) {
|
||||
@@ -143,9 +146,8 @@ v1_mutating_webhook_configuration_t *v1_mutating_webhook_configuration_parseFrom
|
||||
|
||||
// v1_mutating_webhook_configuration->webhooks
|
||||
cJSON *webhooks = cJSON_GetObjectItemCaseSensitive(v1_mutating_webhook_configurationJSON, "webhooks");
|
||||
list_t *webhooksList;
|
||||
if (webhooks) {
|
||||
cJSON *webhooks_local_nonprimitive;
|
||||
cJSON *webhooks_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(webhooks)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -177,6 +179,15 @@ end:
|
||||
v1_object_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
}
|
||||
if (webhooksList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, webhooksList) {
|
||||
v1_mutating_webhook_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(webhooksList);
|
||||
webhooksList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list
|
||||
|
||||
v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_mutating_webhook_configuration_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_mutating_webhook_configuration_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_mutating_webhook_configuration_list_t *v1_mutating_webhook_configuration_list
|
||||
|
||||
return v1_mutating_webhook_configuration_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_mutating_webhook_configuration_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO
|
||||
|
||||
v1_namespace_list_t *v1_namespace_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_namespace_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_namespace_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_namespace_list_t *v1_namespace_list_parseFromJSON(cJSON *v1_namespace_listJSO
|
||||
|
||||
return v1_namespace_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_namespace_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -64,11 +64,13 @@ v1_namespace_spec_t *v1_namespace_spec_parseFromJSON(cJSON *v1_namespace_specJSO
|
||||
|
||||
v1_namespace_spec_t *v1_namespace_spec_local_var = NULL;
|
||||
|
||||
// define the local list for v1_namespace_spec->finalizers
|
||||
list_t *finalizersList = NULL;
|
||||
|
||||
// v1_namespace_spec->finalizers
|
||||
cJSON *finalizers = cJSON_GetObjectItemCaseSensitive(v1_namespace_specJSON, "finalizers");
|
||||
list_t *finalizersList;
|
||||
if (finalizers) {
|
||||
cJSON *finalizers_local;
|
||||
cJSON *finalizers_local = NULL;
|
||||
if(!cJSON_IsArray(finalizers)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -91,6 +93,15 @@ v1_namespace_spec_t *v1_namespace_spec_parseFromJSON(cJSON *v1_namespace_specJSO
|
||||
|
||||
return v1_namespace_spec_local_var;
|
||||
end:
|
||||
if (finalizersList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, finalizersList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(finalizersList);
|
||||
finalizersList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,11 +81,13 @@ v1_namespace_status_t *v1_namespace_status_parseFromJSON(cJSON *v1_namespace_sta
|
||||
|
||||
v1_namespace_status_t *v1_namespace_status_local_var = NULL;
|
||||
|
||||
// define the local list for v1_namespace_status->conditions
|
||||
list_t *conditionsList = NULL;
|
||||
|
||||
// v1_namespace_status->conditions
|
||||
cJSON *conditions = cJSON_GetObjectItemCaseSensitive(v1_namespace_statusJSON, "conditions");
|
||||
list_t *conditionsList;
|
||||
if (conditions) {
|
||||
cJSON *conditions_local_nonprimitive;
|
||||
cJSON *conditions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(conditions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -120,6 +122,15 @@ v1_namespace_status_t *v1_namespace_status_parseFromJSON(cJSON *v1_namespace_sta
|
||||
|
||||
return v1_namespace_status_local_var;
|
||||
end:
|
||||
if (conditionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, conditionsList) {
|
||||
v1_namespace_condition_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(conditionsList);
|
||||
conditionsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,11 +96,16 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS
|
||||
|
||||
v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_local_var = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_egress_rule->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_egress_rule->to
|
||||
list_t *toList = NULL;
|
||||
|
||||
// v1_network_policy_egress_rule->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_network_policy_egress_ruleJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -120,9 +125,8 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS
|
||||
|
||||
// v1_network_policy_egress_rule->to
|
||||
cJSON *to = cJSON_GetObjectItemCaseSensitive(v1_network_policy_egress_ruleJSON, "to");
|
||||
list_t *toList;
|
||||
if (to) {
|
||||
cJSON *to_local_nonprimitive;
|
||||
cJSON *to_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(to)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -148,6 +152,24 @@ v1_network_policy_egress_rule_t *v1_network_policy_egress_rule_parseFromJSON(cJS
|
||||
|
||||
return v1_network_policy_egress_rule_local_var;
|
||||
end:
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
v1_network_policy_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
if (toList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, toList) {
|
||||
v1_network_policy_peer_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(toList);
|
||||
toList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,11 +96,16 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c
|
||||
|
||||
v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_local_var = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_ingress_rule->from
|
||||
list_t *fromList = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_ingress_rule->ports
|
||||
list_t *portsList = NULL;
|
||||
|
||||
// v1_network_policy_ingress_rule->from
|
||||
cJSON *from = cJSON_GetObjectItemCaseSensitive(v1_network_policy_ingress_ruleJSON, "from");
|
||||
list_t *fromList;
|
||||
if (from) {
|
||||
cJSON *from_local_nonprimitive;
|
||||
cJSON *from_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(from)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -120,9 +125,8 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c
|
||||
|
||||
// v1_network_policy_ingress_rule->ports
|
||||
cJSON *ports = cJSON_GetObjectItemCaseSensitive(v1_network_policy_ingress_ruleJSON, "ports");
|
||||
list_t *portsList;
|
||||
if (ports) {
|
||||
cJSON *ports_local_nonprimitive;
|
||||
cJSON *ports_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ports)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -148,6 +152,24 @@ v1_network_policy_ingress_rule_t *v1_network_policy_ingress_rule_parseFromJSON(c
|
||||
|
||||
return v1_network_policy_ingress_rule_local_var;
|
||||
end:
|
||||
if (fromList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, fromList) {
|
||||
v1_network_policy_peer_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(fromList);
|
||||
fromList = NULL;
|
||||
}
|
||||
if (portsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, portsList) {
|
||||
v1_network_policy_port_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(portsList);
|
||||
portsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network
|
||||
|
||||
v1_network_policy_list_t *v1_network_policy_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_network_policy_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_network_policy_list_t *v1_network_policy_list_parseFromJSON(cJSON *v1_network
|
||||
|
||||
return v1_network_policy_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_network_policy_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -143,14 +143,22 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network
|
||||
|
||||
v1_network_policy_spec_t *v1_network_policy_spec_local_var = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_spec->egress
|
||||
list_t *egressList = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_spec->ingress
|
||||
list_t *ingressList = NULL;
|
||||
|
||||
// define the local variable for v1_network_policy_spec->pod_selector
|
||||
v1_label_selector_t *pod_selector_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_network_policy_spec->policy_types
|
||||
list_t *policy_typesList = NULL;
|
||||
|
||||
// v1_network_policy_spec->egress
|
||||
cJSON *egress = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "egress");
|
||||
list_t *egressList;
|
||||
if (egress) {
|
||||
cJSON *egress_local_nonprimitive;
|
||||
cJSON *egress_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(egress)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -170,9 +178,8 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network
|
||||
|
||||
// v1_network_policy_spec->ingress
|
||||
cJSON *ingress = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "ingress");
|
||||
list_t *ingressList;
|
||||
if (ingress) {
|
||||
cJSON *ingress_local_nonprimitive;
|
||||
cJSON *ingress_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(ingress)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -201,9 +208,8 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network
|
||||
|
||||
// v1_network_policy_spec->policy_types
|
||||
cJSON *policy_types = cJSON_GetObjectItemCaseSensitive(v1_network_policy_specJSON, "policyTypes");
|
||||
list_t *policy_typesList;
|
||||
if (policy_types) {
|
||||
cJSON *policy_types_local;
|
||||
cJSON *policy_types_local = NULL;
|
||||
if(!cJSON_IsArray(policy_types)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -229,10 +235,37 @@ v1_network_policy_spec_t *v1_network_policy_spec_parseFromJSON(cJSON *v1_network
|
||||
|
||||
return v1_network_policy_spec_local_var;
|
||||
end:
|
||||
if (egressList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, egressList) {
|
||||
v1_network_policy_egress_rule_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(egressList);
|
||||
egressList = NULL;
|
||||
}
|
||||
if (ingressList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, ingressList) {
|
||||
v1_network_policy_ingress_rule_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(ingressList);
|
||||
ingressList = NULL;
|
||||
}
|
||||
if (pod_selector_local_nonprim) {
|
||||
v1_label_selector_free(pod_selector_local_nonprim);
|
||||
pod_selector_local_nonprim = NULL;
|
||||
}
|
||||
if (policy_typesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, policy_typesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(policy_typesList);
|
||||
policy_typesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -86,14 +86,16 @@ v1_node_affinity_t *v1_node_affinity_parseFromJSON(cJSON *v1_node_affinityJSON){
|
||||
|
||||
v1_node_affinity_t *v1_node_affinity_local_var = NULL;
|
||||
|
||||
// define the local list for v1_node_affinity->preferred_during_scheduling_ignored_during_execution
|
||||
list_t *preferred_during_scheduling_ignored_during_executionList = NULL;
|
||||
|
||||
// define the local variable for v1_node_affinity->required_during_scheduling_ignored_during_execution
|
||||
v1_node_selector_t *required_during_scheduling_ignored_during_execution_local_nonprim = NULL;
|
||||
|
||||
// v1_node_affinity->preferred_during_scheduling_ignored_during_execution
|
||||
cJSON *preferred_during_scheduling_ignored_during_execution = cJSON_GetObjectItemCaseSensitive(v1_node_affinityJSON, "preferredDuringSchedulingIgnoredDuringExecution");
|
||||
list_t *preferred_during_scheduling_ignored_during_executionList;
|
||||
if (preferred_during_scheduling_ignored_during_execution) {
|
||||
cJSON *preferred_during_scheduling_ignored_during_execution_local_nonprimitive;
|
||||
cJSON *preferred_during_scheduling_ignored_during_execution_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(preferred_during_scheduling_ignored_during_execution)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -125,6 +127,15 @@ v1_node_affinity_t *v1_node_affinity_parseFromJSON(cJSON *v1_node_affinityJSON){
|
||||
|
||||
return v1_node_affinity_local_var;
|
||||
end:
|
||||
if (preferred_during_scheduling_ignored_during_executionList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, preferred_during_scheduling_ignored_during_executionList) {
|
||||
v1_preferred_scheduling_term_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(preferred_during_scheduling_ignored_during_executionList);
|
||||
preferred_during_scheduling_ignored_during_executionList = NULL;
|
||||
}
|
||||
if (required_during_scheduling_ignored_during_execution_local_nonprim) {
|
||||
v1_node_selector_free(required_during_scheduling_ignored_during_execution_local_nonprim);
|
||||
required_during_scheduling_ignored_during_execution_local_nonprim = NULL;
|
||||
|
||||
@@ -116,6 +116,9 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){
|
||||
|
||||
v1_node_list_t *v1_node_list_local_var = NULL;
|
||||
|
||||
// define the local list for v1_node_list->items
|
||||
list_t *itemsList = NULL;
|
||||
|
||||
// define the local variable for v1_node_list->metadata
|
||||
v1_list_meta_t *metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -134,9 +137,8 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *itemsList;
|
||||
|
||||
cJSON *items_local_nonprimitive;
|
||||
cJSON *items_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(items)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -178,6 +180,15 @@ v1_node_list_t *v1_node_list_parseFromJSON(cJSON *v1_node_listJSON){
|
||||
|
||||
return v1_node_list_local_var;
|
||||
end:
|
||||
if (itemsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, itemsList) {
|
||||
v1_node_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(itemsList);
|
||||
itemsList = NULL;
|
||||
}
|
||||
if (metadata_local_nonprim) {
|
||||
v1_list_meta_free(metadata_local_nonprim);
|
||||
metadata_local_nonprim = NULL;
|
||||
|
||||
@@ -69,15 +69,17 @@ v1_node_selector_t *v1_node_selector_parseFromJSON(cJSON *v1_node_selectorJSON){
|
||||
|
||||
v1_node_selector_t *v1_node_selector_local_var = NULL;
|
||||
|
||||
// define the local list for v1_node_selector->node_selector_terms
|
||||
list_t *node_selector_termsList = NULL;
|
||||
|
||||
// v1_node_selector->node_selector_terms
|
||||
cJSON *node_selector_terms = cJSON_GetObjectItemCaseSensitive(v1_node_selectorJSON, "nodeSelectorTerms");
|
||||
if (!node_selector_terms) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
list_t *node_selector_termsList;
|
||||
|
||||
cJSON *node_selector_terms_local_nonprimitive;
|
||||
cJSON *node_selector_terms_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(node_selector_terms)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -101,6 +103,15 @@ v1_node_selector_t *v1_node_selector_parseFromJSON(cJSON *v1_node_selectorJSON){
|
||||
|
||||
return v1_node_selector_local_var;
|
||||
end:
|
||||
if (node_selector_termsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, node_selector_termsList) {
|
||||
v1_node_selector_term_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(node_selector_termsList);
|
||||
node_selector_termsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON
|
||||
|
||||
v1_node_selector_requirement_t *v1_node_selector_requirement_local_var = NULL;
|
||||
|
||||
// define the local list for v1_node_selector_requirement->values
|
||||
list_t *valuesList = NULL;
|
||||
|
||||
// v1_node_selector_requirement->key
|
||||
cJSON *key = cJSON_GetObjectItemCaseSensitive(v1_node_selector_requirementJSON, "key");
|
||||
if (!key) {
|
||||
@@ -122,9 +125,8 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON
|
||||
|
||||
// v1_node_selector_requirement->values
|
||||
cJSON *values = cJSON_GetObjectItemCaseSensitive(v1_node_selector_requirementJSON, "values");
|
||||
list_t *valuesList;
|
||||
if (values) {
|
||||
cJSON *values_local;
|
||||
cJSON *values_local = NULL;
|
||||
if(!cJSON_IsArray(values)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -149,6 +151,15 @@ v1_node_selector_requirement_t *v1_node_selector_requirement_parseFromJSON(cJSON
|
||||
|
||||
return v1_node_selector_requirement_local_var;
|
||||
end:
|
||||
if (valuesList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, valuesList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(valuesList);
|
||||
valuesList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -96,11 +96,16 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele
|
||||
|
||||
v1_node_selector_term_t *v1_node_selector_term_local_var = NULL;
|
||||
|
||||
// define the local list for v1_node_selector_term->match_expressions
|
||||
list_t *match_expressionsList = NULL;
|
||||
|
||||
// define the local list for v1_node_selector_term->match_fields
|
||||
list_t *match_fieldsList = NULL;
|
||||
|
||||
// v1_node_selector_term->match_expressions
|
||||
cJSON *match_expressions = cJSON_GetObjectItemCaseSensitive(v1_node_selector_termJSON, "matchExpressions");
|
||||
list_t *match_expressionsList;
|
||||
if (match_expressions) {
|
||||
cJSON *match_expressions_local_nonprimitive;
|
||||
cJSON *match_expressions_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(match_expressions)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -120,9 +125,8 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele
|
||||
|
||||
// v1_node_selector_term->match_fields
|
||||
cJSON *match_fields = cJSON_GetObjectItemCaseSensitive(v1_node_selector_termJSON, "matchFields");
|
||||
list_t *match_fieldsList;
|
||||
if (match_fields) {
|
||||
cJSON *match_fields_local_nonprimitive;
|
||||
cJSON *match_fields_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(match_fields)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -148,6 +152,24 @@ v1_node_selector_term_t *v1_node_selector_term_parseFromJSON(cJSON *v1_node_sele
|
||||
|
||||
return v1_node_selector_term_local_var;
|
||||
end:
|
||||
if (match_expressionsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, match_expressionsList) {
|
||||
v1_node_selector_requirement_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(match_expressionsList);
|
||||
match_expressionsList = NULL;
|
||||
}
|
||||
if (match_fieldsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, match_fieldsList) {
|
||||
v1_node_selector_requirement_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(match_fieldsList);
|
||||
match_fieldsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
@@ -167,6 +167,12 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){
|
||||
// define the local variable for v1_node_spec->config_source
|
||||
v1_node_config_source_t *config_source_local_nonprim = NULL;
|
||||
|
||||
// define the local list for v1_node_spec->pod_cidrs
|
||||
list_t *pod_cidrsList = NULL;
|
||||
|
||||
// define the local list for v1_node_spec->taints
|
||||
list_t *taintsList = NULL;
|
||||
|
||||
// v1_node_spec->config_source
|
||||
cJSON *config_source = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "configSource");
|
||||
if (config_source) {
|
||||
@@ -193,9 +199,8 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){
|
||||
|
||||
// v1_node_spec->pod_cidrs
|
||||
cJSON *pod_cidrs = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "podCIDRs");
|
||||
list_t *pod_cidrsList;
|
||||
if (pod_cidrs) {
|
||||
cJSON *pod_cidrs_local;
|
||||
cJSON *pod_cidrs_local = NULL;
|
||||
if(!cJSON_IsArray(pod_cidrs)) {
|
||||
goto end;//primitive container
|
||||
}
|
||||
@@ -222,9 +227,8 @@ v1_node_spec_t *v1_node_spec_parseFromJSON(cJSON *v1_node_specJSON){
|
||||
|
||||
// v1_node_spec->taints
|
||||
cJSON *taints = cJSON_GetObjectItemCaseSensitive(v1_node_specJSON, "taints");
|
||||
list_t *taintsList;
|
||||
if (taints) {
|
||||
cJSON *taints_local_nonprimitive;
|
||||
cJSON *taints_local_nonprimitive = NULL;
|
||||
if(!cJSON_IsArray(taints)){
|
||||
goto end; //nonprimitive container
|
||||
}
|
||||
@@ -268,6 +272,24 @@ end:
|
||||
v1_node_config_source_free(config_source_local_nonprim);
|
||||
config_source_local_nonprim = NULL;
|
||||
}
|
||||
if (pod_cidrsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, pod_cidrsList) {
|
||||
free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(pod_cidrsList);
|
||||
pod_cidrsList = NULL;
|
||||
}
|
||||
if (taintsList) {
|
||||
listEntry_t *listEntry = NULL;
|
||||
list_ForEach(listEntry, taintsList) {
|
||||
v1_taint_free(listEntry->data);
|
||||
listEntry->data = NULL;
|
||||
}
|
||||
list_freeList(taintsList);
|
||||
taintsList = NULL;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user