示例#1
0
文件: views.py 项目: 1oscar/horizon
 def get_data(self):
     try:
         data = saharaclient.nodegroup_template_list(self.request)
     except Exception:
         data = []
         exceptions.handle(self.request,
                           _("Unable to fetch node group template list."))
     return data
示例#2
0
 def get_data(self):
     try:
         data = saharaclient.nodegroup_template_list(self.request)
     except Exception:
         data = []
         exceptions.handle(self.request,
                           _("Unable to fetch node group template list."))
     return data
示例#3
0
文件: views.py 项目: MindMincer/oph
 def get_data(self):
     try:
         search_opts = {}
         filter = self.get_server_filter_info(self.request)
         if filter["value"] and filter["field"]:
             search_opts = {filter["field"]: filter["value"]}
         data = saharaclient.nodegroup_template_list(self.request, search_opts)
     except Exception:
         data = []
         exceptions.handle(self.request, _("Unable to fetch node group template list."))
     return data
示例#4
0
 def get_data(self):
     try:
         search_opts = {}
         filter = self.get_server_filter_info(self.request)
         if filter['value'] and filter['field']:
             search_opts = {filter['field']: filter['value']}
         data = saharaclient.nodegroup_template_list(self.request,
                                                     search_opts)
     except Exception:
         data = []
         exceptions.handle(self.request,
                           _("Unable to fetch node group template list."))
     return data