(cls, account, ldapdomain, type="Group", accounttype=0)
| 421 | |
| 422 | @classmethod |
| 423 | def bind_account_to_ldap(cls, account, ldapdomain, type="Group", accounttype=0): |
| 424 | cmd = linkAccountToLdap.linkAccountToLdapCmd() |
| 425 | |
| 426 | cmd.domainid = cls.syncDomain.id |
| 427 | cmd.account = account |
| 428 | cmd.ldapdomain = ldapdomain |
| 429 | cmd.type = type |
| 430 | cmd.accounttype = accounttype |
| 431 | |
| 432 | response = cls.apiclient.linkAccountToLdap(cmd) |
| 433 | cls.logger.info("account linked to ladp %s" % response) |
| 434 | |
| 435 | # this is needed purely for cleanup: |
| 436 | response = Account.list(cls.apiclient, id=response.accountid) |
| 437 | account_created = Account(response[0].__dict__) |
| 438 | cls._cleanup.append(account_created) |
| 439 | return account_created |
| 440 | |
| 441 | @classmethod |
| 442 | def bind_domain_to_ldap(cls, domainid, ldapdomain, type="OU", accounttype=0): |
no test coverage detected