Пример #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
Пример #2
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