Commit 69b53acc authored by Antoine Catton's avatar Antoine Catton

Remove promise

parent 84ac80ef
......@@ -110,7 +110,6 @@ setup(name=name,
'siptester = slapos.recipe.siptester:SipTesterRecipe',
'simplelogger = slapos.recipe.simplelogger:Recipe',
'slapcontainer = slapos.recipe.container:Recipe',
'slapcontainer.promise = slapos.recipe.container:Promise',
'slaprunner = slapos.recipe.slaprunner:Recipe',
'slapmonitor = slapos.recipe.slapmonitor:Recipe',
'slapreport = slapos.recipe.slapreport:Recipe',
......
......@@ -39,35 +39,6 @@ import subprocess
from slapos.recipe.librecipe import GenericSlapRecipe
from slapos.recipe.librecipe import GenericBaseRecipe
def promise_func(args):
output = subprocess.check_output(
[args['lxc-info'], '-n', args['name']]
)
if 'RUNNING' in output:
return 0
else:
return 127
class Promise(GenericBaseRecipe):
def install(self):
return [
self.createPythonScript(
self.options['promise'],
'slapos.recipe.container.promise_func',
{
'lxc-info': self.options['lxc-info'],
'name': self.options['slapcontainer-name']
}
)
]
class Recipe(GenericSlapRecipe):
def _options(self, options):
......
......@@ -7,7 +7,6 @@ offline = true
parts =
slapcontainer
rootfs
slapcontainer-promise
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
......@@ -18,7 +17,6 @@ srv = $${buildout:directory}/srv
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
promises = $${rootdirectory:etc}/promise
[slapcontainer]
recipe = slapos.cookbook:slapcontainer
......@@ -29,12 +27,6 @@ image = $${rootfs:downloaded-image}
image-complete = $${rootfs:downloaded-image-complete}
tmp-dir = $${rootdirectory:tmp}/slapcontainer/
[slapcontainer-promise]
recipe = slapos.cookbook:slapcontainer.promise
promise = $${basedirectory:promises}/slapcontainer
lxc-info = ${lxc:location}/bin/lxc-info
slapcontainer-name = $${slapcontainer:slapcontainer-name}
[rootfs]
recipe = slapos.cookbook:rootfs
image-url = $${slap-parameter:rootfs}
......
......@@ -28,7 +28,7 @@ mode = 0644
[template-lxc]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-lxc.cfg
md5sum = 901fd10e1404d10aa399b3dffcf68845
md5sum = d8e6bdee05b602c63de821c2f92a660f
output = ${buildout:directory}/template-lxc.cfg
mode = 0644
......
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