From 9a07ef5129714043bd544738808e609ae823c511 Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 4 Apr 2016 08:50:13 -0400 Subject: [PATCH] Switch file location and repo path * We are no longer in magnum repo * file path to v1.json has changed Fix minor flake8 issues Change-Id: I077127d387399864e490d242806053237af32e0b --- README.rst | 4 ++-- k8sclient/client/api_client.py | 2 +- k8sclient/tests/test_k8sclient.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index cc886b7..c5c3713 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ Steps to generate Kubernetes client code for v1: * Clone the Magnum repo:: - git clone https://github.com/openstack/magnum.git + git clone https://github.com/openstack/python-k8sclient.git * Clone the swagger-codegen repo. It is recommended to checkout a release (e.g. v2.1.3) instead of using the master branch:: @@ -51,7 +51,7 @@ Steps to generate Kubernetes client code for v1: cd .. java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \ generate \ - -i ./magnum/magnum/common/pythonk8sclient/templates/v1.json \ + -i ./k8sclient/templates/v1.json \ -l python -o ./KubernetesClientCode Now you can check the code at location ./KubernetesClientCode. diff --git a/k8sclient/client/api_client.py b/k8sclient/client/api_client.py index 3cc60fb..9c6a14a 100644 --- a/k8sclient/client/api_client.py +++ b/k8sclient/client/api_client.py @@ -44,7 +44,7 @@ if six.PY3: import io file_type = io.IOBase else: - file_type = file + file_type = file # noqa class ApiClient(object): diff --git a/k8sclient/tests/test_k8sclient.py b/k8sclient/tests/test_k8sclient.py index 517c8fa..228995c 100644 --- a/k8sclient/tests/test_k8sclient.py +++ b/k8sclient/tests/test_k8sclient.py @@ -40,7 +40,7 @@ def _is_k8s_running(): class TestK8sclient(base.TestCase): @unittest.skipUnless( - _is_k8s_running(), "Kubernetes is not available") + _is_k8s_running(), "Kubernetes is not available") def test_list_nodes_and_endpoints(self): client = api_client.ApiClient('http://127.0.0.1:8080/') api = apiv_api.ApivApi(client)