Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3e57e12

Browse files
author
Scott Lee
committed
Generate client and remove tests directory
1 parent 442ebc0 commit 3e57e12

File tree

14 files changed

+155
-51
lines changed

14 files changed

+155
-51
lines changed

kubernetes/.gitlab-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ref: https://docs.gitlab.com/ee/ci/README.html
2+
3+
stages:
4+
- test
5+
6+
.nosetest:
7+
stage: test
8+
script:
9+
- pip install -r requirements.txt
10+
- pip install -r test-requirements.txt
11+
- pytest --cov=client
12+
13+
nosetest-2.7:
14+
extends: .nosetest
15+
image: python:2.7-alpine
16+
nosetest-3.3:
17+
extends: .nosetest
18+
image: python:3.3-alpine
19+
nosetest-3.4:
20+
extends: .nosetest
21+
image: python:3.4-alpine
22+
nosetest-3.5:
23+
extends: .nosetest
24+
image: python:3.5-alpine
25+
nosetest-3.6:
26+
extends: .nosetest
27+
image: python:3.6-alpine
28+
nosetest-3.7:
29+
extends: .nosetest
30+
image: python:3.7-alpine
31+
nosetest-3.8:
32+
extends: .nosetest
33+
image: python:3.8-alpine

kubernetes/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

66
- API version: release-1.16
7-
- Package version: 12.0.0-snapshot
7+
- Package version: 12.0.0a1
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.

kubernetes/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
__project__ = 'kubernetes'
1616
# The version is auto-updated. Please do not edit.
17-
__version__ = "12.0.0-snapshot"
17+
__version__ = "12.0.0a1"
1818

1919
import kubernetes.client
2020
import kubernetes.config

kubernetes/__init__.py-e

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2016 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
__project__ = 'kubernetes'
16+
# The version is auto-updated. Please do not edit.
17+
__version__ = "12.0.0-snapshot"
18+
19+
import kubernetes.client
20+
import kubernetes.config
21+
import kubernetes.dynamic
22+
import kubernetes.watch
23+
import kubernetes.stream
24+
import kubernetes.utils

kubernetes/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
from __future__ import absolute_import
1616

17-
__version__ = "12.0.0-snapshot"
17+
__version__ = "12.0.0a1"
1818

1919
# import apis into sdk package
2020
from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi

