Skip to content

Commit

Permalink
Converted cookie name to be part of kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
OmkarTelee-A10 authored and hthompson6 committed Apr 16, 2020
1 parent af0aff6 commit 9f127af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions acos_client/v30/slb/template/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 9f127af

Please sign in to comment.