HewlettPackard/oneview-puppet

View on GitHub
docker/inspect.sh.example

Summary

Maintainability
Test Coverage
################################################################################
# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
#
# 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 [ $# -eq 0 ]
  then
    echo "No arguments supplied: Please give the command you want to pass to the docker conatianer e.g. bash"
    exit 1
fi

proxy='{proxy}'
no_proxy='{no-proxy}'

docker run  -it \
            -v $(pwd)/:/puppet \
            -e ONEVIEW_URL='{url}' \
            -e ONEVIEW_USER='{user}' \
            -e ONEVIEW_PASSWORD='{password}' \
            -e ONEVIEW_SSL_ENABLED=false, \
            -e ONEVIEW_LOG_LEVEL='info' \
            -e ONEVIEW_API_VERSION=200 \
            -e HTTP_PROXY=$proxy \
            -e HTTPS_PROXY=$proxy \
            -e http_proxy=$proxy \
            -e https_proxy=$proxy    \
            -e no_proxy=$no_proxy \
            puppet-oneview-ruby $1

#Example param for using token instead of username/password
#-e ONEVIEW_TOKEN='ABCDEFGH1234...' \