kubernetes/client/api/custom_objects_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ def patch_cluster_custom_object_with_http_info(self, group, version, plural, nam
24052405

24062406
# HTTP header `Content-Type`
24072407
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2408-
['application/merge-patch+json']) # noqa: E501
2408+
['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501
24092409

24102410
# Authentication setting
24112411
auth_settings = ['BearerToken'] # noqa: E501
@@ -2574,7 +2574,7 @@ def patch_cluster_custom_object_scale_with_http_info(self, group, version, plura
25742574

25752575
# HTTP header `Content-Type`
25762576
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2577-
['application/merge-patch+json']) # noqa: E501
2577+
['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501
25782578

25792579
# Authentication setting
25802580
auth_settings = ['BearerToken'] # noqa: E501
@@ -2743,7 +2743,7 @@ def patch_cluster_custom_object_status_with_http_info(self, group, version, plur
27432743

27442744
# HTTP header `Content-Type`
27452745
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2746-
['application/merge-patch+json']) # noqa: E501
2746+
['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501
27472747

27482748
# Authentication setting
27492749
auth_settings = ['BearerToken'] # noqa: E501
@@ -2921,7 +2921,7 @@ def patch_namespaced_custom_object_with_http_info(self, group, version, namespac
29212921

29222922
# HTTP header `Content-Type`
29232923
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2924-
['application/merge-patch+json']) # noqa: E501
2924+
['application/json-patch+json', 'application/merge-patch+json']) # noqa: E501
29252925

29262926
# Authentication setting
29272927
auth_settings = ['BearerToken'] # noqa: E501
@@ -3099,7 +3099,7 @@ def patch_namespaced_custom_object_scale_with_http_info(self, group, version, na
30993099

31003100
# HTTP header `Content-Type`
31013101
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3102-
['application/merge-patch+json']) # noqa: E501
3102+
['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501
31033103

31043104
# Authentication setting
31053105
auth_settings = ['BearerToken'] # noqa: E501
@@ -3277,7 +3277,7 @@ def patch_namespaced_custom_object_status_with_http_info(self, group, version, n
32773277

32783278
# HTTP header `Content-Type`
32793279
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3280-
['application/merge-patch+json']) # noqa: E501
3280+
['application/json-patch+json', 'application/merge-patch+json', 'application/apply-patch+yaml']) # noqa: E501
32813281

32823282
# Authentication setting
32833283
auth_settings = ['BearerToken'] # noqa: E501

kubernetes/client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7878
self.default_headers[header_name] = header_value
7979
self.cookie = cookie
8080
# Set default User-Agent.
81-
self.user_agent = 'OpenAPI-Generator/12.0.0-snapshot/python'
81+
self.user_agent = 'OpenAPI-Generator/12.0.0a1/python'
8282
self.client_side_validation = configuration.client_side_validation
8383

8484
def __enter__(self):

kubernetes/client/apis/__init__.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

kubernetes/client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def to_debug_report(self):
347347
"OS: {env}\n"\
348348
"Python Version: {pyversion}\n"\
349349
"Version of the API: release-1.16\n"\
350-
"SDK Package Version: 12.0.0-snapshot".\
350+
"SDK Package Version: 12.0.0a1".\
351351
format(env=sys.platform, pyversion=sys.version)
352352

353353
def get_host_settings(self):

kubernetes/setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length=99

kubernetes/test/test_api_client.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

scripts/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
KUBERNETES_BRANCH = "release-1.16"
1919

2020
# client version for packaging and releasing.
21-
CLIENT_VERSION = "12.0.0-snapshot"
21+
CLIENT_VERSION = "12.0.0a1"
2222

2323
# Name of the release package
2424
PACKAGE_NAME = "kubernetes"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Do not edit these constants. They will be updated automatically
1818
# by scripts/update-client.sh.
19-
CLIENT_VERSION = "12.0.0-snapshot"
19+
CLIENT_VERSION = "12.0.0a1"
2020
PACKAGE_NAME = "kubernetes"
2121
DEVELOPMENT_STATUS = "3 - Alpha"
2222

setup.py-e

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Copyright 2016 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
from setuptools import setup
16+
17+
# Do not edit these constants. They will be updated automatically
18+
# by scripts/update-client.sh.
19+
CLIENT_VERSION = "12.0.0a1"
20+
PACKAGE_NAME = "kubernetes"
21+
DEVELOPMENT_STATUS = "3 - Alpha"
22+
23+
# To install the library, run the following
24+
#
25+
# python setup.py install
26+
#
27+
# prerequisite: setuptools
28+
# http://pypi.python.org/pypi/setuptools
29+
30+
EXTRAS = {
31+
'adal': ['adal>=1.0.2']
32+
}
33+
REQUIRES = []
34+
with open('requirements.txt') as f:
35+
for line in f:
36+
line, _, _ = line.partition('#')
37+
line = line.strip()
38+
if ';' in line:
39+
requirement, _, specifier = line.partition(';')
40+
for_specifier = EXTRAS.setdefault(':{}'.format(specifier), [])
41+
for_specifier.append(requirement)
42+
else:
43+
REQUIRES.append(line)
44+
45+
with open('test-requirements.txt') as f:
46+
TESTS_REQUIRES = f.readlines()
47+
48+
setup(
49+
name=PACKAGE_NAME,
50+
version=CLIENT_VERSION,
51+
description="Kubernetes python client",
52+
author_email="",
53+
author="Kubernetes",
54+
license="Apache License Version 2.0",
55+
url="https://github.com/kubernetes-client/python",
56+
keywords=["Swagger", "OpenAPI", "Kubernetes"],
57+
install_requires=REQUIRES,
58+
tests_require=TESTS_REQUIRES,
59+
extras_require=EXTRAS,
60+
packages=['kubernetes', 'kubernetes.client', 'kubernetes.config',
61+
'kubernetes.watch', 'kubernetes.client.api',
62+
'kubernetes.stream', 'kubernetes.client.models',
63+
'kubernetes.utils', 'kubernetes.client.apis',
64+
'kubernetes.dynamic'],
65+
include_package_data=True,
66+
long_description="Python client for kubernetes http://kubernetes.io/",
67+
classifiers=[
68+
"Development Status :: %s" % DEVELOPMENT_STATUS,
69+
"Topic :: Utilities",
70+
"Intended Audience :: Developers",
71+
"Intended Audience :: Information Technology",
72+
"License :: OSI Approved :: Apache Software License",
73+
"Operating System :: OS Independent",
74+
"Programming Language :: Python",
75+
"Programming Language :: Python :: 2",
76+
"Programming Language :: Python :: 2.7",
77+
"Programming Language :: Python :: 3",
78+
"Programming Language :: Python :: 3.5",
79+
"Programming Language :: Python :: 3.6",
80+
"Programming Language :: Python :: 3.7",
81+
"Programming Language :: Python :: 3.8",
82+
],
83+
)

0 commit comments

Comments
 (0)