Commit Graph

46 Commits

Author SHA1 Message Date
Jacob Weinstock
1fe00036bd Update Intel AMT library:
The previous Intel AMT libraries were forks and
the hope was that I would be able to upstream the
changes. The upstreams themselves were actually forks
and the PRs I opened have been sitting for some time.
Because of all of this, I have created a new repo that
I'll be maintaining. The new repo handles context timeouts
across the board.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2023-03-08 14:31:10 -07:00
Eugenio Siciliano
763d88079c redfish: added support for adapters with multiple ports
Multiple ports in the same network adapter are now inventoried as different NICPorts under the same NIC.
Added some network port values.
Fixed network speed conversion.
2023-02-21 12:58:27 +01:00
Joel Rebello
53b26d34e0
go.mod, go.sum: rebase on main 2023-01-30 14:13:54 +01:00
Joel Rebello
a46674d194
providers/AsRockRack: fixes user update on ROMED8HM3 Megarac BMCs
A few new fields are now required, tested on these devices running the
Megarac BMC firmware,

 - EPYC3101D4I-NL
 - ROMED8HM3
2023-01-27 14:29:47 +01:00
Jacob Weinstock
766b32b771 Rename module:
This will allow imports of this to not have
to specify replace directives in go.mod. The
hope is that the upstream will accept the context
changes and this wont be necessary.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2022-11-25 04:09:22 +00:00
Jacob Weinstock
ba20301b49 Fix import issues:
v2 import paths don't mirror the actual structure on disk.
"github.com/bmc-toolbox/bmclib/providers" this import in
intelamt.go made a go mod tidy pull in the main line version.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2022-11-16 09:49:37 -07:00
Jacob Weinstock
08ad72c8b9 Fix Make help target:
After the lint.mk include was added the
Help target wasnt printing the target names correctly.
Also updated the go.mod.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2022-11-15 22:31:32 +00:00
Jacob Weinstock
e3f7561562 Add AMT provider:
This enables communication with machines using AMT,
like intel NUCs. The replaces in go.mod are in place
so that the go-amt and wsman conform to using context.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2022-11-15 22:31:30 +00:00
Joel Rebello
4475cb7057
go: update to current Gofish since with GetSession() fix merged
https://github.com/stmcginnis/gofish/pull/214
2022-11-08 11:57:27 +01:00
Joel Rebello
9f4e89d8e4
go: tidy deps and switch to 1.18 2022-07-26 11:08:08 +02:00
Micah Hausler
cc2ec72571 Updated examples with docs
* Renamed user creation example
* Fixed create-user to use the CSV-provided values
* ran `go mod tidy`

Signed-off-by: Micah Hausler <mhausler@amazon.com>
2022-05-10 14:41:30 +00:00
Joel Rebello
513f2807cc
go.mod, go.sum; bump registrar package which includes a fix for filtering drivers
https://github.com/jacobweinstock/registrar/pull/2
2022-05-04 12:13:27 +02:00
Joel Rebello
92f6fc0b17
go.mod: deps updated after rebase 2022-04-26 17:36:53 +02:00
Joel Rebello
e2543e3c7c
redfish/inventory: split out helper methods 2022-04-26 17:28:06 +02:00
Joel Rebello
3de88c2180
providers/redfish: implement InventoryGetter interface, update gofish dependency 2022-04-26 12:15:16 +02:00
Micah Hausler
8c5d733042 Update Go to 1.17 2022-04-21 16:40:04 -04:00
Jacob Weinstock
319684a131 Remove bou.ke/monkey:
The license for bou.ke/monkey prohibits use
of the library for any reason.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2022-02-01 12:06:04 -07:00
Abhay Krishna Arunachalam
4f0325e1ec Remove goipmi provider from bmclib 2022-02-01 10:53:25 -08:00
Jacob Weinstock
3e94ce7ca5 Update dependencies; registrar, logr, logrusr
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-11-24 20:59:51 -07:00
Joel Rebello
1e73ef3638
go: switch test asset package; go mod tidy 2021-10-15 18:27:28 +02:00
Joel Rebello
4e2102595f
providers/asrockrack: implement UserCreate/UserList/UserUpdate bmc interface methods 2021-10-15 18:19:45 +02:00
Joel Rebello
fda3dba446
Update gofish dep to v0.12.0; update README 2021-10-14 14:47:07 +02:00
Jacob Weinstock
cc650d47e2 Add redfish provider:
redfish provider supporing power state and power set

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-03-25 14:44:22 -06:00
Jacob Weinstock
6a2d4a6141 Add pure go ipmi provider:
this provider has no external binary dependency
like the ipmitool provider does.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-03-25 14:38:56 -06:00
Jacob Weinstock
126d5d224c Update interface method helper funcs:
decrease indents by checking for nil in slices eariler
in loop.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-03-25 13:58:51 -06:00
Jacob Weinstock
8adfe3736c Update OpenConnectionFromInterfaces to remove failed opens:
Currently, if an implementation that opens a stateful session
in its Opener implementation fails when open is called and then
has a method called, for example, PowerStateGet, that needs to
use the session info, we will get a panic.

