47ac546217
Listed below are the errors which were fixed as well as the actions taken to fix them: E010: do not on the same line as for --> let do and for in the same line E011: then not on the same line as if or elif --> let then and if or elif in the same line E020: Function declaration not in format ^function name {$ --> fix the format to suit ^function name {$ E041: Usage of $[ for arithmetic is deprecated for $(( --> fix from $[ to $(( E043: arithmetic compound has inconsistent return semantics --> do not use +=, ++, -=, --; use value=value+? instead. E001: check that lines do not end with trailing whitespace --> delete trailing whitespace E003: ensure all indents are a multiple of 4 spaces --> add/delete spaces E042: local declaration hides errors --> let declaration and assignment in two lines. Listed below are test cases done which run one controller and one compute in KVMs Test-Install ---- success Related: https://review.openstack.org/#/c/600663/ https://review.openstack.org/#/c/601221/ Story: 2003360 Task: 26213 Change-Id: I3ece37db3a326ea58bd344f43beefcbbbd4f0ad4 Signed-off-by: SidneyAn <ran1.an@intel.com>
55 lines
1.6 KiB
Bash
Executable File
55 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# devstack/plugin.sh
|
|
# Triggers stx_config specific functions to install and configure stx_config
|
|
|
|
# Dependencies:
|
|
#
|
|
# - ``functions`` file
|
|
# - ``DATA_DIR`` must be defined
|
|
|
|
# ``stack.sh`` calls the entry points in this order:
|
|
#
|
|
echo_summary "sysinv devstack plugin.sh called: $1/$2"
|
|
source $DEST/stx-config/devstack/lib/stx-config
|
|
# check for service enabled
|
|
|
|
if is_service_enabled sysinv-api sysinv-cond; then
|
|
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
|
# Perform installation of sysinv source
|
|
echo_summary "Installing cgts_client"
|
|
install_cgtsclient
|
|
echo_summary "Installing depends"
|
|
install_sysinv_depends
|
|
echo_summary "Installing sysinv service"
|
|
install_sysinv
|
|
|
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
|
# Configure after the other layer 1 and 2 services have been configured
|
|
echo_summary "Configuring sysinv"
|
|
configure_sysinv
|
|
create_sysinv_user_group
|
|
create_sysinv_accounts
|
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
|
# Initialize and start the sysinv service
|
|
echo_summary "Initializing and start sysinv "
|
|
init_sysinv
|
|
start_sysinv
|
|
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
|
|
# do sanity test for sysinv
|
|
echo_summary "do test-config"
|
|
fi
|
|
|
|
if [[ "$1" == "unstack" ]]; then
|
|
# Shut down sysinv services
|
|
echo_summary "Stop Sysinv service"
|
|
stop_sysinv
|
|
:
|
|
fi
|
|
|
|
if [[ "$1" == "clean" ]]; then
|
|
cleanup_sysinv
|
|
:
|
|
fi
|
|
fi
|