def register_from_packs(self, base_dirs):
        """
        Register configs for all the available packs.
        """
        # Register packs first
        self.register_packs(base_dirs=base_dirs)

        registered_count = 0
        packs = self._pack_loader.get_packs(base_dirs=base_dirs)
        pack_names = list(packs.keys())

        for pack_name in pack_names:
            config_path = self._get_config_path_for_pack(pack_name=pack_name)

            if not os.path.isfile(config_path):
                # Config for that pack doesn't exist
                LOG.debug(
                    'No config found for pack "%s" (file "%s" is not present).',
                    pack_name,
                    config_path,
                )
                continue

            try:
                self._register_config_for_pack(pack=pack_name, config_path=config_path)
            except Exception as e:
                if self._fail_on_failure:
                    msg = 'Failed to register config "%s" for pack "%s": %s' % (
                        config_path,
                        pack_name,
                        six.text_type(e),
                    )
                    raise ValueError(msg)

                LOG.exception(
                    'Failed to register config for pack "%s": %s',
                    pack_name,
                    six.text_type(e),
                )
            else:
                registered_count += 1

        return registered_count

        Register configs for all the available packs.
        
st2common/st2common/bootstrap/configsregistrar.py