MCPcopy Create free account
hub / github.com/apache/cloudstack / bind_account_to_ldap

Method bind_account_to_ldap

test/integration/plugins/ldap/test_ldap.py:423–439  ·  view source on GitHub ↗
(cls, account, ldapdomain, type="Group", accounttype=0)

Source from the content-addressed store, hash-verified

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):

Calls 5

AccountClass · 0.90
linkAccountToLdapMethod · 0.65
listMethod · 0.65
infoMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected