File: plugin.sh

package info (click to toggle)
cyborg 15.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,612 kB
  • sloc: python: 17,958; sh: 346; makefile: 67; pascal: 66
file content (57 lines) | stat: -rw-r--r-- 1,960 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/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