Automated openapi generation from release-1.33
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
Requested Commit/Tag : master
|
||||
Actual Commit : 4402d836bb85f95c2d634844fdffde90bb5dd186
|
||||
Requested Commit/Tag : HEAD
|
||||
Actual Commit : fcc83db0f8f3e9ba8bf58219ef9c75b177587521
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.14.0-SNAPSHOT
|
||||
7.15.0-SNAPSHOT
|
||||
|
||||
@@ -1583,7 +1583,11 @@ include(PreTarget.cmake OPTIONAL)
|
||||
set(PROJECT_VERSION_STRING "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
|
||||
# Add library with project file with project name as library name
|
||||
add_library(${pkgName} ${SRCS} ${HDRS})
|
||||
if(NOT BUILD_STATIC_LIBS)
|
||||
add_library(${pkgName} ${SRCS} ${HDRS})
|
||||
else()
|
||||
add_library(${pkgName} STATIC ${SRCS} ${HDRS})
|
||||
endif()
|
||||
# Link dependent libraries
|
||||
if(NOT CMAKE_VERSION VERSION_LESS 3.4)
|
||||
target_link_libraries(${pkgName} PRIVATE OpenSSL::SSL OpenSSL::Crypto)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set(PROJECT_VERSION_MAJOR 0)
|
||||
set(PROJECT_VERSION_MINOR 13)
|
||||
set(PROJECT_VERSION_PATCH 0)
|
||||
set(PROJECT_VERSION_PATCH 1)
|
||||
|
||||
set(PROJECT_PACKAGE_DESCRIPTION_SUMMARY "The Kubernetes client library for the C programming language.")
|
||||
set(PROJECT_PACKAGE_VENDOR "https://github.com/kubernetes-client")
|
||||
|
||||
@@ -5,20 +5,20 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat
|
||||
|
||||
- API version: release-1.33
|
||||
- Package version:
|
||||
- Generator version: 7.14.0-SNAPSHOT
|
||||
- Generator version: 7.15.0-SNAPSHOT
|
||||
- Build package: org.openapitools.codegen.languages.CLibcurlClientCodegen
|
||||
|
||||
## Installation
|
||||
You'll need the `curl 7.58.0` package in order to build the API. To have code formatted nicely, you also need to have uncrustify version 0.67 or later.
|
||||
You'll need the `curl 7.61.1` package in order to build the API. To have code formatted nicely, you also need to have uncrustify version 0.67 or later.
|
||||
|
||||
# Prerequisites
|
||||
|
||||
## Install the `curl 7.58.0` package with the following command on Linux.
|
||||
## Install the `curl 7.61.1` package with the following command on Linux.
|
||||
```bash
|
||||
sudo apt remove curl
|
||||
wget http://curl.haxx.se/download/curl-7.58.0.tar.gz
|
||||
tar -xvf curl-7.58.0.tar.gz
|
||||
cd curl-7.58.0/
|
||||
wget http://curl.haxx.se/download/curl-7.61.1.tar.gz
|
||||
tar -xvf curl-7.61.1.tar.gz
|
||||
cd curl-7.61.1/
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
|
||||
@@ -19,9 +19,20 @@ typedef struct sslConfig_t {
|
||||
/* 1 -- skip ssl verify for server certificate */
|
||||
} sslConfig_t;
|
||||
|
||||
typedef struct curlConfig_t {
|
||||
long verbose; /* 0 -- disable verbose (default) */
|
||||
/* 1 -- enable verbose */
|
||||
int keepalive; /* 0 -- disable keepalive (default) */
|
||||
/* 1 -- enable keepalive */
|
||||
long keepidle; /* keep-alive idle time: default to 120 seconds */
|
||||
long keepintvl; /* interval time between keep-alive probes: default to 60 seconds */
|
||||
} curlConfig_t;
|
||||
|
||||
typedef struct apiClient_t {
|
||||
char *basePath;
|
||||
sslConfig_t *sslConfig;
|
||||
curlConfig_t *curlConfig;
|
||||
void (*curl_pre_invoke_func)(CURL *);
|
||||
void *dataReceived;
|
||||
long dataReceivedLen;
|
||||
void (*data_callback_func)(void **, long *);
|
||||
|
||||
@@ -10,6 +10,8 @@ apiClient_t *apiClient_create() {
|
||||
apiClient_t *apiClient = malloc(sizeof(apiClient_t));
|
||||
apiClient->basePath = strdup("http://localhost");
|
||||
apiClient->sslConfig = NULL;
|
||||
apiClient->curlConfig = NULL;
|
||||
apiClient->curl_pre_invoke_func = NULL;
|
||||
apiClient->dataReceived = NULL;
|
||||
apiClient->dataReceivedLen = 0;
|
||||
apiClient->data_callback_func = NULL;
|
||||
@@ -38,6 +40,13 @@ apiClient_t *apiClient_create_with_base_path(const char *basePath
|
||||
apiClient->sslConfig = NULL;
|
||||
}
|
||||
|
||||
apiClient->curlConfig = malloc(sizeof(curlConfig_t));
|
||||
apiClient->curlConfig->verbose = 0;
|
||||
apiClient->curlConfig->keepalive = 0;
|
||||
apiClient->curlConfig->keepidle = 120;
|
||||
apiClient->curlConfig->keepintvl = 60;
|
||||
|
||||
apiClient->curl_pre_invoke_func = NULL;
|
||||
apiClient->dataReceived = NULL;
|
||||
apiClient->dataReceivedLen = 0;
|
||||
apiClient->data_callback_func = NULL;
|
||||
@@ -80,6 +89,14 @@ void apiClient_free(apiClient_t *apiClient) {
|
||||
}
|
||||
list_freeList(apiClient->apiKeys_BearerToken);
|
||||
}
|
||||
|
||||
if(apiClient->curlConfig) {
|
||||
free(apiClient->curlConfig);
|
||||
apiClient->curlConfig = NULL;
|
||||
}
|
||||
|
||||
apiClient->curl_pre_invoke_func = NULL;
|
||||
|
||||
free(apiClient);
|
||||
}
|
||||
|
||||
@@ -416,13 +433,25 @@ void apiClient_invoke(apiClient_t *apiClient,
|
||||
CURLOPT_WRITEDATA,
|
||||
apiClient);
|
||||
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, headers);
|
||||
curl_easy_setopt(handle, CURLOPT_VERBOSE, 0); // to get curl debug msg 0: to disable, 1L:to enable
|
||||
|
||||
|
||||
if(bodyParameters != NULL) {
|
||||
postData(handle, bodyParameters, bodyParametersLength);
|
||||
}
|
||||
|
||||
if(apiClient->curlConfig != NULL) {
|
||||
if(apiClient->curlConfig->keepalive == 1) {
|
||||
curl_easy_setopt(handle, CURLOPT_TCP_KEEPALIVE, 1L);
|
||||
curl_easy_setopt(handle, CURLOPT_TCP_KEEPIDLE, apiClient->curlConfig->keepidle);
|
||||
curl_easy_setopt(handle, CURLOPT_TCP_KEEPINTVL, apiClient->curlConfig->keepintvl);
|
||||
}
|
||||
curl_easy_setopt(handle, CURLOPT_VERBOSE, apiClient->curlConfig->verbose);
|
||||
}
|
||||
|
||||
if(apiClient->curl_pre_invoke_func) {
|
||||
apiClient->curl_pre_invoke_func(handle);
|
||||
}
|
||||
|
||||
res = curl_easy_perform(handle);
|
||||
|
||||
curl_slist_free_all(headers);
|
||||
|
||||
4
settings
4
settings
@@ -2,12 +2,12 @@
|
||||
export KUBERNETES_BRANCH="release-1.33"
|
||||
|
||||
# client version is not currently used by the code generator.
|
||||
export CLIENT_VERSION="0.13.0"
|
||||
export CLIENT_VERSION="0.13.1"
|
||||
|
||||
# Name of the release package
|
||||
export PACKAGE_NAME="client"
|
||||
|
||||
# OpenAPI-Generator branch/tag to generate the client library
|
||||
export OPENAPI_GENERATOR_COMMIT="master"
|
||||
export OPENAPI_GENERATOR_COMMIT="HEAD"
|
||||
|
||||
export USERNAME=kubernetes
|
||||
|
||||
Reference in New Issue
Block a user