def getConfiguredTargets(self): """Get the configured import targets. Gina's targets are configured as "[gina_target.*]" sections in the LAZR config. """ sections = config.getByCategory('gina_target', []) targets = [target.category_and_section_names[1] for target in sections] if len(targets) == 0: self.logger.warn("No gina_target entries configured.") return targets
def getConfiguredTargets(self): """Get the configured import targets. Gina's targets are configured as "[gina_target.*]" sections in the LAZR config. """ sections = config.getByCategory('gina_target', []) targets = [ target.category_and_section_names[1] for target in sections] if len(targets) == 0: self.logger.warn("No gina_target entries configured.") return targets
def _getVHostData(self): """Parse the vhosts on demand.""" # Avoid the circular imports inherent with the use of canonical.lazr. if self._has_vhost_data: return from lp.services.config import config self._use_https = config.vhosts.use_https self._configs = {} self._hostnames = set() for section in config.getByCategory('vhost'): if section.hostname is None: continue category, vhost = section.category_and_section_names self._configs[vhost] = config = VirtualHostConfig( section.hostname, section.althostnames, section.rooturl, self._use_https) self._hostnames.add(config.hostname) self._hostnames.update(config.althostnames) self._has_vhost_data = True