From 971503c6a34a5778be02331bd059d464514822c0 Mon Sep 17 00:00:00 2001 From: Helen Walsh Date: Tue, 22 Jan 2019 14:13:10 +0000 Subject: [PATCH] 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 --- README.md | 32 ++++++++++++++-------------- devstack/plugin.sh | 52 +++++++++++++++++++++++----------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index a2e02bc..90ed701 100644 --- a/README.md +++ b/README.md @@ -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]]
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]]
- 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=
- VMAX_Backend_1_RestServerPort=
- VMAX_Backend_1_RestUserName=
- VMAX_Backend_1_Array=
- VMAX_Backend_1_SRP=
- VMAX_Backend_1_WORKLOAD=
- VMAX_Backend_1_SLO=
- VMAX_Backend_1_SSLVerify=
- VMAX_Backend_1_PortGroup1=
- VMAX_Backend_1_PortGroup2=
- VMAX_Backend_1_StorageProtocol= + POWERMAX_Backend_1_RestServerIp=
+ POWERMAX_Backend_1_RestServerPort=
+ POWERMAX_Backend_1_RestUserName=
+ POWERMAX_Backend_1_Array=
+ POWERMAX_Backend_1_SRP=
+ POWERMAX_Backend_1_WORKLOAD=
+ POWERMAX_Backend_1_SLO=
+ POWERMAX_Backend_1_SSLVerify=
+ POWERMAX_Backend_1_PortGroup1=
+ POWERMAX_Backend_1_PortGroup2=
+ POWERMAX_Backend_1_StorageProtocol= * run "stack.sh" \ No newline at end of file diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 221e9ad..15c0ec0 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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} }