def set_computer_zone()

in ad-joining/register-computer/ad/domain.py [0:0]


    def set_computer_zone(self, ou, computer_name, zone):
        try:
            self.__connection.modify(
                "CN=%s,%s" % (computer_name, ou),
                {
                    ActiveDirectoryConnection.LDAP_ATTRIBUTE_ZONE: [(ldap3.MODIFY_REPLACE, [zone])]
                })
        except ldap3.core.exceptions.LDAPAttributeOrValueExistsResult as e:
            raise AlreadyExistsException(e)