Added a missing file

This commit is contained in:
Abby Gourlay 2020-02-21 00:50:32 +00:00
parent 417b9fb938
commit e5cde15ad2

View file

@ -24,12 +24,8 @@ class Credentials(object):
def set_credentials(self, credentials): def set_credentials(self, credentials):
self.credentials = credentials self.credentials = credentials
def get_credentials(self, data=None): def get_credentials(self):
return self.get()
if data is not None:
self._set(data)
return self._get()
def _ensure(self): def _ensure(self):
@ -46,12 +42,12 @@ class Credentials(object):
LOG.debug("credentials initialized with: %s", self.credentials) LOG.debug("credentials initialized with: %s", self.credentials)
self.credentials['Servers'] = self.credentials.setdefault('Servers', []) self.credentials['Servers'] = self.credentials.setdefault('Servers', [])
def _get(self): def get(self):
self._ensure() self._ensure()
return self.credentials return self.credentials
def _set(self, data): def set(self, data):
if data: if data:
self.credentials.update(data) self.credentials.update(data)