+
+def inject_calipso_installer(tmp_dir, image):
+ """
+ Downloads calipso installer script from artifacts.opnfv.org
+ and puts it under /root/ for further installation process.
+ :return:
+ """
+ calipso_file = os.path.basename(con.CALIPSO_INSTALLER_URL)
+ calipso_url = con.CALIPSO_INSTALLER_URL.replace(calipso_file, '')
+ utils.fetch_upstream_and_unpack(tmp_dir, calipso_url, [calipso_file])
+
+ virt_ops = [
+ {con.VIRT_UPLOAD: "{}/{}:/root/".format(tmp_dir, calipso_file)}]
+ virt_utils.virt_customize(virt_ops, image)
+ logging.info("Calipso injected into {}".format(image))
+
+# TODO(trozet): add unit testing for calipso injector