File: plugin.sh

package info (click to toggle)
python-openstacksdk 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,352 kB
  • sloc: python: 122,960; sh: 153; makefile: 23
file content (54 lines) | stat: -rw-r--r-- 1,164 bytes parent folder | download | duplicates (3)
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
# Install and configure **openstacksdk** library in devstack
#
# To enable openstacksdk in devstack add an entry to local.conf that looks like
#
# [[local|localrc]]
# enable_plugin openstacksdk https://opendev.org/openstack/openstacksdk

function preinstall_openstacksdk {
    :
}

function install_openstacksdk {
    if use_library_from_git "openstacksdk"; then
        # don't clone, it'll be done by the plugin install
        setup_dev_lib "openstacksdk"
    else
        pip_install "openstacksdk"
    fi
}

function configure_openstacksdk {
    :
}

function initialize_openstacksdk {
    :
}

function unstack_openstacksdk {
    :
}

function clean_openstacksdk {
    :
}

# This is the main for plugin.sh
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
    preinstall_openstacksdk
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
    install_openstacksdk
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
    configure_openstacksdk
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
    initialize_openstacksdk
fi

if [[ "$1" == "unstack" ]]; then
    unstack_openstacksdk
fi

if [[ "$1" == "clean" ]]; then
    clean_openstacksdk
fi