aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-05-04 17:46:03 +0100
committerRodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>2018-05-09 16:55:29 +0000
commitdd050db125143c682b28a0712ae950301ad659ea (patch)
tree3e3d712ad4974a027e483eabb3c76798d2f2de72
parente71be9f18aed87362e7ac20bc6be63b6b5149709 (diff)
Kubernetes API "delete_service" missing parameter
Kubernetes method "delete_service" calls core API function "delete_namespaced_service". The parameter "body" [1] is missing:     :param V1DeleteOptions body: (required) [1] https://github.com/kubernetes-client/python/blob/6.0.0/kubernetes/client/apis/core_v1_api.py JIRA: YARDSTICK-1154 Change-Id: I40bca2af0f5359eaa788d3b81d82897a770329f0 Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rw-r--r--yardstick/common/kubernetes_utils.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/yardstick/common/kubernetes_utils.py b/yardstick/common/kubernetes_utils.py
index 0cf7b9eab..d60c9b23a 100644
--- a/yardstick/common/kubernetes_utils.py
+++ b/yardstick/common/kubernetes_utils.py
@@ -41,6 +41,7 @@ def create_service(template,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
metadata = client.V1ObjectMeta(**template.get('metadata', {}))
@@ -63,7 +64,8 @@ def delete_service(name,
**kwargs): # pragma: no cover
core_v1_api = get_core_api()
try:
- core_v1_api.delete_namespaced_service(name, namespace, **kwargs)
+ body = client.V1DeleteOptions()
+ core_v1_api.delete_namespaced_service(name, namespace, body, **kwargs)
except ApiException:
LOG.exception('Delete Service failed')
@@ -86,7 +88,7 @@ def create_replication_controller(template,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
-
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
try:
core_v1_api.create_namespaced_replication_controller(namespace,
@@ -101,7 +103,7 @@ def delete_replication_controller(name,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
-
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
body = kwargs.get('body', client.V1DeleteOptions())
kwargs.pop('body', None)
@@ -119,7 +121,7 @@ def delete_pod(name,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
-
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
body = kwargs.get('body', client.V1DeleteOptions())
kwargs.pop('body', None)
@@ -147,6 +149,7 @@ def read_pod(name,
def read_pod_status(name, namespace='default', **kwargs): # pragma: no cover
+ # pylint: disable=unused-argument
return read_pod(name).status.phase
@@ -155,6 +158,7 @@ def create_config_map(name,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
metadata = client.V1ObjectMeta(name=name)
body = client.V1ConfigMap(data=data, metadata=metadata)
@@ -169,6 +173,7 @@ def delete_config_map(name,
namespace='default',
wait=False,
**kwargs): # pragma: no cover
+ # pylint: disable=unused-argument
core_v1_api = get_core_api()
body = kwargs.get('body', client.V1DeleteOptions())
kwargs.pop('body', None)