Update devstack-plugin-vmax to reflect VMAX to PowerMax rebrand

Update the devstack script to point to the correct PowerMax drivers
and to leverage the new PowerMax tags in cinder.conf merged in
https://review.openstack.org/#/c/620659.
Will change the name of the git repo at a later date.

Change-Id: I0139e1ffd04ac7eb33021cd276e5b27379da79d0
This commit is contained in:
Helen Walsh 2019-01-22 14:13:10 +00:00
parent cd3b97978c
commit 971503c6a3
2 changed files with 42 additions and 42 deletions

View File

@ -1,5 +1,5 @@
# devstack-plugin-vmax
This plugin enables the VMAX backend for cinder. For each backend, it creates the required xml file, populating said file along with cinder.conf with the appropriate values
This plugin enables the POWERMAX backend for cinder. For each backend, it creates the required xml file, populating said file along with cinder.conf with the appropriate values
# Enabling in devstack
* Add this repo as an external repository to localrc::
@ -7,27 +7,27 @@ This plugin enables the VMAX backend for cinder. For each backend, it creates th
[[local|localrc]]</br>
enable_plugin devstack-plugin-vmax https://github.com/openstack/devstack-plugin-vmax
* For each vmax cinder backend to be used in the devstack setup, add the
* For each powermax cinder backend to be used in the devstack setup, add the
backend name to the enabled backends in localrc as shown below. Backend name
has to start with VMAX::
has to start with POWERMAX::
[[local|localrc]]</br>
CINDER_ENABLED_BACKENDS=vmax:VMAX_Backend_1,vmax:VMAX_Backend_2
CINDER_ENABLED_BACKENDS=powermax:POWERMAX_Backend_1,powermax:POWERMAX_Backend_2
* For each vmax backend in CINDER_ENABLED_BACKENDS above, append the
configuration details to localrc as shown below for VMAX_Backend_1. Contact
configuration details to localrc as shown below for POWERMAX_Backend_1. Contact
your Storage Admin for your parameters::
VMAX_Backend_1_RestServerIp=<insert_ip_address></br>
VMAX_Backend_1_RestServerPort=<Rest_port_number></br>
VMAX_Backend_1_RestUserName=<Rest_password></br>
VMAX_Backend_1_Array=<Array_to_use></br>
VMAX_Backend_1_SRP=<storage_resource_pool></br>
VMAX_Backend_1_WORKLOAD=<work_load></br>
VMAX_Backend_1_SLO=<Service_level></br>
VMAX_Backend_1_SSLVerify=<pem_file_for_ssl_verification></br>
VMAX_Backend_1_PortGroup1=<port_group></br>
VMAX_Backend_1_PortGroup2=<port_group></br>
VMAX_Backend_1_StorageProtocol=<Storage_protocol>
POWERMAX_Backend_1_RestServerIp=<insert_ip_address></br>
POWERMAX_Backend_1_RestServerPort=<Rest_port_number></br>
POWERMAX_Backend_1_RestUserName=<Rest_password></br>
POWERMAX_Backend_1_Array=<Array_to_use></br>
POWERMAX_Backend_1_SRP=<storage_resource_pool></br>
POWERMAX_Backend_1_WORKLOAD=<work_load></br>
POWERMAX_Backend_1_SLO=<Service_level></br>
POWERMAX_Backend_1_SSLVerify=<pem_file_for_ssl_verification></br>
POWERMAX_Backend_1_PortGroup1=<port_group></br>
POWERMAX_Backend_1_PortGroup2=<port_group></br>
POWERMAX_Backend_1_StorageProtocol=<Storage_protocol>
* run "stack.sh"

View File

