-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get all pyhical disks, and create virtual disks? #164
Comments
Hey @wahello - there are actually a few different paths to get to the physical drives, depending on what association you are trying to use. The most common I think would be through either the //
// SPDX-License-Identifier: BSD-3-Clause
//
package main
import (
"fmt"
"github.com/stmcginnis/gofish"
)
func main() {
// Create a new instance of gofish client, ignoring self-signed certs
config := gofish.ClientConfig{
Endpoint: "https://bmc-ip",
Username: "my-username",
Password: "my-password",
Insecure: true,
}
c, err := gofish.Connect(config)
if err != nil {
panic(err)
}
defer c.Logout()
// Retrieve the service root
service := c.Service
// Query the chassis data using the session token
chassis, err := service.Chassis()
if err != nil {
panic(err)
}
for _, chass := range chassis {
fmt.Printf("Chassis: %#v\n\n", chass)
drives, err := chass.Drives()
if err == nil {
for i, drive := range drives {
fmt.Printf(" Drive %d: %#v\n", i, drive)
}
}
}
} |
As far as creating a virtual disk, I have not done that myself, so I'm not sure. Looks like it may be an operation on the |
Thanks. |
Hi, I don't know if this helps here's what I did to get the same.
|
How to get all pyhical disks, and create virtual disks?
Is there any examples?
The text was updated successfully, but these errors were encountered: