go-wsman-messages

module
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0

README

go-wsman-messages

CodeQL Build Codecov OSSF-Scorecard Score Discord

Disclaimer: Production viable releases are tagged and listed under 'Releases'. All other check-ins should be considered 'in-development' and should not be used in production

This repository contains a Go library that implements APIs for communicating with Intel® Active Management Technology (AMT) capable platforms. These APIs are based on the AMT SDK documentation, which can be found here.

How to use it

To use this library, you need to import it in your Go project:

import "github.com/open-amt-cloud-toolkit/go-wsman-messages"

Then, you can create an instance of the wsman.Messages struct by passing in the client parameters using the client.Parameters struct. For example:

clientParams := client.Parameters{
    Target:             "192.168.0.120",
    Username:           "admin",
    Password:           "amtP@ssw0rd",
    UseDigest:          true,
    UseTLS:             true,
    SelfSignedAllowed:  true,
    LogAMTMessages:     true,
}
wsmanMessages := wsman.NewMessages(clientParams)

Next, you can call the various methods of the wsman.Messages struct. Go-wsman-messages will authenticate with AMT using the client parameters provided and send the message to the Intel® AMT device and handle the response, returning a package specific Response struct or error message. For example, to get the general settings of an Intel® AMT device, you can do:

response, err := wsmanMessages.AMT.GeneralSettings.Get()
if err != nil {
    // handle error
}
// process response

Dev tips for passing CI Checks

  • Ensure code is formatted correctly with gofmt -s -w ./
  • Ensure all unit tests pass with go test ./...
  • Ensure code has been linted with docker run --rm -v ${pwd}:/app -w /app golangci/golangci-lint:v1.52.2 golangci-lint run -v

Directories

