Remove duplicate replacePod API
Duplicate replacePod API make pod-update fail with 404 status even if the pod exists. This patch removes the duplicate API. Change-Id: I882bf760f222fc0ae666325c5a23a34f1bc67460 Closes-bug:#1446529 Partially-Implements: blueprint python-k8sclient
This commit is contained in:
parent
552879b6a9
commit
6c48a4d36d
|
@ -2862,78 +2862,6 @@ class ApivbetaApi(object):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def replacePod(self, **kwargs):
|
|
||||||
"""replace the specified Pod
|
|
||||||
|
|
||||||
Args:
|
|
||||||
|
|
||||||
name, str: name of the Pod (required)
|
|
||||||
|
|
||||||
|
|
||||||
namespaces, str: object name and auth scope, such as for teams and projects (required)
|
|
||||||
|
|
||||||
|
|
||||||
body, V1beta3_Pod: (required)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
"""
|
|
||||||
|
|
||||||
allParams = ['name', 'namespaces', 'body']
|
|
||||||
|
|
||||||
params = locals()
|
|
||||||
for (key, val) in params['kwargs'].iteritems():
|
|
||||||
if key not in allParams:
|
|
||||||
raise TypeError("Got an unexpected keyword argument '%s' to method replacePod" % key)
|
|
||||||
params[key] = val
|
|
||||||
del params['kwargs']
|
|
||||||
|
|
||||||
resourcePath = '/api/v1beta3/namespaces/{namespaces}/pods/{name}/status'
|
|
||||||
resourcePath = resourcePath.replace('{format}', 'json')
|
|
||||||
method = 'PUT'
|
|
||||||
|
|
||||||
queryParams = {}
|
|
||||||
headerParams = {}
|
|
||||||
formParams = {}
|
|
||||||
files = {}
|
|
||||||
bodyParam = None
|
|
||||||
|
|
||||||
headerParams['Accept'] = 'application/json'
|
|
||||||
headerParams['Content-Type'] = '*/*,'
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ('name' in params):
|
|
||||||
replacement = str(self.apiClient.toPathValue(params['name']))
|
|
||||||
replacement = urllib.quote(replacement)
|
|
||||||
resourcePath = resourcePath.replace('{' + 'name' + '}',
|
|
||||||
replacement)
|
|
||||||
|
|
||||||
if ('namespaces' in params):
|
|
||||||
replacement = str(self.apiClient.toPathValue(params['namespaces']))
|
|
||||||
replacement = urllib.quote(replacement)
|
|
||||||
resourcePath = resourcePath.replace('{' + 'namespaces' + '}',
|
|
||||||
replacement)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ('body' in params):
|
|
||||||
bodyParam = params['body']
|
|
||||||
|
|
||||||
|
|
||||||
postData = (formParams if formParams else bodyParam)
|
|
||||||
|
|
||||||
response = self.apiClient.callAPI(resourcePath, method, queryParams,
|
|
||||||
postData, headerParams, files=files)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def listReplicationController(self, **kwargs):
|
def listReplicationController(self, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue