diff --git a/contrib/gate_hook.sh b/contrib/gate_hook.sh new file mode 100644 index 0000000..804f8b1 --- /dev/null +++ b/contrib/gate_hook.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -ex + +$BASE/new/devstack-gate/devstack-vm-gate.sh diff --git a/contrib/post_test_hook.sh b/contrib/post_test_hook.sh new file mode 100644 index 0000000..28b946e --- /dev/null +++ b/contrib/post_test_hook.sh @@ -0,0 +1,18 @@ +#!/bin/bash -xe + +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# This script is executed inside post_test_hook function in devstack gate. + +cd $BASE/new/devstack +source openrc admin admin diff --git a/contrib/pre_test_hook.sh b/contrib/pre_test_hook.sh new file mode 100644 index 0000000..7be21e8 --- /dev/null +++ b/contrib/pre_test_hook.sh @@ -0,0 +1,17 @@ +#!/bin/bash -xe +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +# This script is executed inside pre_test_hook function in devstack gate. + +export localconf=$BASE/new/devstack/local.conf diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 0000000..e8b4d21 --- /dev/null +++ b/devstack/plugin.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +# plugin.sh - DevStack plugin.sh dispatch script zun-ui + +BASE_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd) + +function install_k8s_cloud_provider { + echo_summary "Installing Devstack Plugin" +} + +function init_k8s_cloud_provider { + echo_summary "Initialize Devstack Plugin" +} + +function configure_k8s_cloud_provider { + echo_summary "Configuring Devstack Plugin" +} + +# check for service enabled +if is_service_enabled zun-ui; then + + if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then + # Set up system services + # no-op + : + + elif [[ "$1" == "stack" && "$2" == "install" ]]; then + # Perform installation of service source + # no-op + : + + elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + # Configure after the other layer 1 and 2 services have been configured + # no-op + : + + elif [[ "$1" == "stack" && "$2" == "extra" ]]; then + # no-op + : + fi + + if [[ "$1" == "unstack" ]]; then + # no-op + : + fi + + if [[ "$1" == "clean" ]]; then + # Remove state and transient data + # Remember clean.sh first calls unstack.sh + # no-op + : + fi +fi diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 0000000..a18a159 --- /dev/null +++ b/devstack/settings @@ -0,0 +1,2 @@ +# settings file for devstack plugin +enable_service k8s_cloud_provider