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
This commit is contained in:
Davanum Srinivas 2016-04-04 08:50:13 -04:00
parent 232306d0c7
commit 9a07ef5129
3 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ Steps to generate Kubernetes client code for v1:
* Clone the Magnum repo:: * 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 * Clone the swagger-codegen repo. It is recommended to checkout a release
(e.g. v2.1.3) instead of using the master branch:: (e.g. v2.1.3) instead of using the master branch::
@ -51,7 +51,7 @@ Steps to generate Kubernetes client code for v1:
cd .. cd ..
java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \ java -jar ./swagger-codegen/modules/swagger-codegen-cli/target/swagger-codegen-cli.jar \
generate \ generate \
-i ./magnum/magnum/common/pythonk8sclient/templates/v1.json \ -i ./k8sclient/templates/v1.json \
-l python -o ./KubernetesClientCode -l python -o ./KubernetesClientCode
Now you can check the code at location ./KubernetesClientCode. Now you can check the code at location ./KubernetesClientCode.

View File

@ -44,7 +44,7 @@ if six.PY3:
import io import io
file_type = io.IOBase file_type = io.IOBase
else: else:
file_type = file file_type = file # noqa
class ApiClient(object): class ApiClient(object):

View File

@ -40,7 +40,7 @@ def _is_k8s_running():
class TestK8sclient(base.TestCase): class TestK8sclient(base.TestCase):
@unittest.skipUnless( @unittest.skipUnless(
_is_k8s_running(), "Kubernetes is not available") _is_k8s_running(), "Kubernetes is not available")
def test_list_nodes_and_endpoints(self): def test_list_nodes_and_endpoints(self):
client = api_client.ApiClient('http://127.0.0.1:8080/') client = api_client.ApiClient('http://127.0.0.1:8080/')
api = apiv_api.ApivApi(client) api = apiv_api.ApivApi(client)