Commit d234ab8a authored by Jérome Perrin's avatar Jérome Perrin

software/cloudooo: use slapos.cookbook:switch-softwaretype

Porting to switch-softwaretype involves:
 - use recipe slapos.cookbook:switch-softwaretype instead of slapos.cookbook:softwaretype
 - don't render software type profiles, only use cloudooo-dynamic-template:rendered
  instead of ${cloudooo-dynamic-template:rendered}, the profile will be rendered
  later.
 - have a RootSoftwareInstance default alias
 - have a part reading parameters using slapos.cookbook:slapconfiguration
  named slap-configuration. This is what slapos.cookbook:switch-softwaretype
  expects. Here we renamed the existing part.

At the same time, remove slap-connection that was added as backward compatibility,
slapos.core supports this since commit 0fbed0d1 (Migrate slap_connection to
 slap-connection, and use variables names separated with '-'., 2012-09-18) that
was part of release 0.29
parent 028daccb
......@@ -14,7 +14,7 @@
# not need these here).
[template-cloudooo]
filename = instance.cfg.in
md5sum = 6e4431cf4b0a0d034402604b1e2844c0
md5sum = e986de01a57161b32425f1cd3ccac924
[template-cloudooo-instance]
filename = instance-cloudooo.cfg.in
......
......@@ -6,7 +6,7 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-parameters]
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
computer = ${slap-connection:computer-id}
partition = ${slap-connection:partition-id}
......@@ -19,10 +19,10 @@ recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
extra-context =
context =
key ipv6_set slap-parameters:ipv6
key ipv6_set slap-configuration:ipv6
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-parameters:configuration
key slapparameter_dict slap-configuration:configuration
${:extra-context}
[cloudooo-dynamic-template-parameter-dict]
......@@ -38,18 +38,10 @@ filename = instance-cloudooo.cfg
extensions = jinja2.ext.do
extra-context =
section parameter_dict cloudooo-dynamic-template-parameter-dict
key ipv4_set slap-parameters:ipv4
key ipv4_set slap-configuration:ipv4
import itertools itertools
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${cloudooo-dynamic-template:rendered}
[slap-connection]
# part to migrate to new - separated words
computer-id = ${slap_connection:computer_id}
partition-id = ${slap_connection:partition_id}
server-url = ${slap_connection:server_url}
software-release-url = ${slap_connection:software_release_url}
key-file = ${slap_connection:key_file}
cert-file = ${slap_connection:cert_file}
recipe = slapos.cookbook:switch-softwaretype
default = cloudooo-dynamic-template:rendered
RootSoftwareInstance = ${:default}
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