def create_app_from_template(self, image_name, name, template, name_in_template,<EOL>other_images=None, oc_new_app_args=None, project=None):
self.project = project or self.get_current_project()<EOL>oc_new_app_args = oc_new_app_args or []<EOL>repository, tag = list(name_in_template.items())[<NUM_LIT:0>]<EOL>self.import_image(repository + "<STR_LIT::>" + tag, image_name)<EOL>other_images = other_images or []<EOL>for o in other_images:<EOL><INDENT>image, tag = list(o.items())[<NUM_LIT:0>]<EOL>self.import_image(tag.split('<STR_LIT::>')[<NUM_LIT:0>] + "<STR_LIT::>" + tag.split('<STR_LIT::>')[<NUM_LIT:1>], image)<EOL><DEDENT>c = self._oc_command(["<STR_LIT>"] + [template] + oc_new_app_args + ["<STR_LIT>"] + [project]<EOL>+ ["<STR_LIT>" % name])<EOL>logger.info("<STR_LIT>", project)<EOL>try:<EOL><INDENT>o = run_cmd(c, return_output=True, ignore_status=True)<EOL>logger.debug(o)<EOL><DEDENT>except subprocess.CalledProcessError as ex:<EOL><INDENT>raise ConuException("<STR_LIT>" % ex)<EOL><DEDENT>return name<EOL>
Helper function to create app from template
:param image_name: image to be used as builder image
:param name: name of app from template
:param template: str, url or local path to a template to use
:param name_in_template: dict, {repository:tag} image name used in the template
:param other_images: list of dict, some templates need other image to be pushed into the
       OpenShift registry, specify them in this parameter as list of dict [{<image>:<tag>}],
       where "<image>" is image name with tag and "<tag>" is a tag under which the image
       should be available in the OpenShift registry.
:param oc_new_app_args: additional parameters for the `oc new-app`
:param project: project where app should be created, default: current project
:return: None