Replace the local flake8 hook with upstream pre-commit-hooks, autopep8, and openstack/hacking. Add hooks for JSON validation, shebang/executable consistency, large file detection, and case-conflict checks. we use the hacking hook to provide the correct version fo flake8 instead of usign the local flake8 hook and addtionally installing hacking. Fix violations caught by the new hooks: - Remove spurious shebangs from non-executable module files (fpga and nic prepare_test_data.py, devstack lib and plugin) - Make tools/flake8wrap.sh executable to match its shebang - Exclude *-curl.json doc samples from JSON validation (they contain curl commands, not bare JSON) - Fix PEP8 blank line spacing in devspec.py and middleware Generated-By: claude-code sonnet 4.6 Change-Id: Ideda2a6d1f31765484bfacc05ebba0785d427968 Signed-off-by: Sean Mooney <work@seanmooney.info>
57 lines
1.9 KiB
Bash
57 lines
1.9 KiB
Bash
# plugin.sh - devstack plugin for cyborg
|
|
|
|
# devstack plugin contract defined at:
|
|
# https://docs.openstack.org/devstack/latest/plugins.html
|
|
|
|
echo_summary "cyborg devstack plugin.sh called: $1/$2"
|
|
source $DEST/cyborg/devstack/lib/cyborg
|
|
|
|
case $1 in
|
|
"stack")
|
|
case $2 in
|
|
"pre-install")
|
|
clone_cyborg_client
|
|
;;
|
|
"install")
|
|
echo_summary "Installing Cyborg"
|
|
install_cyborg
|
|
install_cyborg_client
|
|
;;
|
|
"post-config")
|
|
# stack/post-config - Called after the layer 0 and 2 services
|
|
# have been configured. All configuration files for enabled
|
|
# services should exist at this point.
|
|
echo_summary "Configuring Cyborg"
|
|
configure_cyborg
|
|
create_cyborg_accounts
|
|
;;
|
|
"extra")
|
|
# stack/extra - Called near the end after layer 1 and 2
|
|
# services have been started.
|
|
# Initialize cyborg
|
|
init_cyborg
|
|
# Start the cyborg API and cyborg taskmgr components
|
|
echo_summary "Starting Cyborg"
|
|
start_cyborg
|
|
;;
|
|
"test-config")
|
|
# stack/test-config - Called at the end of devstack used to configure tempest
|
|
# or any other test environments
|
|
if is_service_enabled tempest; then
|
|
echo_summary "Configuring Tempest for Cyborg needs"
|
|
cyborg_configure_tempest
|
|
fi
|
|
;;
|
|
esac
|
|
;;
|
|
"unstack")
|
|
# unstack - Called by unstack.sh before other services are shut down.
|
|
stop_cyborg
|
|
;;
|
|
"clean")
|
|
# clean - Called by clean.sh before other services are cleaned, but after
|
|
# unstack.sh has been called.
|
|
cleanup_cyborg
|
|
;;
|
|
esac
|