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>
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.
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>
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>
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>
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>
* 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>
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>
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>
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>
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>
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>