Add sync method and method stubs to Service

This commit is contained in:
sfigato 2020-08-29 19:41:34 +02:00
parent 66885641c4
commit e454fbd84a
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -386,6 +386,25 @@ class Service(Robots):
self._entry = await create_new_(self, uid=self.name, userPassword=password) self._entry = await create_new_(self, uid=self.name, userPassword=password)
alog.info("Service(%s): created", self.name) alog.info("Service(%s): created", self.name)
async def sync(self):
async with self.client.connect(is_async=True) as conn:
res = await conn.search(self.dn, 0)
if len(res) == 0:
raise PhiEntryDoesNotExist(self.dn)
for k, v in res[0].items():
if not k == "dn":
self._entry[k] = v
alog.info("Service(%s): synced", self.name)
async def remove(self):
pass
async def modify_password(self, new_pass, old_pass=None):
pass
async def verify_password(self, given_pass):
pass
class Group(Congregations): class Group(Congregations):
""" """