Directories ¶
Path | Synopsis |
---|---|
Package apiversions provides information about the versions supported by a specific Ironic API.
|
Package apiversions provides information about the versions supported by a specific Ironic API. |
Package httpbasic provides support for http_basic bare metal endpoints.
|
Package httpbasic provides support for http_basic bare metal endpoints. |
Package noauth provides support for noauth bare metal endpoints.
|
Package noauth provides support for noauth bare metal endpoints. |
v1
|
|
drivers
Package drivers contains the functionality for Listing drivers, driver details, driver properties and driver logical disk properties API reference: https://developer.openstack.org/api-ref/baremetal/#drivers-drivers Example to List Drivers drivers.ListDrivers(client.ServiceClient(), drivers.ListDriversOpts{}).EachPage(func(page pagination.Page) (bool, error) { driversList, err := drivers.ExtractDrivers(page) if err != nil { return false, err } for _, n := range driversList { // Do something } return true, nil }) Example to Get single Driver Details showDriverDetails, err := drivers.GetDriverDetails(client, "ipmi").Extract() if err != nil { panic(err) } Example to Get single Driver Properties showDriverProperties, err := drivers.GetDriverProperties(client, "ipmi").Extract() if err != nil { panic(err) } Example to Get single Driver Logical Disk Properties showDriverDiskProperties, err := drivers.GetDriverDiskProperties(client, "ipmi").Extract() if err != nil { panic(err) }
|
Package drivers contains the functionality for Listing drivers, driver details, driver properties and driver logical disk properties API reference: https://developer.openstack.org/api-ref/baremetal/#drivers-drivers Example to List Drivers drivers.ListDrivers(client.ServiceClient(), drivers.ListDriversOpts{}).EachPage(func(page pagination.Page) (bool, error) { driversList, err := drivers.ExtractDrivers(page) if err != nil { return false, err } for _, n := range driversList { // Do something } return true, nil }) Example to Get single Driver Details showDriverDetails, err := drivers.GetDriverDetails(client, "ipmi").Extract() if err != nil { panic(err) } Example to Get single Driver Properties showDriverProperties, err := drivers.GetDriverProperties(client, "ipmi").Extract() if err != nil { panic(err) } Example to Get single Driver Logical Disk Properties showDriverDiskProperties, err := drivers.GetDriverDiskProperties(client, "ipmi").Extract() if err != nil { panic(err) } |
drivers/testing
Package testing contains drivers unit tests
|
Package testing contains drivers unit tests |
nodes
Package nodes provides information and interaction with the nodes API resource in the OpenStack Bare Metal service.
|
Package nodes provides information and interaction with the nodes API resource in the OpenStack Bare Metal service. |
nodes/testing
nodes unit tests
|
nodes unit tests |
ports
Package ports contains the functionality to Listing, Searching, Creating, Updating, and Deleting of bare metal Port resources API reference: https://developer.openstack.org/api-ref/baremetal/#ports-ports Example to List Ports with Detail ports.ListDetail(client, nil).EachPage(func(page pagination.Page) (bool, error) { portList, err := ports.ExtractPorts(page) if err != nil { return false, err } for _, n := range portList { // Do something } return true, nil }) Example to List Ports listOpts := ports.ListOpts{ Limit: 10, } ports.List(client, listOpts).EachPage(func(page pagination.Page) (bool, error) { portList, err := ports.ExtractPorts(page) if err != nil { return false, err } for _, n := range portList { // Do something } return true, nil }) Example to Create a Port createOpts := ports.CreateOpts{ NodeUUID: "e8920409-e07e-41bb-8cc1-72acb103e2dd", Address: "00:1B:63:84:45:E6", PhysicalNetwork: "my-network", } createPort, err := ports.Create(client, createOpts).Extract() if err != nil { panic(err) } Example to Get a Port showPort, err := ports.Get(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474").Extract() if err != nil { panic(err) } Example to Update a Port updateOpts := ports.UpdateOpts{ ports.UpdateOperation{ Op: ReplaceOp, Path: "/address", Value: "22:22:22:22:22:22", }, } updatePort, err := ports.Update(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474", updateOpts).Extract() if err != nil { panic(err) } Example to Delete a Port err = ports.Delete(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474").ExtractErr() if err != nil { panic(err) }
|
Package ports contains the functionality to Listing, Searching, Creating, Updating, and Deleting of bare metal Port resources API reference: https://developer.openstack.org/api-ref/baremetal/#ports-ports Example to List Ports with Detail ports.ListDetail(client, nil).EachPage(func(page pagination.Page) (bool, error) { portList, err := ports.ExtractPorts(page) if err != nil { return false, err } for _, n := range portList { // Do something } return true, nil }) Example to List Ports listOpts := ports.ListOpts{ Limit: 10, } ports.List(client, listOpts).EachPage(func(page pagination.Page) (bool, error) { portList, err := ports.ExtractPorts(page) if err != nil { return false, err } for _, n := range portList { // Do something } return true, nil }) Example to Create a Port createOpts := ports.CreateOpts{ NodeUUID: "e8920409-e07e-41bb-8cc1-72acb103e2dd", Address: "00:1B:63:84:45:E6", PhysicalNetwork: "my-network", } createPort, err := ports.Create(client, createOpts).Extract() if err != nil { panic(err) } Example to Get a Port showPort, err := ports.Get(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474").Extract() if err != nil { panic(err) } Example to Update a Port updateOpts := ports.UpdateOpts{ ports.UpdateOperation{ Op: ReplaceOp, Path: "/address", Value: "22:22:22:22:22:22", }, } updatePort, err := ports.Update(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474", updateOpts).Extract() if err != nil { panic(err) } Example to Delete a Port err = ports.Delete(client, "c9afd385-5d89-4ecb-9e1c-68194da6b474").ExtractErr() if err != nil { panic(err) } |
ports/testing
ports unit tests
|
ports unit tests |
Click to show internal directories.
Click to hide internal directories.