Commit fd5f808b authored by Nicolas Wavrant's avatar Nicolas Wavrant

slapconfiguration: returns also slapuser

parent 58e4f80e
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
import json import json
import os import os
import pwd
import slapos.slap import slapos.slap
from slapos.recipe.librecipe import unwrap from slapos.recipe.librecipe import unwrap
...@@ -105,6 +106,8 @@ class Recipe(object): ...@@ -105,6 +106,8 @@ class Recipe(object):
anyway, and are available through "configuration" output key. anyway, and are available through "configuration" output key.
instance-state instance-state
The instance state. The instance state.
slapuser
The username associated to the slappart.
""" """
# XXX: used to detect if a configuration key is a valid section key. This # XXX: used to detect if a configuration key is a valid section key. This
...@@ -122,6 +125,8 @@ class Recipe(object): ...@@ -122,6 +125,8 @@ class Recipe(object):
options['configuration.' + key] = value options['configuration.' + key] = value
def fetch_parameter_dict(self, options, instance_root): def fetch_parameter_dict(self, options, instance_root):
options['slapuser'] = str(pwd.getpwuid(os.getuid()).pw_name)
slap = slapos.slap.slap() slap = slapos.slap.slap()
slap.initializeConnection( slap.initializeConnection(
options['url'], options['url'],
......
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