Skip to content

Commit

Permalink
Rename async to async_req for compatibility with python3 and kubernet…
Browse files Browse the repository at this point in the history
…es 7 (#197)

* Rename async to async_req for python3 and kubernetes 7 compatibility

* Update requirements

* Update versions

* update tests

* update tox for 3.9

* fix py3 test issue
  • Loading branch information
fabianvf authored Aug 29, 2018
1 parent 5f1d83d commit 1ab119d
Show file tree
Hide file tree
Showing 36 changed files with 5,163 additions and 5,158 deletions.
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@ python:
- '3.5'
env:
- TEST_SUITE=test OPENSHIFT_VERSION=latest
- TEST_SUITE=test OPENSHIFT_VERSION=3.9
- TEST_SUITE=test OPENSHIFT_VERSION=3.7
- TEST_SUITE=test OPENSHIFT_VERSION=3.6
- TEST_SUITE=test OPENSHIFT_VERSION=1.5
- TEST_SUITE=generate
script: tox
install:
- pip install tox-travis coveralls
after_success:
- coveralls
jobs:
allow_failures:
- env: TEST_SUITE=generate
include:
- stage: lint
python: '2.7'
Expand Down Expand Up @@ -53,5 +49,7 @@ jobs:
stages:
- lint
- test
- deploy
- test-deploy
- name: deploy
if: (tag is present) and (type = push)
- name: test-deploy
if: (tag is present) and (type = push)
2 changes: 1 addition & 1 deletion openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ OpenShift provides builds, application lifecycle, image content management, and
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: latest
- Package version: 0.6.2
- Package version: 0.7.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
4 changes: 2 additions & 2 deletions openshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@

# Do not edit these constants. They will be updated automatically
# by scripts/update-client.sh.
__version__ = "0.6.2"
__k8s_client_version__ = "6.0.0"
__version__ = "0.7.0"
__k8s_client_version__ = "7.0.0"
18 changes: 9 additions & 9 deletions openshift/client/apis/apps_openshift_io_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def get_api_group(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_api_group(async=True)
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_group(async_req=True)
>>> result = thread.get()
:param async bool
:param async_req bool
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
if kwargs.get('async_req'):
return self.get_api_group_with_http_info(**kwargs)
else:
(data) = self.get_api_group_with_http_info(**kwargs)
Expand All @@ -59,18 +59,18 @@ def get_api_group_with_http_info(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_api_group_with_http_info(async=True)
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_group_with_http_info(async_req=True)
>>> result = thread.get()
:param async bool
:param async_req bool
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""

all_params = []
all_params.append('async')
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
Expand Down Expand Up @@ -117,7 +117,7 @@ def get_api_group_with_http_info(self, **kwargs):
files=local_var_files,
response_type='V1APIGroup',
auth_settings=auth_settings,
async=params.get('async'),
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
Expand Down
342 changes: 171 additions & 171 deletions openshift/client/apis/apps_openshift_io_v1_api.py

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions openshift/client/apis/authorization_openshift_io_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ def get_api_group(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_api_group(async=True)
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_group(async_req=True)
>>> result = thread.get()
:param async bool
:param async_req bool
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
if kwargs.get('async_req'):
return self.get_api_group_with_http_info(**kwargs)
else:
(data) = self.get_api_group_with_http_info(**kwargs)
Expand All @@ -59,18 +59,18 @@ def get_api_group_with_http_info(self, **kwargs):
"""
get information of a group
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_api_group_with_http_info(async=True)
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_api_group_with_http_info(async_req=True)
>>> result = thread.get()
:param async bool
:param async_req bool
:return: V1APIGroup
If the method is called asynchronously,
returns the request thread.
"""

all_params = []
all_params.append('async')
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
Expand Down Expand Up @@ -117,7 +117,7 @@ def get_api_group_with_http_info(self, **kwargs):
files=local_var_files,
response_type='V1APIGroup',
auth_settings=auth_settings,
async=params.get('async'),
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
Expand Down
Loading

0 comments on commit 1ab119d

Please sign in to comment.