Example #1
0
 def populate_property_name_choices(self, request, context):
     job_id = request.REQUEST.get("job_id") or request.REQUEST.get("job")
     job_type = saharaclient.job_get(request, job_id).type
     job_configs = (
         saharaclient.job_get_configs(request, job_type).job_config)
     choices = [(param['value'], param['name'])
                for param in job_configs['configs']]
     return choices
Example #2
0
 def populate_property_name_choices(self, request, context):
     req = request.GET or request.POST
     job_id = req.get("job_id") or req.get("job")
     job_type = saharaclient.job_get(request, job_id).type
     job_configs = (
         saharaclient.job_get_configs(request, job_type).job_config)
     choices = [(param['value'], param['name'])
                for param in job_configs['configs']]
     return choices