Exemplo n.º 1
0
 def GET(self, cluster_id, role_name):
     """:returns: JSON-ed metadata for the role
         :http:
         * 200 (OK)
         * 404 (no such object found)
     """
     cluster = self.get_object_or_404(objects.Cluster, cluster_id)
     self._check_role(cluster, role_name)
     return RoleSerializer.serialize_from_cluster(cluster, role_name)
Exemplo n.º 2
0
 def GET(self, cluster_id, role_name):
     """:returns: JSON-ed metadata for the role
         :http:
         * 200 (OK)
         * 404 (no such object found)
     """
     cluster = self.get_object_or_404(objects.Cluster, cluster_id)
     self._check_role(cluster, role_name)
     return RoleSerializer.serialize_from_cluster(cluster, role_name)
Exemplo n.º 3
0
 def GET(self, cluster_id):
     """:returns: collection of JSON-ed cluster roles metadata
         :http:
         * 200 (OK)
         * 404 (no such object found)
     """
     cluster = self.get_object_or_404(objects.Cluster, cluster_id)
     roles_names = six.iterkeys(objects.Cluster.get_roles(cluster))
     return [RoleSerializer.serialize_from_cluster(cluster, name)
             for name in roles_names]
Exemplo n.º 4
0
 def GET(self, cluster_id):
     """:returns: collection of JSON-ed cluster roles metadata
         :http:
         * 200 (OK)
         * 404 (no such object found)
     """
     cluster = self.get_object_or_404(objects.Cluster, cluster_id)
     roles_names = six.iterkeys(objects.Cluster.get_roles(cluster))
     return [
         RoleSerializer.serialize_from_cluster(cluster, name)
         for name in roles_names
     ]