[buildout]
parts =
  directory
  lte-mme-request
  publish-connection-information

extends = {{ monitor_template }}

eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true

[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}

[directory]
recipe = slapos.cookbook:mkdirectory
software = {{ buildout_directory }}
home = ${buildout:directory}
etc = ${:home}/etc
var = ${:home}/var
etc = ${:home}/etc
bin = ${:home}/bin
run = ${:var}/run
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
log = ${:var}/log

[request-common-base]
recipe = slapos.cookbook:request.serialised
software-url = {{ slap_connection['software-release-url'] }}
server-url = {{ slap_connection['server-url'] }}
computer-id = {{ slap_connection['computer-id'] }}
partition-id = {{ slap_connection['partition-id'] }}
key-file = {{ slap_connection['key-file'] }}
cert-file = {{ slap_connection['cert-file'] }}

sla-computer_guid = {{ slap_connection['computer-id'] }}

config-monitor-password = ${monitor-htpasswd:passwd}
return = monitor-base-url epc-ip

[lte-mme-request]
<= request-common-base
name = MME
software-type = mme
config-name = mme
{%- for key, value in slapparameter_dict.iteritems() %}
config-{{ key }} = {{ dumps(value) }}
{% endfor -%}
config-slave-list = {{ dumps(slave_instance_list) }}

[monitor-base-url-dict]
lte-mme-request =  ${lte-mme-request:connection-monitor-base-url}

[publish-connection-information]
recipe = slapos.cookbook:publish.serialised
<= monitor-publish
epc-ip =  ${lte-mme-request:connection-epc-ip}
