- echo "file ${DOVETAIL_CONFIG}/pod.yaml:"
- cat ${DOVETAIL_CONFIG}/pod.yaml
-else
- echo "Error: cannot find file ${DOVETAIL_CONFIG}/pod.yaml. Please check if it is existing."
- sudo ls -al ${DOVETAIL_CONFIG}
- echo "HA test cases may not run properly."
-fi
+}
+
+change_pod_file_process_info() {
+ sudo chmod 666 ${POD}
+ echo "INFO: adapt process info for $INSTALLER_TYPE ..."
+ if [ "$INSTALLER_TYPE" == "apex" ]; then
+ change_apex_pod_file_process_info
+ elif [ "$INSTALLER_TYPE" == "fuel" ]; then
+ change_fuel_pod_file_process_info
+ fi
+}
+
+get_pod_file() {
+ # These packages are used for parsing yaml files and decrypting ipmi user and password.
+ sudo pip install shyaml
+ sudo yum install -y rubygems || sudo apt-get install -y ruby
+ sudo gem install hiera-eyaml
+ if [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then
+ get_fuel_baremetal_pod_file
+ fi
+
+ exists=`check_file_exists ${POD}`
+ if [[ $exists == 1 ]]; then
+ get_pod_file_with_scripts
+ fi
+
+ exists=`check_file_exists ${POD}`
+ if [[ $exists == 0 ]]; then
+ change_pod_file_process_info
+ else
+ echo "ERROR: cannot find file ${POD}. Please check if it exists."
+ sudo ls -al ${DOVETAIL_CONFIG}
+ exit 1
+ fi
+
+ echo "INFO: file ${POD} is:"
+ cat ${POD}
+}
+
+get_cred_file
+get_pod_file