def register_aliases_from_pack(self, pack_dir):
        pack_dir = pack_dir[:-1] if pack_dir.endswith('/') else pack_dir
        _, pack = os.path.split(pack_dir)
        aliases_dir = self._pack_loader.get_content_from_pack(pack_dir=pack_dir,
                                                              content_type='aliases')

        # Register pack first
        self.register_pack(pack_name=pack, pack_dir=pack_dir)

        registered_count = 0
        if not aliases_dir:
            return registered_count

        LOG.debug('Registering aliases from pack %s:, dir: %s', pack, aliases_dir)

        try:
            aliases = self._get_aliases_from_pack(aliases_dir=aliases_dir)
            registered_count = self._register_aliases_from_pack(pack=pack, aliases=aliases)
        except Exception as e:
            if self._fail_on_failure:
                raise e

            LOG.exception('Failed registering all aliases from pack: %s', aliases_dir)
            return registered_count

        return registered_count
Register all the aliases from the provided pack.
dataset/ETHPy150Open StackStorm/st2/st2common/st2common/bootstrap/aliasesregistrar.py/AliasesRegistrar.register_aliases_from_pack