Skip to content

Commit

Permalink
Refactored template presistence module
Browse files Browse the repository at this point in the history
  • Loading branch information
hthompson6 committed Apr 16, 2020
1 parent 9f127af commit 8121dbd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions acos_client/v30/slb/template/persistence.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ def exists(self, name):
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=cookie_name), **kwargs)
self._post(self.prefix,
self.get_params(name,
cookie_name=kwargs.get("cookie_name")),
**kwargs)

def delete(self, name, **kwargs):
self._delete(self.prefix + name, **kwargs)
Expand All @@ -51,11 +53,10 @@ def __init__(self, client):
super(CookiePersistence, self).__init__(client)

def get_params(self, name, **kwargs):
cookie_name = kwargs.get("cookie_name", None)
return {
"cookie": {
"name": name,
"cookie-name": cookie_name
"cookie-name": kwargs.get("cookie_name")
}
}

Expand Down

0 comments on commit 8121dbd

Please sign in to comment.