Path Synopsis
internal
pkg
apf
********************************************************************
********************************************************************
wsman
Package wsman facilitates access to AMT, CIM, and IPS classes for communication with Intel® AMT devices.
Package wsman facilitates access to AMT, CIM, and IPS classes for communication with Intel® AMT devices.
wsman/amt
Package amt implements AMT classes to support communicating with Intel® AMT Devices
Package amt implements AMT classes to support communicating with Intel® AMT Devices
wsman/amt/alarmclock
Package alarmclock facilitates communication with Intel® AMT devices to set an alarm time to turn the host computer system on.
Package alarmclock facilitates communication with Intel® AMT devices to set an alarm time to turn the host computer system on.
wsman/amt/auditlog
Package auditlog facilitates communication with Intel® AMT devices to read the audit log records
Package auditlog facilitates communication with Intel® AMT devices to read the audit log records
wsman/amt/authorization
Package authorization facilitates communication with Intel® AMT devices to manage access control list (ACL) entries.
Package authorization facilitates communication with Intel® AMT devices to manage access control list (ACL) entries.
wsman/amt/boot
Package boot facilitates communication with Intel® AMT devices to access the boot capabilities and boot setting data.
Package boot facilitates communication with Intel® AMT devices to access the boot capabilities and boot setting data.
wsman/amt/environmentdetection
Package environmentdetection facilitates communication with Intel® AMT device configuration-related and operational parameters for the Environment Detection service in Intel® AMT.
Package environmentdetection facilitates communication with Intel® AMT device configuration-related and operational parameters for the Environment Detection service in Intel® AMT.
wsman/amt/ethernetport
Package ethernetport facilitates communication with Intel® AMT devices to configure all Intel® AMT network specific settings (IP, DHCP, VLAN).
Package ethernetport facilitates communication with Intel® AMT devices to configure all Intel® AMT network specific settings (IP, DHCP, VLAN).
wsman/amt/general
Package general facilitates communication with Intel® AMT to read and configure the device's Intel® AMT general settings.
Package general facilitates communication with Intel® AMT to read and configure the device's Intel® AMT general settings.
wsman/amt/ieee8021x
Package ieee8021x facilitiates communication with Intel® AMT devices to access the ieee8021x credential context and profile settings
Package ieee8021x facilitiates communication with Intel® AMT devices to access the ieee8021x credential context and profile settings
wsman/amt/kerberos
Package kerberos facilitiates communication with Intel® AMT devices to access the configuration-related and operational parameters for the kerberos service in the Intel® AMT.
Package kerberos facilitiates communication with Intel® AMT devices to access the configuration-related and operational parameters for the kerberos service in the Intel® AMT.
wsman/amt/managementpresence
Package managementpresence facilitiates communication with Intel® AMT devices to configure Management Presence Remote Service Access Points (or an MPS) to be accessed by the Intel® AMT subsystem from remote.
Package managementpresence facilitiates communication with Intel® AMT devices to configure Management Presence Remote Service Access Points (or an MPS) to be accessed by the Intel® AMT subsystem from remote.
wsman/amt/messagelog
Package messagelog facilitiates communication with Intel® AMT devices to provide access to the AMT event log.
Package messagelog facilitiates communication with Intel® AMT devices to provide access to the AMT event log.
wsman/amt/methods
Package methods provides utility functions used across the amt packages
Package methods provides utility functions used across the amt packages
wsman/amt/mps
Package mps facilitiates communication with Intel® AMT devices to configure the username and password used to access an MPS.
Package mps facilitiates communication with Intel® AMT devices to configure the username and password used to access an MPS.
wsman/amt/publickey
Package publickey facilitiates communication with Intel® AMT devices to access and configure Public Key Certificates and Public Key Management Service classes for AMT
Package publickey facilitiates communication with Intel® AMT devices to access and configure Public Key Certificates and Public Key Management Service classes for AMT
wsman/amt/publicprivate
Package publicprivate facilitiates communication with Intel® AMT devices to manage a public-private key in the Intel® AMT CertStore.
Package publicprivate facilitiates communication with Intel® AMT devices to manage a public-private key in the Intel® AMT CertStore.
wsman/amt/redirection
Package redirection facilitiates communication with Intel® AMT devices to configure the IDER and SOL redirection functionalities
Package redirection facilitiates communication with Intel® AMT devices to configure the IDER and SOL redirection functionalities
wsman/amt/remoteaccess
Package remoteaccess facilitiates communication with Intel® AMT devices to access and configure Remote Access Policy Applies to MPS, Remote Access Policy Rules, and Remote Access Service.
Package remoteaccess facilitiates communication with Intel® AMT devices to access and configure Remote Access Policy Applies to MPS, Remote Access Policy Rules, and Remote Access Service.
wsman/amt/setupandconfiguration
Package setupandconfiguration facilitiates communication with Intel® AMT devices to access and interact with the Setup and Configuration Service, which is the logic in Intel® AMT that responds to Setup and Configuration requests.
Package setupandconfiguration facilitiates communication with Intel® AMT devices to access and interact with the Setup and Configuration Service, which is the logic in Intel® AMT that responds to Setup and Configuration requests.
wsman/amt/timesynchronization
Package timesynchronization facilitiates communication with Intel® AMT devices to synchronize the AMT internal clock with an external clock
Package timesynchronization facilitiates communication with Intel® AMT devices to synchronize the AMT internal clock with an external clock
wsman/amt/tls
Package tls facilitiates communication with Intel® AMT devices to access and configure TLS Credential Context, TLS Protocol Endpoint Collection, and TLS Setting Data features of AMT
Package tls facilitiates communication with Intel® AMT devices to access and configure TLS Credential Context, TLS Protocol Endpoint Collection, and TLS Setting Data features of AMT
wsman/amt/userinitiatedconnection
Package userinitiatedconnection facilitiates communication with Intel® AMT devices to access and change the state of the user initiated connection feature of AMT.
Package userinitiatedconnection facilitiates communication with Intel® AMT devices to access and change the state of the user initiated connection feature of AMT.
wsman/amt/wifiportconfiguration
Package wifiportconfiguration facilitiates communication with Intel® AMT devices to provides management of the Wi-Fi network interfaces associated with a Wi-Fi network port.
Package wifiportconfiguration facilitiates communication with Intel® AMT devices to provides management of the Wi-Fi network interfaces associated with a Wi-Fi network port.
wsman/cim
********************************************************************
********************************************************************
wsman/cim/actions
Package actions holds generic action constants for various AMT commands
Package actions holds generic action constants for various AMT commands
wsman/cim/bios
Package bios facilitiates communication with Intel® AMT devices to get information about the device bios element
Package bios facilitiates communication with Intel® AMT devices to get information about the device bios element
wsman/cim/boot
Package boot facilitates communication with Intel® AMT devices to access and configure Boot Config Setting, Boot Service, and Boot Source Setting features of AMT.
Package boot facilitates communication with Intel® AMT devices to access and configure Boot Config Setting, Boot Service, and Boot Source Setting features of AMT.
wsman/cim/card
Package card facilitates communication with Intel® AMT devices to represent a type of physical container that can be plugged into another Card or HostingBoard, or is itself a HostingBoard/Motherboard in a Chassis
Package card facilitates communication with Intel® AMT devices to represent a type of physical container that can be plugged into another Card or HostingBoard, or is itself a HostingBoard/Motherboard in a Chassis
wsman/cim/chassis
Package chassis facilitates communication with Intel® AMT devices to represent the PhysicalElements that enclose other Elements and provide definable functionality, such as a desktop, processing node, UPS, disk or tape storage, or a combination of these.
Package chassis facilitates communication with Intel® AMT devices to represent the PhysicalElements that enclose other Elements and provide definable functionality, such as a desktop, processing node, UPS, disk or tape storage, or a combination of these.
wsman/cim/chip
Package chip facilitates communication with Intel® AMT devices to represent any type of integrated circuit hardware, including ASICs, processors, memory chips, etc.
Package chip facilitates communication with Intel® AMT devices to represent any type of integrated circuit hardware, including ASICs, processors, memory chips, etc.
wsman/cim/computer
Package computer facilitates communication with Intel® AMT devices in a way similar to the way that LogicalDevices are 'Realized' by PhysicalElements, however ComputerSystem may be realized realized in one or more PhysicalPackages.
Package computer facilitates communication with Intel® AMT devices in a way similar to the way that LogicalDevices are 'Realized' by PhysicalElements, however ComputerSystem may be realized realized in one or more PhysicalPackages.
wsman/cim/concrete
Package concrete facilitates communication with Intel® AMT devices and is a generic association used to establish dependency relationships between ManagedElements.
Package concrete facilitates communication with Intel® AMT devices and is a generic association used to establish dependency relationships between ManagedElements.
wsman/cim/credential
Package credential facilitates communication with Intel® AMT devices in order to define a context (e.g., a System or Service) of a Credential.
Package credential facilitates communication with Intel® AMT devices in order to define a context (e.g., a System or Service) of a Credential.
wsman/cim/ieee8021x
Package ieee8021x facilitates communication with Intel® AMT devices and specifies a set of IEEE 802.1x Port-Based Network Access Control settings that can be applied to a ISO OSI layer 2 ProtocolEndpoint.
Package ieee8021x facilitates communication with Intel® AMT devices and specifies a set of IEEE 802.1x Port-Based Network Access Control settings that can be applied to a ISO OSI layer 2 ProtocolEndpoint.
wsman/cim/kvm
Package kvm facilitates communication with Intel® AMT devices derived from Service Access Point, that describes an access point to start the KVM redirection.
Package kvm facilitates communication with Intel® AMT devices derived from Service Access Point, that describes an access point to start the KVM redirection.
wsman/cim/mediaaccess
Package mediaaccess facilitiates communication with Intel® AMT devices to represent the ability to access one or more media and use this media to store and retrieve data.
Package mediaaccess facilitiates communication with Intel® AMT devices to represent the ability to access one or more media and use this media to store and retrieve data.
wsman/cim/methods
Package methods provides utility functions used across the cim packages
Package methods provides utility functions used across the cim packages
wsman/cim/models
Package models provides a set of utility types, constants, and functions that are used broadly across amt, cim, and ips packages
Package models provides a set of utility types, constants, and functions that are used broadly across amt, cim, and ips packages
wsman/cim/physical
Package physical facilitates communications with Intel® AMT devices to get the PhysicalMemory as a subclass of CIM_Chip, representing low level memory devices - SIMMS, DIMMs, raw memory chips, etc.
Package physical facilitates communications with Intel® AMT devices to get the PhysicalMemory as a subclass of CIM_Chip, representing low level memory devices - SIMMS, DIMMs, raw memory chips, etc.
wsman/cim/power
Package power facilitates communication with Intel® AMT devices where a class derived from Service describes power management functionality, hosted on a System.
Package power facilitates communication with Intel® AMT devices where a class derived from Service describes power management functionality, hosted on a System.
wsman/cim/processor
Package processor facilitates communication with Intel® AMT devices capabilities and management of the Processor LogicalDevice
Package processor facilitates communication with Intel® AMT devices capabilities and management of the Processor LogicalDevice
wsman/cim/service
Package service facilitates communication with Intel® AMT devices to convey the semantics of a Service that is available for the use of a ManagedElement.
Package service facilitates communication with Intel® AMT devices to convey the semantics of a Service that is available for the use of a ManagedElement.
wsman/cim/software
Package software facilitates communication with Intel® AMT devices to provide descriptive information about a software component for asset tracking and/or installation dependency management.
Package software facilitates communication with Intel® AMT devices to provide descriptive information about a software component for asset tracking and/or installation dependency management.
wsman/cim/system
Package system facilitates communication with Intel® AMT devices in a way similar to the way that LogicalDevices are 'Realized' by PhysicalElements, Systems can be associated with specific packaging or PhysicalElements.
Package system facilitates communication with Intel® AMT devices in a way similar to the way that LogicalDevices are 'Realized' by PhysicalElements, Systems can be associated with specific packaging or PhysicalElements.
wsman/cim/wifi
Package WiFi facilitates communication with Intel® AMT devices to access and configure WiFi Endpoint Settings and WiFi Port features of AMT.
Package WiFi facilitates communication with Intel® AMT devices to access and configure WiFi Endpoint Settings and WiFi Port features of AMT.
wsman/client
********************************************************************
********************************************************************

Jump to

Keyboard shortcuts

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