def convert_jobsub_design(jobsub_design):
 action = get_root_action(jobsub_design)
 if (action is None):
  return None
 if (action.action_type == OozieMapreduceAction.ACTION_TYPE):
  action = _convert_jobsub_mapreduce_action(action)
 elif (action.action_type == OozieStreamingAction.ACTION_TYPE):
  action = _convert_jobsub_streaming_action(action)
 elif (action.action_type == OozieJavaAction.ACTION_TYPE):
  action = _convert_jobsub_java_action(action)
 else:
  return None
 action.name = jobsub_design.name
 action.description = jobsub_design.description
 return action

def convert_jobsub_design ( jobsub_design ) : action = get_root_action ( jobsub_design ) if ( action is None ) : return None if ( action . action_type == OozieMapreduceAction . ACTION_TYPE ) : action = _convert_jobsub_mapreduce_action ( action ) elif ( action . action_type == OozieStreamingAction . ACTION_TYPE ) : action = _convert_jobsub_streaming_action ( action ) elif ( action . action_type == OozieJavaAction . ACTION_TYPE ) : action = _convert_jobsub_java_action ( action ) else : return None action . name = jobsub_design . name action . description = jobsub_design . description return action
creates an oozie action from a jobsub design .