This code updates the OpenConnectionFromInterfaces to remove any
provider implementations that fails to open successfully.
We do this and then return a new registrar.Drivers from the Open
method in client.go.

This changes the existing client.go Open method signature.
Returning the registrar.Drivers instead of updating in place I
think is important. We don't want to hide the "magic" because
this can be confusing about why/which providers are being removed.
It also allows the end-user to have flexibility in deciding
if/when to use this newly updated registrar.Drivers.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-03-25 13:55:11 -06:00
Jacob Weinstock
247171c378 Use metadata struct:
Change the successfulProvider to be the bmc.Metadata
struct. This allows us to grow the metadata we can
provide during a method call.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-03-24 12:53:53 -06:00
Joel Rebello
56ed33d558 go mod tidy 2021-03-08 21:30:39 +01:00
Joel Rebello
096dd807fb lint fixes 2021-03-08 20:33:36 +01:00
oothman
e0d4a8d4e8 Update dependencies. 2021-02-16 17:29:00 +01:00
Omar Othman
4ddc5f9514 Update dependencies. 2021-02-02 18:32:50 +01:00
Jacob Weinstock
696e923c6a Update registrar version:
This new version fixes a provider ordering bug
in the FilterForCompatible function.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-01-15 21:09:42 -07:00
Jacob Weinstock
062ef08b26 Remove local registry package:
Replace the local registry package with github.com/jacobweinstock/registry
makes the registry much simpler to interact with and
removes the magic of init functions and package-level
variables. Makes registering providers more understandable
through explicit registration.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2021-01-14 21:05:35 -07:00
Jacob Weinstock
7648b284ca Add ipmitool provider tests
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-12-06 20:26:21 -07:00
Jacob Weinstock
686c908cf8 Add ipmitool implementation:
Add ipmitool implementation of new design interfaces.
power, boot device, bmc reset and user read have been
implemented. Added context to internal/ipmi calls.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-11-30 13:07:44 -07:00
Jacob Weinstock
25145bd5ab Add registry package:
Adds the ability to register implementations. InitRegistry()
returns a generic interface{} that will be type asserted or
switch(ed) on to convert it to a corresponding interface. The
interfaces are mapped to Feature types (like FeaturePowerState),
so implementations can define what functionality they implement.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-11-25 14:14:22 -07:00
Jacob Weinstock
7ab9db0b91 Clean up go.mod:
`go mod tidy` to remove unused imports.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-11-05 13:51:16 -07:00
Jacob Weinstock
6ec70d803e Add supermicro x11 support:
Add supermicro x11 support. update tests.

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-11-05 08:37:38 -07:00
Jacob Weinstock
1a1c39d5d8 update tests; add probe for x11 2020-11-05 08:34:05 -07:00
Jacob Weinstock
0c469bd53f Fix all linting errors:
Creates a clean base line for golangci-lint errors

Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
2020-11-04 18:01:48 -07:00
Jacob Weinstock
13026a9f7e
Generic logging interface (#135)
* use generic logging interface
2020-09-30 09:00:14 -06:00
Jacob Weinstock
da661ea014
update go to 1.15 (#134)
* update go to 1.15

* fix tests
2020-09-22 08:32:17 -06:00
Joel Rebello
16521d4d91 vendor: update deps 2019-11-25 11:28:02 +01:00
Juliano Martinez
795da7a5c8 remove apply cfg and fix tests 2019-09-20 17:31:49 +02:00
Juliano Martinez
2fc40aa711 fix lint 2019-04-10 12:36:56 +02:00
Juliano Martinez
30e9762560 move from govendor to go mod vendor 2019-04-10 12:17:45 +02:00