Commit c21af464 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7ceda87f
......@@ -13,7 +13,7 @@
{# ru_dict keeps RU slave instances + RU whose definition is embedded into a cell: reference -> RU #}
{% set cell_dict = {} %}
{% set ru_dict = {} %}
{%- for slave in slave_instance_list %}
{%- for slave in slap_configuration.get('slave_instance_list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- if 'ru_type' in _ %}
......@@ -67,16 +67,16 @@
{# jref_of_shared returns original reference used to request shared instance.
it is extracted from slave_reference which is composed as <partition_id>_<reference>. #}
{%- macro jref_of_shared(slave) %}
{%- set ref = slave['slave_reference'] %}
{%- set partition_id %}{{partition_id}}{%- endset %}
{%- if ref.startswith(partition_id) %}
{%- set ref = ref[len(partition_id):] %}
{%- endif %}
{%- if ref.startswith('_') %}
{%- set ref = ref[1:] %}
{%- endif %}
{{ ref | tojson }}
{%- endmacro %}
{%- set ref = slave['slave_reference'] %}
{%- set partition_id = slap_configuration['partition'] %}
{%- if ref.startswith(partition_id) %}
{%- set ref = ref[len(partition_id):] %}
{%- endif %}
{%- if ref.startswith('_') %}
{%- set ref = ref[1:] %}
{%- endif %}
{{ ref | tojson }}
{%- endmacro %}
......
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