Return correct result when creating cloud LXC container

At the end of call chain lxc.init returns boolean result, exactly what
we need and not vice verse.
This commit is contained in:
cellscape 2015-05-08 12:04:10 +06:00
parent 377015c881
commit 4409eabb83

View file

@ -423,8 +423,7 @@ def create(vm_, call=None):
kwarg['host'] = prov['target']
cret = _runner().cmd('lxc.cloud_init', [vm_['name']], kwarg=kwarg)
ret['runner_return'] = cret
if cret['result']:
ret['result'] = False
ret['result'] = cret['result']
if not ret['result']:
ret['Error'] = 'Error while creating {0},'.format(vm_['name'])
return ret