2 # Copyright 2017 Cisco Systems, Inc. All rights reserved.
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
17 if [ -z "$1" ] || [ $1 != 'start_rest_server' ]; then
20 PARAMS="--server /tmp/http_root"
21 if [ -n "$HOST" ]; then
22 PARAMS+=" --host $HOST"
24 if [ -n "$PORT" ]; then
25 PARAMS+=" --port $PORT"
27 if [ -n "$OPENRC" ]; then
28 if [ -f "$OPENRC" ]; then
29 PARAMS+=" -c \"openrc_file: $OPENRC\""
31 echo "Aborting... Openrc config file cannot be found in the given path: $OPENRC"
35 echo "Aborting... Openrc config path is absent"
38 eval "nfvbench $PARAMS"