magnum/magnum/common/pythonk8sclient
abhishekkekane 20aec0db19 Add python 3 support
Replaced iter.next() with next(iter)
Replaced __builtin__ with six.moves.builtin
Replaced unicode with six.text_type
Repleaced Configparser with six.moves.configparser

Blueprint magnum-python3

Change-Id: I9f084ef4fae1ec1111e26142e2e89bad18acbf45
2016-01-28 10:43:12 +00:00
..
swagger_client Add python 3 support 2016-01-28 10:43:12 +00:00
templates Fix typos 2015-11-15 15:36:51 +05:30
README.rst Update documentation for generating k8s v1 client 2015-09-13 16:12:07 -04:00
__init__.py Adding support of python-k8client. 2015-04-09 09:14:45 +00:00

README.rst

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.