puppet-midonet/templates/agent/midolman.conf.erb

47 lines
1.5 KiB
Plaintext

# Copyright 2016 Midokura SARL
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
########################################################################
#
# DEPRECATION NOTICE
#
#
# This file is DEPRECATED. Although FULLY backwards compatible.
#
# The two values found here will only be used by MidoNet to
# find the zookeeper server that holds MidoNet configuration.
#
# Please read mn-conf(1) for further details.
#
# You can import your midolman.conf configuration into the
# new system by running `mn-conf import`. (Check the manual
# page for usage example and details).
#
#
########################################################################
[zookeeper]
<%- zkarr = Array.new -%>
<%- zk_hosts = Array.new -%>
<%- if @zookeeeper_hosts.class == Hash -%>
<%- zk_hosts.push(@zookeeper_hosts) -%>
<%- else -%>
<%- zk_hosts = @zookeeper_hosts -%>
<%- end -%>
<%- zk_hosts.each do |s| -%>
<%- zkarr.push("#{s['ip']}:#{s['port'] ||= 2181 }") -%>
<%- end -%>
zookeeper_hosts = <%= zkarr.join(",") %>