From 9f127afa22079c911d9bede8196b6b253bb9ad21 Mon Sep 17 00:00:00 2001 From: omkartelee01 <45809890+omkartelee01@users.noreply.github.com> Date: Thu, 16 Apr 2020 13:21:26 +0530 Subject: [PATCH] Converted cookie name to be part of kwargs --- acos_client/v30/slb/template/persistence.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/acos_client/v30/slb/template/persistence.py b/acos_client/v30/slb/template/persistence.py index eac767b7..2e8aeed3 100644 --- a/acos_client/v30/slb/template/persistence.py +++ b/acos_client/v30/slb/template/persistence.py @@ -38,7 +38,7 @@ def create(self, name, **kwargs): if self.exists(name): raise acos_errors.Exists cookie_name = kwargs.get("cookie_name", None) - self._post(self.prefix, self.get_params(name, cookie_name), **kwargs) + self._post(self.prefix, self.get_params(name, cookie_name=cookie_name), **kwargs) def delete(self, name, **kwargs): self._delete(self.prefix + name, **kwargs) @@ -50,7 +50,8 @@ def __init__(self, client): self.pers_type = 'cookie' super(CookiePersistence, self).__init__(client) - def get_params(self, name, cookie_name=None): + def get_params(self, name, **kwargs): + cookie_name = kwargs.get("cookie_name", None) return { "cookie": { "name": name, @@ -65,7 +66,7 @@ def __init__(self, client): self.pers_type = 'source-ip' super(SourceIpPersistence, self).__init__(client) - def get_params(self, name, cookie_name=None): + def get_params(self, name, **kwargs): return { "source-ip": { "name": name