def get_services(self): services = [] self_services = self.services.split(',') for s in self_services: s = s.strip() services.append(s) return services
def remove_service(self, service): services = [] self_services = self.services.split(',') for s in self_services: s = s.strip() if s == service: continue else: services.append(service) self.services = string.join(services, ',')
def add_service(self, service): if not service in ('nss', 'pam', 'sudo', 'ssh'): return if not self.services: self.services = service else: services = [] self_services = self.services.split(',') for s in self_services: s = s.strip() services.append(s) if s == service: return services.append(service) self.services = string.join(services, ',')
def add_service(self, service): if not service in ('nss', 'pam', 'sudo', 'ssh'): return if not self.services: self.service = service else: services = [] self_services = self.services.split(',') for s in self_services: s = s.strip() services.append(s) if s == service: return services.append(service) self.services = string.join(services, ',')
def add_service(self, service): if not service in self.section_types(): return if not self.services: self.services = service else: services = [] self_services = self.services.split(',') for s in self_services: s = s.strip() services.append(s) if s == service: return services.append(service) self.services = string.join(services, ',')
def merge_config(self, sc): services = self.sections['sssd'].get_services() for s in sc.sections: st = s.get_section_type() self_s = self.sections[st] if st.startswith('domain') and self_s and not sc.domain_override: for var in s: self_s[var] = s[var] else: self.sections[st] = s if st not in services: services.append(st) for s in services: self.sections['sssd'].add_service(s)