ipmitool

command module
v0.0.0-...-fbe8b20 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 3 Imported by: 0

README

ipmitool

This ipmitool library is an ipmitool command wrapper to be used as an ipmi client.

This library is made for the purposes of Bancadati and is therefor limited in functionality and supported commands.
For now only the (chassis) power command is supported.

Requirements

This is an ipmitool wrapper and therefor it needs the ipmitool command.

Install on linux:

sudo apt install ipmitool -y

Usage

package main

import (
	"fmt"
    "log"

	"github.com/Bancadati/ipmitool"
)

func main() {
    cl, err := ipmitool.NewClient("192.198.1.1", 0, "IPMIUSER", "Password")
	if err != nil {
		log.Fatal(err)
	}

	status, err := cl.Power.Status()
	if err != nil {
		log.Fatal(err)
	}

    fmt.Println(status)

    if status == ipmitool.PowerStateOff {
		err := cl.Power.On()
		if err != nil {
			log.Fatal(err)
		}
	}
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
scp
ssh

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL