diff options
author | baigk <baiguoku@huawei.com> | 2015-10-21 09:26:40 +0800 |
---|---|---|
committer | baigk <baiguoku@huawei.com> | 2015-10-21 09:26:40 +0800 |
commit | 78b926e43ab0d523205b223ed17ef1c3560e9607 (patch) | |
tree | 9fe41b7a86871b43de173cdd97a1c3a870a600ac /deploy/template | |
parent | 9037b62da8598f9cb73c9203c3a01d8afbfd6173 (diff) |
bug fix: support impi 2.0 and delete compass core default ip and gw when baremetal deploy
JIRA: COMPASS-107
Change-Id: Id1654a3551029be18e1884a488291eb3fa46d1ca
Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/template')
-rw-r--r-- | deploy/template/power/ipmitool.tmpl | 12 |
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 ]] |