def _insert_ldapserver(self, name, **kwargs): ldapserver = LdapServer() ldapserver.name = name ldapserver.host = kwargs.get('host', None) ldapserver.port = kwargs.get('port', 389) ldapserver.securitylayer = kwargs.get('securitylayer', None) ldapserver.protocolversion = kwargs.get('protocolversion', None) ldapserver.description = kwargs.get('description', '') ldapserver.disable = kwargs.get('disable', '0') self.add_me(ldapserver) return ldapserver
def _insert_ldapserver(self, name, securitylayer='tls'): ldapserver = LdapServer() ldapserver.name = name ldapserver.host = name ldapserver.port = 389 ldapserver.securitylayer = securitylayer ldapserver.protocolversion = '3' ldapserver.description = 'description' self.session.begin() self.session.add(ldapserver) self.session.commit() return ldapserver
def _insert_ldapserver(self, name, **kwargs): ldapserver = LdapServer() ldapserver.name = name ldapserver.host = kwargs.get('host', None) ldapserver.port = kwargs.get('port', 389) ldapserver.securitylayer = kwargs.get('securitylayer', None) ldapserver.protocolversion = kwargs.get('protocolversion', None) ldapserver.description = kwargs.get('description', '') self.session.begin() self.session.add(ldapserver) self.session.commit() return ldapserver
def _insert_ldapserver(self, name, securitylayer='tls'): ldapserver = LdapServer() ldapserver.name = name ldapserver.host = name ldapserver.port = 389 ldapserver.securitylayer = securitylayer ldapserver.protocolversion = '3' ldapserver.description = 'description' self.add_me(ldapserver) return ldapserver