wrapper to launch acccords

parent e1fa3b96
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
# #
############################################################################## ##############################################################################
import os import os
import shutil
from slapos.recipe.librecipe import GenericBaseRecipe from slapos.recipe.librecipe import GenericBaseRecipe
from subprocess import Popen from subprocess import Popen
...@@ -50,16 +51,20 @@ class Recipe(GenericBaseRecipe): ...@@ -50,16 +51,20 @@ class Recipe(GenericBaseRecipe):
).communicate() ).communicate()
# Generate manifest # Generate manifest
manifest_origin_location = self.options['manifest'] manifest_origin_location = self.options['manifest-source']
manifest_location = self.options['manifest-destination'] manifest_location = self.options['manifest-destination']
self.createFile(manifest_origin_location, manifest_location) shutil.copy(manifest_origin_location, manifest_location)
path_list.append(manifest_location) path_list.append(manifest_location)
# Generate wrapper # Generate wrapper
# XXX create wrapper wrapper_config_dict = dict(
#path_list.append(self.createExecutable(self.options['server-wrapper'], poc_location=poc_location,
# self.substituteTemplate(self.getTemplateFilename('accords.in'), manifest_name=self.options['manifest-name'],
# config))) # XXX this is workaround
accords_lib_directory=self.options['accords_lib_directory'])
path_list.append(self.createExecutable(self.options['accords'],
self.substituteTemplate(self.getTemplateFilename('accords.in'),
wrapper_config_dict)))
return path_list return path_list
...@@ -24,8 +24,12 @@ domain = hardcode ...@@ -24,8 +24,12 @@ domain = hardcode
os-config = $${pocdirectory:poc}/os-config.xml os-config = $${pocdirectory:poc}/os-config.xml
# Paths # Paths
manifest = ${occi-manifest:location}/${occi-manifest:filename} manifest-source = ${occi-manifest:location}/${occi-manifest:filename}
manifest-destination = $${pocdirectory:poc}/manifest.xml manifest-destination = $${pocdirectory:poc}/manifest.xml
manifest-name = $${pocdirectory:poc}/manifest.xml
dash-location = TODO
# Workaround
accords_lib_directory : ${accords:location}/lib
# Binary information # Binary information
accords = ${accords:location}/bin/parser accords = ${accords:location}/bin/parser
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment