Add sync method and method stubs to Service
This commit is contained in:
parent
66885641c4
commit
e454fbd84a
|
@ -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):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user