"Fossies" - the Fresh Open Source Software Archive

Member "keystone-19.0.0/devstack/plugin.sh" (14 Apr 2021, 2669 Bytes) of package /linux/misc/openstack/keystone-19.0.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "plugin.sh": 18.0.0_vs_19.0.0.

    1 #!/usr/bin/env bash
    2 # Copyright 2016 Massachusetts Open Cloud
    3 #
    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
    7 #
    8 #      http://www.apache.org/licenses/LICENSE-2.0
    9 #
   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
   14 # under the License.
   15 
   16 KEYSTONE_PLUGIN=$DEST/keystone/devstack
   17 source $KEYSTONE_PLUGIN/lib/federation.sh
   18 source $KEYSTONE_PLUGIN/lib/scope.sh
   19 
   20 # For more information on Devstack plugins, including a more detailed
   21 # explanation on when the different steps are executed please see:
   22 # https://docs.openstack.org/devstack/latest/plugins.html
   23 
   24 if [[ "$1" == "stack" && "$2" == "install" ]]; then
   25     # This phase is executed after the projects have been installed
   26     echo "Keystone plugin - Install phase"
   27     if is_service_enabled keystone-saml2-federation; then
   28         install_federation
   29     fi
   30 
   31 elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
   32     # This phase is executed after the projects have been configured and
   33     # before they are started
   34     echo "Keystone plugin - Post-config phase"
   35     if is_service_enabled keystone-saml2-federation; then
   36         configure_federation
   37     fi
   38 
   39 elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
   40     # This phase is executed after the projects have been started
   41     echo "Keystone plugin - Extra phase"
   42     if is_service_enabled keystone-saml2-federation; then
   43         register_federation
   44     fi
   45 elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
   46     # This phase is executed after Tempest was configured
   47     echo "Keystone plugin - Test-config phase"
   48     if is_service_enabled keystone-saml2-federation; then
   49         configure_tests_settings
   50     fi
   51     if [[ "$(trueorfalse False KEYSTONE_ENFORCE_SCOPE)" == "True" ]] ; then
   52         # devstack and tempest assume enforce_scope is false, so need to wait
   53         # until the final phase to turn it on
   54         configure_enforce_scope
   55         configure_protection_tests
   56     fi
   57 fi
   58 
   59 if [[ "$1" == "unstack" ]]; then
   60     # Called by unstack.sh and clean.sh
   61     # Undo what was performed during the "post-config" and "extra" phases
   62     :
   63 fi
   64 
   65 if [[ "$1" == "clean" ]]; then
   66     # Called by clean.sh after the "unstack" phase
   67     # Undo what was performed during the "install" phase
   68     if is_service_enabled keystone-saml2-federation; then
   69         uninstall_federation
   70     fi
   71 fi