@ -1,28 +1,28 @@
#!/bin/bash
# devstack/plugin.sh
# Setup VMAX as backend for Devstack
# Setup PowerMax as backend for Devstack
function update_volume_type {
# Update volume types
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
be_name=${be##*:}
be_type=${be%%:*}
if [[ ${be_type} == "vmax" ]]; then
if [[ ${be_type} == "powermax" ]]; then
array="${be_name}_Array"
srp="${be_name}_SRP"
slo="None"
workload="None"
pool_name=${!srp}+${!array}
vmax_temp="${be_name}_WORKLOAD"
if [ -n "${!vmax_temp}" ]; then
powermax_temp="${be_name}_WORKLOAD"
if [ -n "${!powermax_temp}" ]; then
workload="${be_name}_WORKLOAD"
pool_name=${!workload}+${pool_name}
else
pool_name=${workload}+${pool_name}
fi
vmax_temp="${be_name}_SLO"
if [ -n "${!vmax_temp}" ]; then
powermax_temp="${be_name}_SLO"
if [ -n "${!powermax_temp}" ]; then
slo="${be_name}_SLO"
pool_name=${!slo}+${pool_name}
else
@ -36,10 +36,10 @@ function update_volume_type {
function configure_port_groups {
local be_name=$1
vmax_temp="${be_name}_PortGroup"
powermax_temp="${be_name}_PortGroup"
dell_emc_portGroups=0
for i in ${!VMAX*}; do
temp1=${i##${vmax_temp}}
for i in ${!POWERMAX*}; do
temp1=${i##${powermax_temp}}
if [[ "$temp1" == "$i" ]]; then
continue
fi
@ -50,14 +50,14 @@ function configure_port_groups {
done
pg_list="["
for (( m=1 ; m<=dell_emc_portGroups ; m++ )) ; do
vmax_temp="${be_name}_PortGroup${m}"
pg_list="${pg_list}${!vmax_temp}"
powermax_temp="${be_name}_PortGroup${m}"
pg_list="${pg_list}${!powermax_temp}"
if (( m!=dell_emc_portGroups )) ; then
pg_list="${pg_list},"
fi
done
pg_list="${pg_list}]"
iniset ${CINDER_CONF} ${be_name} vmax_port_groups ${pg_list}
iniset ${CINDER_CONF} ${be_name} powermax_port_groups ${pg_list}
}
function configure_single_pool {
@ -65,47 +65,47 @@ function configure_single_pool {
configure_port_groups ${be_name}
for val in "SSLVerify" "Array" "SRP" "RestPassword" "RestUserName"\
"RestServerPort" "RestServerIp" ; do
vmax_temp="${be_name}_${val}"
if [ -n "${!vmax_temp}" ]; then
powermax_temp="${be_name}_${val}"
if [ -n "${!powermax_temp}" ]; then
if [[ "${val}" == "RestServerIp" ]]; then
iniset ${CINDER_CONF} ${be_name} san_ip ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} san_ip ${!powermax_temp}
elif [[ "${val}" == "RestServerPort" ]]; then
iniset ${CINDER_CONF} ${be_name} san_rest_port ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} san_rest_port ${!powermax_temp}
elif [[ "${val}" == "RestUserName" ]]; then
iniset ${CINDER_CONF} ${be_name} san_login ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} san_login ${!powermax_temp}
elif [[ "${val}" == "RestPassword" ]]; then
iniset ${CINDER_CONF} ${be_name} san_password ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} san_password ${!powermax_temp}
elif [[ "${val}" == "Array" ]]; then
iniset ${CINDER_CONF} ${be_name} vmax_array ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} powermax_array ${!powermax_temp}
elif [[ "${val}" == "SRP" ]]; then
iniset ${CINDER_CONF} ${be_name} vmax_srp ${!vmax_temp}
iniset ${CINDER_CONF} ${be_name} powermax_srp ${!powermax_temp}
elif [[ "${val}" == "SSLVerify" ]]; then
if [[ "${!vmax_temp}" != "False" ]]; then
if [[ "${!powermax_temp}" != "False" ]]; then
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_verify \
True
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_path \
${!vmax_temp}
${!powermax_temp}
fi
fi
fi
done
}
function configure_cinder_backend_vmax {
function configure_cinder_backend_powermax {
local be_name=$1
local emc_multi=${be_name%%_*}
configure_single_pool ${be_name}
storage_proto="${be_name}_StorageProtocol"
vmax_directory="cinder.volume.drivers.dell_emc.vmax."
powermax_directory="cinder.volume.drivers.dell_emc.powermax."
if [[ "${!storage_proto}" == "iSCSI" ]]; then
iniset ${CINDER_CONF} ${be_name} volume_driver \
"${vmax_directory}iscsi.VMAXISCSIDriver"
"${powermax_directory}iscsi.PowerMaxISCSIDriver"
fi
if [ "${!storage_proto}" = "FC" ]; then
iniset ${CINDER_CONF} ${be_name} volume_driver \
"${vmax_directory}fc.VMAXFCDriver"
"${powermax_directory}fc.PowerMaxFCDriver"
fi
iniset ${CINDER_CONF} ${be_name} volume_backend_name ${be_name}
}