- print form.cleaned_data
-
- desc = JobDescription(Credential(request.session['proxy']))
-
- application = form.cleaned_data['application']
- if '/' in application:
- app, ver = application.split('1', 1)
- desc.application.set_name(app)
- desc.application.set_version(ver)
- else:
- desc.application.set_name(application)
-
- # TODO script
- # TODO executable
- desc.arguments = form.cleaned_data['arguments']
- desc.note = form.cleaned_data['note']
- desc.grant = form.cleaned_data['grant']
- desc.host_candidates = [(form.cleaned_data['host'], 'type?')] # FIXME WTF ?!?
- desc.properties = form.cleaned_data['properties']
- # TODO queue
- # TODO procs
- # TODO nodes
- desc.wall_time = timedelta(seconds=form.cleaned_data['wall_time']) # FIXME odpowiedni typ pola
- desc.memory = form.cleaned_data['memory']
- desc.memory_per_slot = form.cleaned_data['memory_per_slot']
- desc.variable = [(env['name'], env['value']) for env in env_formset.cleaned_data if not env['DELETE']]
- desc.modules = form.cleaned_data['modules']
- desc.natives = form.cleaned_data['native']
- desc.reservation = ("LOCAL", form.cleaned_data['reservation'])
- # TODO input
- # TODO stage_in
- # TODO stage_out
- # TODO monitoring
- # TODO notify_type
- # TODO notify_address
- # TODO watch_output_type
- # TODO watch_output_address
- # TODO watch_output_pattern
- # TODO preprocess_type
- # TODO preprocess_cmd
- # TODO preprocess_script
- # TODO postprocess_type
- # TODO postprocess_cmd
- # TODO postprocess_script
- desc.persistent = form.cleaned_data['persistent']
-
- for prop in ('arguments', 'note', 'grant', 'host_candidates', 'wall_time', 'memory',
- 'memory_per_slot', 'properties', 'variable', 'modules', 'natives', 'persistent', 'reservation'):
- print prop, type(getattr(desc, prop)), repr(getattr(desc, prop))
-
- print desc.xml_description