Jupyter: Switch to using JSON in instance parameters
authorKirill Smelkov <kirr@nexedi.com>
Wed, 27 Jan 2016 08:30:23 +0000 (11:30 +0300)
committerKirill Smelkov <kirr@nexedi.com>
Wed, 27 Jan 2016 08:30:23 +0000 (11:30 +0300)
commit7b199c9c68c60b4c430c2311e3cd67e42d010ae6
treec451000fcf555f85d4ceaf279049d708adea7655
parentdf055066d0479bf98915a8e71a67115e66839681
Jupyter: Switch to using JSON in instance parameters

The reason is: we are going to integrate Jupyter into ERP5 SR, and in
ERP5 SR code, there is already established infrastructure, which
requests slave instances. That infrastructure passes parameters in
serialized (= json) form, that's why we need to switch.

On the other hand, slapos.cookbook:slapconfiguration.serialised handles
non-json instance parameters as well: when there parameters format is
not

    {'_' -> <json>}

it decodes them as slapos.cookbook:slapconfiguration would do:

    https://lab.nexedi.com/nexedi/slapos/blob/69229988/slapos/recipe/slapconfiguration.py#L232
    https://lab.nexedi.com/nexedi/slapos/blob/69229988/slapos/recipe/librecipe/__init__.py#L51

So from this point of view, though we don't really need it here (Jupyter
SR is relatively new), we are staying backward compatible.

/cc @tiwariayush
software/ipython_notebook/instance.cfg.in
software/ipython_notebook/software.cfg