Alejandro Andreu f0324311a0 Adds GW type/class (both BGP and static uplinks)
Change-Id: I52a6cce14566469d67c07fd488972a245bc7b73f
2016-07-26 15:52:50 +02:00

59 lines
1.7 KiB
Plaintext

#!/usr/bin/env bash
# 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.
# If you want to override these variables, create a file called 'localrc'
# and place it in the same directory as this file.
# rc file(s) location
RC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
# allow local overrides of env variables
if [[ -f $RC_DIR/localrc ]]; then
source $RC_DIR/localrc
fi
# IP address/hostname to use for the services
SERVICE_HOST=<%= @service_host %>
# Directory where all the service files will live
SERVICE_DIR=<%= @service_dir %>
USE_SCREEN="True"
# ZK Hosts (comma delimited)
<%- zkarr = Array.new -%>
<%- @zookeeper_hosts.each do |s| -%>
<%- zkarr.push("#{s['ip']}:#{s['port'] ||= 2181 }") -%>
<%- end -%>
ZOOKEEPER_HOSTS=<%= zkarr.join(",") %>
# MidoNet API port and URI
API_PORT=<%= @api_port %>
API_URI=http://$SERVICE_HOST:$API_PORT/midonet-api
MIDO_DB_USER=<%= @mido_db_user %>
MIDO_DB_PASSWORD=<%= @mido_db_password %>
# MidoNet Client
# --------------
# Auth variables. They are exported so that you could source this file and
# run midonet-cli using these credentials
export MIDO_API_URL=$API_URI
export MIDO_USER=${MIDO_USER:-admin}
export MIDO_PROJECT_ID=${MIDO_PROJECT_ID:-admin}
export MIDO_PASSWORD=${MIDO_PASSWORD:-midonet}