summaryrefslogtreecommitdiffstats
path: root/deploy/template
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2015-10-24 07:42:47 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-24 07:42:48 +0000
commit951186fee0c3a83fe380cc7545edcbdc6872e509 (patch)
tree2085d756fe33b66b3f775c9034edbe3368c0464d /deploy/template
parent91f52bf10c37935c3a1299eb5abf0ea50ab0d231 (diff)
parent78b926e43ab0d523205b223ed17ef1c3560e9607 (diff)
Merge "bug fix: support impi 2.0 and delete compass core default ip and gw when baremetal deploy"
Diffstat (limited to 'deploy/template')
-rw-r--r--deploy/template/power/ipmitool.tmpl12
1 files changed, 10 insertions, 2 deletions
diff --git a/deploy/template/power/ipmitool.tmpl b/deploy/template/power/ipmitool.tmpl
index 5d2630af..73278e45 100644
--- a/deploy/template/power/ipmitool.tmpl
+++ b/deploy/template/power/ipmitool.tmpl
@@ -1,6 +1,7 @@
source \${COMPASS_DIR}/util/log.sh
#set default_ipmiUser=$getVar('ipmiUser', '')
#set default_ipmiPass=$getVar('ipmiPass', '')
+#set default_ipmiVer=$getVar('ipmiVer', '2.0')
#set hosts=$getVar('hosts', [])
#set fail_list=""
#for host in $hosts
@@ -20,8 +21,15 @@ exit 1
#set ipmiIp=$host.get('ipmiIp', '')
#set ipmiUser=$host.get('ipmiUser', $default_ipmiUser)
#set ipmiPass=$host.get('ipmiPass', $default_ipmiPass)
+#set ipmiVer=$host.get('ipmiVer', $default_ipmiVer)
+#if $ipmiVer == '2.0'
+ #set interface='lanplus'
+#else
+ #set interface='lan'
+#end if
+
for i in {1..5}; do
- if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis bootdev pxe >/dev/null 2>&1
then
break
elif [[ i -lt 5 ]]
@@ -34,7 +42,7 @@ for i in {1..5}; do
done
sleep 1
for i in {1..5}; do
- if ipmitool -I lan -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1
+ if ipmitool -I $interface -H $ipmiIp -U $ipmiUser -P $ipmiPass chassis power reset >/dev/null 2>&1
then
break
elif [[ i -lt 5 ]]