qry=cur.execute("SELECT connection_xml FROM partition13 WHERE connection_xml IS NOT NULL AND software_release=? AND partition_reference LIKE ?",(software_release,partition_reference))
qry=cur.execute("SELECT connection_xml FROM partition14 WHERE connection_xml IS NOT NULL AND software_release=? AND partition_reference LIKE ?",(software_release,partition_reference))
# Once caucase is merged and used by the master the need of this workarround will be gone, and
# A better configuration can be proposes
slap_ipv4=`/opt/slapos/parts/sqlite3/bin/sqlite3 /opt/slapos/slapproxy.db "select address from partition_network13 where partition_reference=(select reference from partition13 where software_type = 'balancer' and requested_by = (select reference from partition13 where partition_reference='{{ backend_instance_reference }}')) and netmask='255.255.255.255';"`
slap_ipv4=`/opt/slapos/parts/sqlite3/bin/sqlite3 /opt/slapos/slapproxy.db "select address from partition_network14 where partition_reference=(select reference from partition14 where software_type = 'balancer' and requested_by = (select reference from partition14 where partition_reference='{{ backend_instance_reference }}')) and netmask='255.255.255.255';"`
frontend_ipv4=`/opt/slapos/parts/sqlite3/bin/sqlite3 /opt/slapos/slapproxy.db "select address from partition_network13 where partition_reference=(select reference from partition13 where requested_by = (select reference from partition13 where partition_reference='{{ frontend_master_reference }}')) and netmask='255.255.255.255';"`
frontend_ipv4=`/opt/slapos/parts/sqlite3/bin/sqlite3 /opt/slapos/slapproxy.db "select address from partition_network14 where partition_reference=(select reference from partition14 where requested_by = (select reference from partition14 where partition_reference='{{ frontend_master_reference }}')) and netmask='255.255.255.255';"`