Files
python-k8sclient/magnum/common/pythonk8sclient
Hongbin Lu ef3448a135 Temporarily remove dependency on package certifi
Package certifi is not listed in openstack global requirements, so
we need to temporarily remove it. We can revert this patch once
certifi has been added to global requirements, which is unlikely to
happen in short term since global requirements repo is currently
freezing.

Change-Id: Ibf82c52cf570739dd142734bc5328b5af0bd2540
Partially-Implements: blueprint kubernetes-v1
2015-09-16 00:42:34 +00:00
..
2015-09-08 11:24:51 -04:00
2015-04-09 09:14:45 +00:00

Kubernetes API client code

Overview

This is Kubernetes API python client code. This code is generated by swagger-codegen. Kubernetes provide swagger-spec to generate client code for different versions. The specs live in Kubernetes repo.

See also

Prerequisites

You need to install required packages for swagger codegen. Please refer to https://github.com/swagger-api/swagger-codegen#prerequisites

Steps to generate API client code

Steps to generate Kubernetes client code for v1:

  • Clone the Magnum repo:

    git clone https://github.com/openstack/magnum.git
* Clone the swagger-codegen repo. It is recommended to checkout a release

(e.g. v2.1.3) instead of using the master branch:

git clone https://github.com/swagger-api/swagger-codegen.git
cd swagger-codegen/
git checkout tags/v2.1.3
  • Build swagger-codegen:

    mvn package
  • Run below command to generate the API client code for Kubernetes:

    cd ..
    java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \
        generate \
        -i ./magnum/magnum/common/pythonk8sclient/templates/v1.json \
        -l python -o ./KubernetesClientCode

Now you can check the code at location ./KubernetesClientCode.