def setDefault(self): ProvisionerConfig.setDefault(self) self.profileAttr = None self.profilesAcl = {} self.profileGroupMapping = False self.profileGroupPrefix = "" self.profilesEntity = {}
def readConf(self): ProvisionerConfig.readConf(self) if self.has_option(self.section, 'profile_attr'): self.profileAttr = self.get(self.section, 'profile_attr') PROFILEENTITY = 'profile_entity_' for option in self.options(self.section): if option.startswith(PROFILEENTITY): self.profilesEntity[option.replace(PROFILEENTITY, '').lower()] = self.get(self.section, option)
def readConf(self): PROFILEACL = "profile_acl_" ProvisionerConfig.readConf(self) try: self.doauth = self.getboolean(self.section, "doauth") except: pass for option in self.options(self.section): if option.startswith(PROFILEACL): self.profilesAcl[option.replace(PROFILEACL, "")] = self.get(self.section, option) self.profilesOrder = self.get(self.section, "profiles_order").split()
def readConf(self): PROFILEACL = "profile_acl_" ProvisionerConfig.readConf(self) try: self.doauth = self.getboolean(self.section, "doauth") except: pass for option in self.options(self.section): if option.startswith(PROFILEACL): self.profilesAcl[option.replace(PROFILEACL, "")] = self.get( self.section, option) self.profilesOrder = self.get(self.section, "profiles_order").split()
def readConf(self): ProvisionerConfig.readConf(self) for attr in ["uid", "givenName", "sn"]: option = "ldap_" + attr self.__dict__[option] = self.get(self.section, option) if self.has_option(self.section, "profile_attr"): self.profileAttr = self.get(self.section, "profile_attr") if self.has_option(self.section, "profile_group_mapping"): self.profileGroupMapping = self.getboolean(self.section, "profile_group_mapping") if self.has_option(self.section, "profile_group_prefix"): self.profileGroupPrefix = self.get(self.section, "profile_group_prefix") PROFILEACL = "profile_acl_" for option in self.options(self.section): if option.startswith(PROFILEACL): self.profilesAcl[option.replace(PROFILEACL, "").lower()] = self.get(self.section, option)
def readConf(self): PROFILEACL = "profile_acl_" ProvisionerConfig.readConf(self) try: self.doauth = self.getboolean(self.section, "doauth") except: pass for option in self.options(self.section): if option.startswith(PROFILEACL): value = self.get(self.section, option) if isfile(value): acls = open(value, 'r').read().split('\n') # Clean empty lines, and join them by : value = ':' + (':'.join([x for x in acls if x.strip() and x[0] != '#'])) else: self.profilesAcl[option.replace(PROFILEACL, "")] = value self.profilesOrder = self.get(self.section, "profiles_order").split()
def readConf(self): PROFILEACL = "profile_acl_" ProvisionerConfig.readConf(self) try: self.doauth = self.getboolean(self.section, "doauth") except: pass for option in self.options(self.section): if option.startswith(PROFILEACL): value = self.get(self.section, option) if isfile(value): acls = open(value, 'r').read().split('\n') # Clean empty lines, and join them by : value = ':' + (':'.join( [x for x in acls if x.strip() and x[0] != '#'])) else: self.profilesAcl[option.replace(PROFILEACL, "")] = value self.profilesOrder = self.get(self.section, "profiles_order").split()
def readConf(self): ProvisionerConfig.readConf(self) for attr in ["uid", "givenName", "sn"]: option = "ldap_" + attr self.__dict__[option] = self.get(self.section, option) if self.has_option(self.section, "profile_attr"): self.profileAttr = self.get(self.section, "profile_attr") if self.has_option(self.section, "profile_group_mapping"): self.profileGroupMapping = self.getboolean( self.section, "profile_group_mapping") if self.has_option(self.section, "profile_group_prefix"): self.profileGroupPrefix = self.get(self.section, "profile_group_prefix") PROFILEACL = "profile_acl_" for option in self.options(self.section): if option.startswith(PROFILEACL): self.profilesAcl[option.replace(PROFILEACL, "").lower()] = self.get( self.section, option)
def setDefault(self): ProvisionerConfig.setDefault(self) self.profileAttr = None self.profilesEntity = {}
def setDefault(self): ProvisionerConfig.setDefault(self) self.doauth = True self.profilesAcl = {} self.profilesOrder = []