c5c28361cc
It will allow us to test how Sahara works for non-admin user. Register image in Sahara under admin user and make it public. Change-Id: Iae0684d865951e8bd419498a3de4e50c603b61ae
44 lines
1.3 KiB
Bash
44 lines
1.3 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Copyright (c) 2015 Mirantis Inc.
|
|
#
|
|
# 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.
|
|
|
|
export NETWORK=${1:-neutron}
|
|
export ENGINE=${2:-heat}
|
|
|
|
# Normalize network name
|
|
if [[ $NETWORK == nova* ]]; then
|
|
export NETWORK="nova-network"
|
|
fi
|
|
|
|
source settings
|
|
|
|
export DEST=${DEST:-$BASE/new}
|
|
export DEVSTACK_DIR=${DEVSTACK_DIR:-$DEST/devstack}
|
|
export SAHARA_DIR=${SAHARA_DIR:-$DEST/sahara}
|
|
|
|
export LOCALRC_PATH=$DEVSTACK_DIR/localrc
|
|
export LOCALCONF_PATH=$DEVSTACK_DIR/local.conf
|
|
|
|
function sahara_register_fake_plugin_image {
|
|
local props="--public"
|
|
props+=" --property _sahara_tag_0.1=True"
|
|
props+=" --property _sahara_tag_fake=True"
|
|
props+=" --property _sahara_username=$SAHARA_FAKE_PLUGIN_IMAGE_USERNAME"
|
|
|
|
openstack --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image set \
|
|
$SAHARA_FAKE_PLUGIN_IMAGE_NAME $props
|
|
}
|