From 2e7b4f2027a1147ca28301e4f88adf8274b39a1f Mon Sep 17 00:00:00 2001 From: DUVAL Thomas Date: Thu, 9 Jun 2016 09:11:50 +0200 Subject: Update Keystone core to Mitaka. Change-Id: Ia10d6add16f4a9d25d1f42d420661c46332e69db --- keystone-moon/tools/pretty_tox_py3.sh | 12 +++++++++ keystone-moon/tools/sample_data.sh | 49 ++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 10 deletions(-) create mode 100755 keystone-moon/tools/pretty_tox_py3.sh (limited to 'keystone-moon/tools') diff --git a/keystone-moon/tools/pretty_tox_py3.sh b/keystone-moon/tools/pretty_tox_py3.sh new file mode 100755 index 00000000..9bb72bb8 --- /dev/null +++ b/keystone-moon/tools/pretty_tox_py3.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +set -o pipefail + +TESTRARGS=`python -c 'print ("^((?!%s).)*$" % "|".join(f.strip() for f in open("tests-py3-blacklist.txt")))'` +python setup.py testr --testr-args="--subunit $TESTRARGS" | subunit-trace -f +retval=$? +# NOTE(mtreinish) The pipe above would eat the slowest display from pbr's testr +# wrapper so just manually print the slowest tests. +echo -e "\nSlowest Tests:\n" +testr slowest +exit $retval diff --git a/keystone-moon/tools/sample_data.sh b/keystone-moon/tools/sample_data.sh index bb1eada8..ce407431 100755 --- a/keystone-moon/tools/sample_data.sh +++ b/keystone-moon/tools/sample_data.sh @@ -32,10 +32,11 @@ # Tenant User Roles # ------------------------------------------------------- # demo admin admin -# service glance admin -# service nova admin -# service ec2 admin -# service swift admin +# service glance service +# service nova service +# service ec2 service +# service swift service +# service neutron service # By default, passwords used are those in the OpenStack Install and Deploy Manual. # One can override these (publicly known, and hence, insecure) passwords by setting the appropriate @@ -53,6 +54,7 @@ NOVA_PASSWORD=${NOVA_PASSWORD:-${SERVICE_PASSWORD:-nova}} GLANCE_PASSWORD=${GLANCE_PASSWORD:-${SERVICE_PASSWORD:-glance}} EC2_PASSWORD=${EC2_PASSWORD:-${SERVICE_PASSWORD:-ec2}} SWIFT_PASSWORD=${SWIFT_PASSWORD:-${SERVICE_PASSWORD:-swiftpass}} +NEUTRON_PASSWORD=${NEUTRON_PASSWORD:-${SERVICE_PASSWORD:-neutron}} CONTROLLER_PUBLIC_ADDRESS=${CONTROLLER_PUBLIC_ADDRESS:-localhost} CONTROLLER_ADMIN_ADDRESS=${CONTROLLER_ADMIN_ADDRESS:-localhost} @@ -98,6 +100,14 @@ function get_id () { echo `"$@" | grep ' id ' | awk '{print $4}'` } +# +# Roles +# + +openstack role create admin + +openstack role create service + # # Default tenant # @@ -107,8 +117,6 @@ openstack project create demo \ openstack user create admin --project demo \ --password "${ADMIN_PASSWORD}" -openstack role create admin - openstack role add --user admin \ --project demo\ admin @@ -124,28 +132,35 @@ openstack user create glance --project service\ openstack role add --user glance \ --project service \ - admin + service openstack user create nova --project service\ --password "${NOVA_PASSWORD}" openstack role add --user nova \ --project service \ - admin + service openstack user create ec2 --project service \ --password "${EC2_PASSWORD}" openstack role add --user ec2 \ --project service \ - admin + service openstack user create swift --project service \ --password "${SWIFT_PASSWORD}" \ openstack role add --user swift \ --project service \ - admin + service + +openstack user create neutron --project service \ + --password "${NEUTRON_PASSWORD}" \ + +openstack role add --user neutron \ + --project service \ + service # # Keystone service @@ -231,6 +246,20 @@ if [[ -z "$DISABLE_ENDPOINTS" ]]; then swift fi +# +# Neutron service +# +openstack service create --name=neutron \ + --description="Neutron Network Service" \ + network +if [[ -z "$DISABLE_ENDPOINTS" ]]; then + openstack endpoint create --region RegionOne \ + --publicurl "http://$CONTROLLER_PUBLIC_ADDRESS:9696" \ + --adminurl "http://$CONTROLLER_ADMIN_ADDRESS:9696" \ + --internalurl "http://$CONTROLLER_INTERNAL_ADDRESS:9696" \ + neutron +fi + # create ec2 creds and parse the secret and access key returned ADMIN_USER=$(get_id openstack user show admin) RESULT=$(openstack ec2 credentials create --project service --user $ADMIN_USER) -- cgit 1.2.3-korg