def _kpatch(url, data):
 headers = {'Content-Type': 'application/json-patch+json'}
 ret = http.query(url, method='PATCH', header_dict=headers, data=json.dumps(data))
 if ret.get('error'):
  log.error('Got an error: {0}'.format(ret.get('error')))
  return ret
 else:
  return json.loads(ret.get('body'))

def _kpatch ( url , data ) : headers = { 'Content-Type' : 'application/json-patch+json' } ret = http . query ( url , method = 'PATCH' , header_dict = headers , data = json . dumps ( data ) ) if ret . get ( 'error' ) : log . error ( 'Got an error: {0}' . format ( ret . get ( 'error' ) ) ) return ret else : return json . loads ( ret . get ( 'body' ) )
patch any object in kubernetes based on url .