Example #1
0
 def get_data(self):
     try:
         jobs = saharaclient.job_list(self.request)
     except Exception:
         jobs = []
         exceptions.handle(self.request,
                           _("Unable to fetch jobs."))
     return jobs
Example #2
0
    def populate_job_choices(self, request):
        try:
            jobs = saharaclient.job_list(request)
        except Exception:
            jobs = []
            exceptions.handle(request, _("Unable to fetch jobs."))

        choices = [(job.id, job.name) for job in jobs]

        return choices
Example #3
0
    def populate_job_choices(self, request):
        try:
            jobs = saharaclient.job_list(request)
        except Exception:
            jobs = []
            exceptions.handle(request, _("Unable to fetch jobs."))

        choices = [(job.id, job.name) for job in jobs]

        return choices
Example #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']}
         jobs = saharaclient.job_list(self.request, search_opts)
     except Exception:
         jobs = []
         exceptions.handle(self.request, _("Unable to fetch jobs."))
     return jobs
Example #5
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']}
         jobs = saharaclient.job_list(self.request, search_opts)
     except Exception:
         jobs = []
         exceptions.handle(self.request,
                           _("Unable to fetch jobs."))
     return jobs