diff --git a/src/phi/async_ldap/model.py b/src/phi/async_ldap/model.py index 0b48e65..192a5dd 100644 --- a/src/phi/async_ldap/model.py +++ b/src/phi/async_ldap/model.py @@ -386,6 +386,25 @@ class Service(Robots): self._entry = await create_new_(self, uid=self.name, userPassword=password) 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): """