cloud_clients/gcp.py
async def validate_compute_engine_api_available(self, project: Project) -> Optional[Project]:
        """
        return the project if Compute Engine available else None
        """
        try:
            path = self.filter_compute_engine_enabled_projects_path.format(project=project.id)
            await self.compute_client.get(path=path, response_type=dict)
        except HTTPError as e:
            if e.status == HTTPStatus.FORBIDDEN:
                return None
            raise e
        return project

        return the project if Compute Engine available else None
        
return the project if Compute Engine available else None
return the project if Compute Engine available else None
async def validate_compute_engine_api_available(self, project: Project) -> Optional[Project]:
        try:
            path = self.filter_compute_engine_enabled_projects_path.format(project=project.id)
            await self.compute_client.get(path=path, response_type=dict)
        except HTTPError as e:
            if e.status == HTTPStatus.FORBIDDEN:
                return None
            raise e
        return project
async def validate_compute_engine_api_available ( self , project : Project ) -> Optional [ Project ] : try : path = self . filter_compute_engine_enabled_projects_path . format ( project = project . id ) await self . compute_client . get ( path = path , response_type = dict ) except HTTPError as e : if e . status == HTTPStatus . FORBIDDEN : return None raise e return project
return the project if Compute Engine available else None
return the project if Compute Engine available else None
"""
        return the project if Compute Engine available else None
        """
self
project
Project