(self, cluster_ident)
return api_cluster
Retrieve information about the given Cluster.

        :param cluster_ident: UUID or logical name of the Cluster.
Retrieve information about the given Cluster.
Retrieve information about the given Cluster .
def get_one(self, cluster_ident):
        """Retrieve information about the given Cluster.

        :param cluster_ident: UUID or logical name of the Cluster.
        """
        context = pecan.request.context
        if context.is_admin:
            policy.enforce(context, "cluster:get_one_all_projects",
                           action="cluster:get_one_all_projects")
            # TODO(flwang): Instead of asking an extra 'all_project's
            # parameter, currently the design is allowing admin user to list
            # all clusters from all projects. But the all_tenants is one of
            # the condition to do project filter in DB API. And it's also used
            # by periodic tasks. So this could be removed in the future and
            # a new parameter 'project_id' would be added so that admin user
            # can list clusters for a particular project.
            context.all_tenants = True

        cluster = api_utils.get_resource('Cluster', cluster_ident)
        policy.enforce(context, 'cluster:get', cluster.as_dict(),
                       action='cluster:get')

        api_cluster = Cluster.convert_with_links(cluster)

        if api_cluster.status in fields.ClusterStatus.STATUS_FAILED:
            api_cluster.faults = self._collect_fault_info(context, cluster)

        return api_cluster
def get_one ( self , cluster_ident ) : context = pecan . request . context if context . is_admin : policy . enforce ( context , "cluster:get_one_all_projects" , action = "cluster:get_one_all_projects" ) # TODO(flwang): Instead of asking an extra 'all_project's # parameter, currently the design is allowing admin user to list # all clusters from all projects. But the all_tenants is one of # the condition to do project filter in DB API. And it's also used # by periodic tasks. So this could be removed in the future and # a new parameter 'project_id' would be added so that admin user # can list clusters for a particular project. context . all_tenants = True cluster = api_utils . get_resource ( 'Cluster' , cluster_ident ) policy . enforce ( context , 'cluster:get' , cluster . as_dict ( ) , action = 'cluster:get' ) api_cluster = Cluster . convert_with_links ( cluster ) if api_cluster . status in fields . ClusterStatus . STATUS_FAILED : api_cluster . faults = self . _collect_fault_info ( context , cluster ) return api_cluster