(self, cluster_template_ident)
return ClusterTemplate.convert_with_links(cluster_template)
Retrieve information about the given ClusterTemplate.

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

        :param cluster_template_ident: UUID or logical name of a
        ClusterTemplate.
        """
        context = pecan.request.context

        if context.is_admin:
            policy.enforce(context, "clustertemplate:get_one_all_projects",
                           action="clustertemplate: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_template = api_utils.get_resource('ClusterTemplate',
                                                  cluster_template_ident)

        if not cluster_template.public:
            policy.enforce(context, 'clustertemplate:get',
                           cluster_template.as_dict(),
                           action='clustertemplate:get')

        return ClusterTemplate.convert_with_links(cluster_template)
def get_one ( self , cluster_template_ident ) : context = pecan . request . context if context . is_admin : policy . enforce ( context , "clustertemplate:get_one_all_projects" , action = "clustertemplate: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_template = api_utils . get_resource ( 'ClusterTemplate' , cluster_template_ident ) if not cluster_template . public : policy . enforce ( context , 'clustertemplate:get' , cluster_template . as_dict ( ) , action = 'clustertemplate:get' ) return ClusterTemplate . convert_with_links ( cluster_template )