cloud_resource_manager.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:forseti-security 作者: GoogleCloudPlatform 项目源码 文件源码
def get_project_ancestry(self, project_id):
        """Get the full folder ancestry for a project.

        Args:
            project_id (str): Either the project number or the project id.

        Returns:
            list: The ancesters of the project, in order from direct parent to
                root organization id.
        """
        try:
            results = self.repository.projects.get_ancestry(project_id)
            return results.get('ancestor', [])
        except (errors.HttpError, HttpLib2Error) as e:
            raise api_errors.ApiExecutionError(project_id, e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号