16 lines
1.0 KiB
Cheetah
16 lines
1.0 KiB
Cheetah
{{/* used command to access the ipmi interface of the nodes */}}
|
|
{{- $escapechar := "~" }}{{ if .EscapeChar }}{{ $escapechar = .EscapeChar }}{{ end }}
|
|
{{- $port := "623" }}{{ if .Port }}{{ $port = .Port }}{{ end }}
|
|
{{- $interface := "lan" }}{{- if .Interface }}{{ $interface = .Interface }}{{ end }}
|
|
{{- $args := "" }}
|
|
{{- if eq .Cmd "PowerOn" }}{{ $args = "chassis power on" }}
|
|
{{- else if eq .Cmd "PowerOff" }}{{ $args = "chassis power off" }}
|
|
{{- else if eq .Cmd "PowerCycle" }}{{ $args = "chassis power cycle" }}
|
|
{{- else if eq .Cmd "PowerReset" }}{{ $args = "chassis power reset" }}
|
|
{{- else if eq .Cmd "PowerSoft" }}{{ $args = "chassis power soft" }}
|
|
{{- else if eq .Cmd "PowerStatus" }}{{ $args = "chassis power status" }}
|
|
{{- else if eq .Cmd "SDRList" }}{{ $args = "sdr list" }}
|
|
{{- else if eq .Cmd "SensorList" }}{{ $args = "sensor list" }}
|
|
{{- else if eq .Cmd "Console" }}{{ $args = "sol activate" }}{{ end }}
|
|
ipmitool -I {{ $interface }} -H {{ .Ipaddr }} -p {{ $port }} -U {{ .UserName }} -P {{ .Password }} -e {{ $escapechar }} {{ $args }}
|