Adapt plugin-tests to run on real nailgun
Change-Id: I2e97be848f0acbeac919564d60a649d486dde0a4
This commit is contained in:
parent
af68503199
commit
5586bfaad4
|
@ -25,7 +25,7 @@ export CONF_PATH="${TESTS_ROOT}/${TESTS_DIR_NAME}/plugin_conf"
|
||||||
|
|
||||||
export NO_NAILGUN_START=${NO_NAILGUN_START:-0}
|
export NO_NAILGUN_START=${NO_NAILGUN_START:-0}
|
||||||
export FUEL_WEB_ROOT=$(readlink -f ${FUEL_WEB_ROOT:-"$(dirname $0)/../fuel-web"})
|
export FUEL_WEB_ROOT=$(readlink -f ${FUEL_WEB_ROOT:-"$(dirname $0)/../fuel-web"})
|
||||||
export ARTIFACTS=${ARTIFACTS:-"$(pwd)/test_run/ui_component"}
|
export ARTIFACTS=${ARTIFACTS:-"$(pwd)/test_run/${TESTS_DIR_NAME}"}
|
||||||
|
|
||||||
export PLUGIN_RPM=${PLUGIN_RPM:-''}
|
export PLUGIN_RPM=${PLUGIN_RPM:-''}
|
||||||
if [ -z "${PLUGIN_RPM}" ]; then
|
if [ -z "${PLUGIN_RPM}" ]; then
|
||||||
|
@ -91,7 +91,7 @@ function install_prepare_plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
function remove_plugins {
|
function remove_plugins {
|
||||||
for plug in $(echo $INSTALLED_PLUGINS | tr ";")
|
for plug in $(echo ${INSTALLED_PLUGINS} | tr ";" "\n")
|
||||||
do
|
do
|
||||||
fuel --os-username admin --os-password admin plugins \
|
fuel --os-username admin --os-password admin plugins \
|
||||||
--remove "${plug}" 2>/dev/null && \
|
--remove "${plug}" 2>/dev/null && \
|
||||||
|
|
|
@ -0,0 +1,124 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2016 Mirantis, Inc.
|
||||||
|
#
|
||||||
|
# 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 -eu
|
||||||
|
|
||||||
|
# Variables for remote (master node)
|
||||||
|
export REMOTE_HOST=${REMOTE_HOST:-'10.109.0.2'}
|
||||||
|
export REMOTE_USER=${REMOTE_USER:-'root'}
|
||||||
|
export REMOTE_SSH_PORT=${REMOTE_SSH_PORT:-22}
|
||||||
|
export REMOTE_PASSWORD=${REMOTE_PASSWORD:-'r00tme'}
|
||||||
|
export REMOTE_DIR=${REMOTE_DIR:-'/root'}
|
||||||
|
|
||||||
|
export FUEL_UI_HOST=${FUEL_UI_HOST:-${REMOTE_HOST}}
|
||||||
|
|
||||||
|
export REMOTE_EXEC="sshpass -p ${REMOTE_PASSWORD}
|
||||||
|
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
|
||||||
|
-p ${REMOTE_SSH_PORT} ${REMOTE_USER}@${REMOTE_HOST}"
|
||||||
|
|
||||||
|
# Variables for tests
|
||||||
|
export TESTS_ROOT="$(pwd)/static/tests/functional/real_plugin"
|
||||||
|
export SCRIPT_PATH="${TESTS_ROOT}/update_plugin_on_real.sh"
|
||||||
|
export TEST_PREFIX=${TEST_PREFIX:-'test_*'}
|
||||||
|
export TESTS_DIR_NAME=${TESTS_DIR_NAME:-'feature_nics'}
|
||||||
|
export CONF_PATH="${TESTS_ROOT}/${TESTS_DIR_NAME}/plugin_conf"
|
||||||
|
|
||||||
|
export ARTIFACTS=${ARTIFACTS:-"$(pwd)/test_run/${TESTS_DIR_NAME}"}
|
||||||
|
|
||||||
|
plugins='https://product-ci.infra.mirantis.net/view/All/job/9.0.build-fuel-plugins'
|
||||||
|
path='lastSuccessfulBuild/artifact/built_plugins/fuel_plugin_example_v5-1.0-1.0.0-1.noarch.rpm'
|
||||||
|
plugin_url=${PLUGIN_URL:-"${plugins}/${path}"}
|
||||||
|
|
||||||
|
plugins='http://plugins.mirantis.com/repository/f/u/fuel-plugin-vmware-dvs'
|
||||||
|
path='fuel-plugin-vmware-dvs-3.1-3.1.0-1.noarch.rpm'
|
||||||
|
plugin2_url=${PLUGIN_URL_SECOND:-"${plugins}/${path}"}
|
||||||
|
|
||||||
|
export NAILGUN_STATIC=$ARTIFACTS/static
|
||||||
|
mkdir -p "$ARTIFACTS"
|
||||||
|
|
||||||
|
function install_prepare_plugin {
|
||||||
|
url=$1
|
||||||
|
file_name=$2
|
||||||
|
${REMOTE_EXEC} wget --no-check-certificate -O "${REMOTE_DIR}/${file_name}.rpm" "${url}"
|
||||||
|
|
||||||
|
export PLUGIN_PATH=$(
|
||||||
|
${REMOTE_EXEC} fuel plugins --install "${REMOTE_DIR}/${file_name}.rpm" | awk '/Installing:/ { getline; print $1 }'
|
||||||
|
)
|
||||||
|
|
||||||
|
export PLUGIN_PATH="/var/www/nailgun/plugins/${PLUGIN_PATH}"
|
||||||
|
|
||||||
|
meta="${PLUGIN_PATH}/metadata.yaml"
|
||||||
|
export plugin_name=$(${REMOTE_EXEC} egrep '^name: ' "${meta}" | cut -d ' ' -f 2)
|
||||||
|
export plugin_version=$(${REMOTE_EXEC} egrep '^version: ' "${meta}" | cut -d ' ' -f 2)
|
||||||
|
|
||||||
|
# Fix package version
|
||||||
|
${REMOTE_EXEC} sed -i '$!s/4.0.0/5.0.0/' ${PLUGIN_PATH}/metadata.yaml
|
||||||
|
${REMOTE_EXEC} fuel plugins --sync
|
||||||
|
|
||||||
|
# Fix components settings
|
||||||
|
${REMOTE_EXEC} sed -i '/requires/,/+$/s/^/#/' ${PLUGIN_PATH}/components.yaml
|
||||||
|
${REMOTE_EXEC} fuel plugins --sync
|
||||||
|
|
||||||
|
export INSTALLED_PLUGINS="${INSTALLED_PLUGINS};${plugin_name}==${plugin_version//\'/}"
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove_plugin {
|
||||||
|
for plug in $(echo ${INSTALLED_PLUGINS} | tr ";" "\n")
|
||||||
|
do
|
||||||
|
${REMOTE_EXEC} fuel plugins --remove "${plug}" 2>/dev/null && \
|
||||||
|
echo "${plug} was removed" || echo "Can not remove plugin ${plug}"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function remote_scp {
|
||||||
|
local_file=$1
|
||||||
|
|
||||||
|
sshpass -p ${REMOTE_PASSWORD} \
|
||||||
|
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
|
||||||
|
-P ${REMOTE_SSH_PORT} $local_file ${REMOTE_USER}@${REMOTE_HOST}:/${REMOTE_DIR}/
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_component_tests {
|
||||||
|
local GULP='./node_modules/.bin/gulp'
|
||||||
|
local TESTS_DIR="static/tests/functional/real_plugin/${TESTS_DIR_NAME}"
|
||||||
|
local TESTS=${TESTS_DIR}/${TEST_PREFIX}.js
|
||||||
|
local result=0
|
||||||
|
|
||||||
|
export INSTALLED_PLUGINS=''
|
||||||
|
|
||||||
|
if [ ${TESTS_DIR_NAME} == 'feature_nics' ]; then
|
||||||
|
install_prepare_plugin ${plugin2_url} "plugin2"
|
||||||
|
for conf in 'nic' 'node' 'bond'; do
|
||||||
|
remote_scp ${CONF_PATH}/${conf}_plugin2.yaml
|
||||||
|
${REMOTE_EXEC} cp ${REMOTE_DIR}/${conf}_plugin2.yaml ${PLUGIN_PATH}/${conf}_config.yaml
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
install_prepare_plugin ${plugin_url} "plugin"
|
||||||
|
|
||||||
|
for test_case in $TESTS; do
|
||||||
|
echo "INFO: Running test case ${test_case}"
|
||||||
|
|
||||||
|
ARTIFACTS=$ARTIFACTS \
|
||||||
|
${GULP} intern:functional --suites="${test_case}" || result=1
|
||||||
|
done
|
||||||
|
|
||||||
|
remove_plugin
|
||||||
|
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
|
run_component_tests
|
|
@ -19,10 +19,15 @@ define(function() {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
proxyPort: 9057,
|
proxyPort: 9057,
|
||||||
|
tunnelOptions: {
|
||||||
|
hostname: process.env.SELENIUM_SERVER_HOST || 'localhost',
|
||||||
|
port: process.env.SELENIUM_SERVER_PORT || 4444
|
||||||
|
},
|
||||||
proxyUrl: 'http://localhost:9057/',
|
proxyUrl: 'http://localhost:9057/',
|
||||||
maxConcurrency: 1,
|
maxConcurrency: 1,
|
||||||
grep: /^/,
|
grep: /^/,
|
||||||
excludeInstrumentation: /^/,
|
excludeInstrumentation: /^/,
|
||||||
reporters: ['Runner', 'tests/functional/screenshot_on_fail']
|
reporters: ['Runner', 'tests/functional/screenshot_on_fail',
|
||||||
|
{id: 'JUnit', filename: process.env.ARTIFACTS + '/junit.xml'}]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -503,7 +503,7 @@ define([
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var serverHost = '127.0.0.1';
|
var serverHost = process.env.NAILGUN_HOST || '127.0.0.1';
|
||||||
var serverPort = process.env.NAILGUN_PORT || 5544;
|
var serverPort = process.env.NAILGUN_PORT || 5544;
|
||||||
var serverUrl = 'http://' + serverHost + ':' + serverPort;
|
var serverUrl = 'http://' + serverHost + ':' + serverPort;
|
||||||
var username = 'admin';
|
var username = 'admin';
|
||||||
|
|
|
@ -52,14 +52,9 @@ define([
|
||||||
return this.remote
|
return this.remote
|
||||||
.deleteCluster(modal);
|
.deleteCluster(modal);
|
||||||
},
|
},
|
||||||
'Set up attributes': function() {
|
test_bonds: function() { // Test attributes for BOND interfaces provided by plugin
|
||||||
return this.remote
|
|
||||||
.updatePlugin('update_bonds bond_setup')
|
|
||||||
|
|
||||||
.newClusterWithPlugin(modal);
|
|
||||||
},
|
|
||||||
'Test attributes for BOND interfaces provided by plugin': function() {
|
|
||||||
return this.remote
|
return this.remote
|
||||||
|
.updatePlugin('update_bonds bond_setup')
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
// Add one node, open interface configuration
|
// Add one node, open interface configuration
|
||||||
|
@ -77,7 +72,7 @@ define([
|
||||||
// Save changes
|
// Save changes
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test Load defaults for BONDs': function() {
|
bond_defaults: function() { // Test Load defaults for BONDs
|
||||||
return this.remote
|
return this.remote
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
|
@ -103,14 +98,13 @@ define([
|
||||||
.assertElementNotExists('input[label="bond0"]', 'Interfaces were not unbonded')
|
.assertElementNotExists('input[label="bond0"]', 'Interfaces were not unbonded')
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test several plugins with different attributes for BOND': function() {
|
bond_multiple_plugins: function() { // Test several plugins with different BOND configs
|
||||||
var bondCheckboxDVS = 'input[type="checkbox"][name="attribute_checkbox_b"]';
|
var bondCheckboxDVS = 'input[type="checkbox"][name="attribute_checkbox_b"]';
|
||||||
|
|
||||||
return this.remote
|
return this.remote
|
||||||
// Create cluster with plugins
|
// Create cluster with plugins
|
||||||
.newClusterFillName(modal)
|
.newClusterFillName(modal)
|
||||||
.pressKeys('\uE007') // go to Compute
|
.pressKeys('\uE007') // go to Compute
|
||||||
.clickByCssSelector('input[name="hypervisor:vmware"]')
|
|
||||||
.pressKeys('\uE007') // Networking
|
.pressKeys('\uE007') // Networking
|
||||||
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
||||||
.pressKeys('\uE007') // Storage
|
.pressKeys('\uE007') // Storage
|
||||||
|
@ -190,7 +184,7 @@ define([
|
||||||
// Save with default values
|
// Save with default values
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test restrictions for Bonds': function() {
|
bond_restrictions: function() { // Test restrictions for Bonds
|
||||||
return this.remote
|
return this.remote
|
||||||
.updatePlugin('update_bonds bond_restrict')
|
.updatePlugin('update_bonds bond_restrict')
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
|
@ -52,7 +52,7 @@ define([
|
||||||
return this.remote
|
return this.remote
|
||||||
.deleteCluster(modal);
|
.deleteCluster(modal);
|
||||||
},
|
},
|
||||||
'Set up all attributes': function() {
|
set_up: function() { // Set up all attributes
|
||||||
return this.remote
|
return this.remote
|
||||||
.updatePlugin('update_nics nic_setup')
|
.updatePlugin('update_nics nic_setup')
|
||||||
.updatePlugin('update_nodes node_setup')
|
.updatePlugin('update_nodes node_setup')
|
||||||
|
@ -60,7 +60,7 @@ define([
|
||||||
|
|
||||||
.newClusterWithPlugin(modal);
|
.newClusterWithPlugin(modal);
|
||||||
},
|
},
|
||||||
'Test attributes for NIC interfaces': function() {
|
test_nics: function() { // Test attributes for NIC interfaces
|
||||||
return this.remote
|
return this.remote
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ define([
|
||||||
// Save changes
|
// Save changes
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test Load defaults attributes for NIC': function() {
|
nic_defaults: function() { // Test Load defaults attributes for NIC
|
||||||
return this.remote
|
return this.remote
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ define([
|
||||||
// Save with default values
|
// Save with default values
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test cluster without plugin has only core attributes': function() {
|
test_core: function() { // Test cluster without plugin has only core attributes
|
||||||
return this.remote
|
return this.remote
|
||||||
// Create cluster without plugin
|
// Create cluster without plugin
|
||||||
.clickByCssSelector('.create-cluster')
|
.clickByCssSelector('.create-cluster')
|
||||||
|
@ -183,7 +183,7 @@ define([
|
||||||
return modal.waitToClose();
|
return modal.waitToClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'Test that NIC config may be changed for several nodes simultaneously': function() {
|
test_mass_config: function() { // Test NICs may be changed for two nodes simultaneously
|
||||||
return this.remote
|
return this.remote
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ define([
|
||||||
|
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test several plugins with different attributes for NIC': function() {
|
nic_multiple_plugins: function() { // Test several plugins with different NIC configs
|
||||||
var nicCheckboxDVS = 'input[type="checkbox"][name="attribute_checkbox_b"]';
|
var nicCheckboxDVS = 'input[type="checkbox"][name="attribute_checkbox_b"]';
|
||||||
var nicTextItf1 = '.ifc-list > div:nth-child(1) ' + nicText;
|
var nicTextItf1 = '.ifc-list > div:nth-child(1) ' + nicText;
|
||||||
|
|
||||||
|
@ -232,7 +232,6 @@ define([
|
||||||
// Create cluster with plugins
|
// Create cluster with plugins
|
||||||
.newClusterFillName(modal)
|
.newClusterFillName(modal)
|
||||||
.pressKeys('\uE007') // go to Compute
|
.pressKeys('\uE007') // go to Compute
|
||||||
.clickByCssSelector('input[name="hypervisor:vmware"]')
|
|
||||||
.pressKeys('\uE007') // Networking
|
.pressKeys('\uE007') // Networking
|
||||||
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
||||||
.pressKeys('\uE007') // Storage
|
.pressKeys('\uE007') // Storage
|
||||||
|
@ -303,7 +302,7 @@ define([
|
||||||
// Save with default values
|
// Save with default values
|
||||||
.applyItfChanges();
|
.applyItfChanges();
|
||||||
},
|
},
|
||||||
'Test restrictions': function() {
|
nic_restrictions: function() { // Test restrictions for NICs
|
||||||
var nicText = 'input[type="text"][name="attribute_text_r"]';
|
var nicText = 'input[type="text"][name="attribute_text_r"]';
|
||||||
|
|
||||||
return this.remote
|
return this.remote
|
||||||
|
|
|
@ -50,13 +50,9 @@ define([
|
||||||
return this.remote
|
return this.remote
|
||||||
.deleteCluster(modal);
|
.deleteCluster(modal);
|
||||||
},
|
},
|
||||||
'Set up attributes': function() {
|
test_nodes: function() { // Test attributes for Nodes
|
||||||
return this.remote
|
return this.remote
|
||||||
.updatePlugin('update_nodes node_setup')
|
.updatePlugin('update_nodes node_setup')
|
||||||
.newClusterWithPlugin(modal);
|
|
||||||
},
|
|
||||||
'Test attributes for Nodes': function() {
|
|
||||||
return this.remote
|
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
// Add node and open settings for it
|
// Add node and open settings for it
|
||||||
|
@ -90,7 +86,7 @@ define([
|
||||||
return modal.waitToClose();
|
return modal.waitToClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'Test Load defaults for Nodes': function() {
|
node_defaults: function() { // Test Load defaults for Nodes
|
||||||
return this.remote
|
return this.remote
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
||||||
|
@ -129,14 +125,13 @@ define([
|
||||||
return modal.waitToClose();
|
return modal.waitToClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'Test several plugins with different attributes for Nodes': function() {
|
node_multiple_plugins: function() { // Test several plugins with different Nodes configs
|
||||||
var nodeCheckboxDVS = 'input[type=checkbox][name="attribute_checkbox_b"]';
|
var nodeCheckboxDVS = 'input[type=checkbox][name="attribute_checkbox_b"]';
|
||||||
|
|
||||||
return this.remote
|
return this.remote
|
||||||
// Create cluster with plugins
|
// Create cluster with plugins
|
||||||
.newClusterFillName(modal)
|
.newClusterFillName(modal)
|
||||||
.pressKeys('\uE007') // go to Compute
|
.pressKeys('\uE007') // go to Compute
|
||||||
.clickByCssSelector('input[name="hypervisor:vmware"]')
|
|
||||||
.pressKeys('\uE007') // Networking
|
.pressKeys('\uE007') // Networking
|
||||||
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
.clickByCssSelector('input[name="network:neutron:ml2:dvs"]')
|
||||||
.pressKeys('\uE007') // Storage
|
.pressKeys('\uE007') // Storage
|
||||||
|
@ -214,7 +209,7 @@ define([
|
||||||
return modal.waitToClose();
|
return modal.waitToClose();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
'Test restrictions for Nodes': function() {
|
node_restrictions: function() { // Test restrictions for Nodes
|
||||||
return this.remote
|
return this.remote
|
||||||
.updatePlugin('update_nodes node_restrict')
|
.updatePlugin('update_nodes node_restrict')
|
||||||
.newClusterWithPlugin(modal)
|
.newClusterWithPlugin(modal)
|
||||||
|
|
|
@ -104,7 +104,9 @@ define([
|
||||||
.clickIfExists('button.remove-cluster-btn')
|
.clickIfExists('button.remove-cluster-btn')
|
||||||
.then(function() {
|
.then(function() {
|
||||||
modal.waitToClose();
|
modal.waitToClose();
|
||||||
});
|
})
|
||||||
|
|
||||||
|
.waitForCssSelector('.create-cluster', 1000);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
clickObjectByIndex: function(objectsCssSelector, index) {
|
clickObjectByIndex: function(objectsCssSelector, index) {
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function remote_scp {
|
||||||
|
local_file=$1
|
||||||
|
|
||||||
|
sshpass -p ${REMOTE_PASSWORD} \
|
||||||
|
scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
|
||||||
|
-P ${REMOTE_SSH_PORT} $local_file ${REMOTE_USER}@${REMOTE_HOST}:/${REMOTE_DIR}/
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_components {
|
||||||
|
default=${CONF_PATH}/$1.yaml
|
||||||
|
components_file=${CONF_PATH}/$2.yaml
|
||||||
|
|
||||||
|
remote_scp ${components_file}
|
||||||
|
remote_scp ${default}
|
||||||
|
|
||||||
|
${REMOTE_EXEC} sh -c "cat ${REMOTE_DIR}/$1.yaml ${REMOTE_DIR}/$1.yaml > ${PLUGIN_PATH}/components.yaml"
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_nics {
|
||||||
|
nic_file=${CONF_PATH}/$1.yaml
|
||||||
|
|
||||||
|
remote_scp ${nic_file}
|
||||||
|
${REMOTE_EXEC} cp ${REMOTE_DIR}/$1.yaml ${PLUGIN_PATH}/nic_config.yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_nodes {
|
||||||
|
node_file=${CONF_PATH}/$1.yaml
|
||||||
|
|
||||||
|
remote_scp ${node_file}
|
||||||
|
${REMOTE_EXEC} cp ${REMOTE_DIR}/$1.yaml ${PLUGIN_PATH}/node_config.yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_bonds {
|
||||||
|
bond_file=${CONF_PATH}/$1.yaml
|
||||||
|
|
||||||
|
remote_scp ${bond_file}
|
||||||
|
${REMOTE_EXEC} cp ${REMOTE_DIR}/$1.yaml ${PLUGIN_PATH}/bond_config.yaml
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
update_components|update_nics|update_nodes|update_bonds) func=$1; params="${@:2}";;
|
||||||
|
*) func=update_components; params="$@";;
|
||||||
|
esac
|
||||||
|
|
||||||
|
$func $params
|
||||||
|
|
||||||
|
${REMOTE_EXEC} fuel plugins --sync
|
Loading…
Reference in New Issue