redirection

package
v2.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package redirection facilitiates communication with Intel® AMT devices to configure the IDER and SOL redirection functionalities

Index

Constants

View Source
const (
	AMTRedirectionService string = "AMT_RedirectionService"
	RequestStateChange    string = "RequestStateChange"
	ValueNotFound         string = "Value not found in map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName                   xml.Name                  `xml:"Body"`
	GetAndPutResponse         RedirectionResponse       `xml:"AMT_RedirectionService"`
	RequestStateChange_OUTPUT RequestStateChange_OUTPUT `xml:"RequestStateChange_OUTPUT"`
	EnumerateResponse         common.EnumerateResponse
	PullResponse              PullResponse
}

OUTPUT Response Types.

type EnabledState

type EnabledState int

EnabledState is an integer enumeration that indicates the enabled and disabled states of an element. It can also indicate the transitions between these requested states. For example, shutting down (value=4) and starting (value=10) are transient states between enabled and disabled. The following text briefly summarizes the various enabled and disabled states:

Enabled (2) indicates that the element is or could be executing commands, will process any queued commands, and queues new requests.

Disabled (3) indicates that the element will not execute commands and will drop any new requests.

Shutting Down (4) indicates that the element is in the process of going to a Disabled state.

Not Applicable (5) indicates the element does not support being enabled or disabled.

Enabled but Offline (6) indicates that the element might be completing commands, and will drop any new requests.

Test (7) indicates that the element is in a test state.

Deferred (8) indicates that the element might be completing commands, but will queue any new requests.

Quiesce (9) indicates that the element is enabled but in a restricted mode. The behavior of the element is similar to the Enabled state, but it processes only a restricted set of commands. All other requests are queued.

Starting (10) indicates that the element is in the process of going to an Enabled state. New requests are queued.

ValueMap={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11..32767, 32768, 32769, 32770, 32771, 32772..65535}

Values={Unknown, Other, Enabled, Disabled, Shutting Down, Not Applicable, Enabled but Offline, In Test, Deferred, Quiesce, Starting, DMTF Reserved, IDER and SOL are disabled, IDER is enabled and SOL is disabled, SOL is enabled and IDER is disabled, IDER and SOL are enabled, Vendor Reserved}.

const (
	Unknown EnabledState = iota
	Other
	Enabled
	Disabled
	ShuttingDown
	NotApplicable
	EnabledButOffline
	InTest
	Deferred
	Quiesce
	Starting
	DMTFReserved
	IDERAndSOLAreDisabled         EnabledState = 32768
	IDERIsEnabledAndSOLIsDisabled EnabledState = 32769
	SOLIsEnabledAndIDERIsDisabled EnabledState = 32770
	IDERAndSOLAreEnabled          EnabledState = 32771
)

func (EnabledState) String added in v2.2.4

func (es EnabledState) String() string

type PullResponse

type PullResponse struct {
	XMLName          xml.Name              `xml:"PullResponse"`
	RedirectionItems []RedirectionResponse `xml:"Items>AMT_RedirectionService"`
}

OUTPUT Response Types.

type RedirectionRequest

type RedirectionRequest struct {
	XMLName                 xml.Name     `xml:"h:AMT_RedirectionService"`
	H                       string       `xml:"xmlns:h,attr"`
	CreationClassName       string       `xml:"h:CreationClassName,omitempty"`       // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
	ElementName             string       `xml:"h:ElementName,omitempty"`             // A user-friendly name for the object. This property allows each instance to define a user-friendly name in addition to its key properties, identity data, and description information. Note that the Name property of ManagedSystemElement is also defined as a user-friendly name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of LogicalDevice), the same information can be present in both the Name and ElementName properties. Note that if there is an associated instance of CIM_EnabledLogicalElementCapabilities, restrictions on this properties may exist as defined in ElementNameMask and MaxElementNameLen properties defined in that class.
	EnabledState            EnabledState `xml:"h:EnabledState"`                      // EnabledState is an integer enumeration that indicates the enabled and disabled states of an element.
	ListenerEnabled         bool         `xml:"h:ListenerEnabled"`                   // Describes the listener state of this service. The service is operational only if its EnabledState is set to Enabled (by the Intel® AMT Administrator) and the ListenerEnabled is set to TRUE (by a RedirectionRealm user)
	Name                    string       `xml:"h:Name,omitempty"`                    // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
	SystemCreationClassName string       `xml:"h:SystemCreationClassName,omitempty"` // The CreationClassName of the scoping System.
	SystemName              string       `xml:"h:SystemName,omitempty"`              // The Name of the scoping System.
}

INPUT Request Types.

type RedirectionResponse

type RedirectionResponse struct {
	XMLName                 xml.Name     `xml:"AMT_RedirectionService"`
	CreationClassName       string       `xml:"CreationClassName,omitempty"`       // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
	ElementName             string       `xml:"ElementName,omitempty"`             // A user-friendly name for the object. This property allows each instance to define a user-friendly name in addition to its key properties, identity data, and description information. Note that the Name property of ManagedSystemElement is also defined as a user-friendly name. But, it is often subclassed to be a Key. It is not reasonable that the same property can convey both identity and a user-friendly name, without inconsistencies. Where Name exists and is not a Key (such as for instances of LogicalDevice), the same information can be present in both the Name and ElementName properties. Note that if there is an associated instance of CIM_EnabledLogicalElementCapabilities, restrictions on this properties may exist as defined in ElementNameMask and MaxElementNameLen properties defined in that class.
	EnabledState            EnabledState `xml:"EnabledState"`                      // EnabledState is an integer enumeration that indicates the enabled and disabled states of an element.
	ListenerEnabled         bool         `xml:"ListenerEnabled"`                   // Describes the listener state of this service. The service is operational only if its EnabledState is set to Enabled (by the Intel® AMT Administrator) and the ListenerEnabled is set to TRUE (by a RedirectionRealm user)
	Name                    string       `xml:"Name,omitempty"`                    // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. This functionality is described in more detail in the Description property of the object.
	SystemCreationClassName string       `xml:"SystemCreationClassName,omitempty"` // The CreationClassName of the scoping System.
	SystemName              string       `xml:"SystemName,omitempty"`              // The Name of the scoping System.
	AccessLog               []string     `xml:"AccessLog,omitempty"`               // A list of string elements, describing recent IDE redirection operations. The format of each element is: 'Date (MM/DD/YYYY), Time (hh:mm:ss), IP:Port'
}

OUTPUT Response Types.

type RequestStateChange_OUTPUT

type RequestStateChange_OUTPUT struct {
	XMLName xml.Name `xml:"RequestStateChange_OUTPUT"`
	// ValueMap={0, 1, 2, 3, 4, 5, 6, .., 4096, 4097, 4098, 4099, 4100..32767, 32768..65535}
	//
	// Values={Completed with No Error, Not Supported, Unknown or Unspecified Error, Cannot complete within Timeout Period, Failed, Invalid Parameter, In Use, DMTF Reserved, Method Parameters Checked - Job Started, Invalid State Transition, Use of Timeout Parameter Not Supported, Busy, Method Reserved, Vendor Specific}
	ReturnValue ReturnValue `xml:"ReturnValue"`
}

OUTPUT Response Types.

type RequestedState

type RequestedState int

The state requested for the element. The only valid values that should be used when requesting a state change to redirection are: 32768, 32769, 32770, and 32771.

ValueMap={32768, 32769, 32770, 32771}

Values={disable IDER and SOL, enable IDER and disable SOL, enable SOL and disable IDER, enable IDER and SOL}.

const (
	DisableIDERAndSOL       RequestedState = 32768
	EnableIDERAndDisableSOL RequestedState = 32769
	EnableSOLAndDisableIDER RequestedState = 32770
	EnableIDERAndSOL        RequestedState = 32771
)

type Response

type Response struct {
	*client.Message
	XMLName xml.Name       `xml:"Envelope"`
	Header  message.Header `xml:"Header"`
	Body    Body           `xml:"Body"`
}

OUTPUT Response Types.

func (*Response) JSON

func (r *Response) JSON() string

JSON marshals the type into JSON format.

func (*Response) YAML

func (r *Response) YAML() string

YAML marshals the type into YAML format.

type ReturnValue added in v2.2.4

type ReturnValue int

ReturnValue is an integer enumeration that indicates the completion status of the method. A value of 0 indicates success. A non-zero value indicates an error.

const (
	CompletedWithNoError              ReturnValue = 0
	NotSupported                      ReturnValue = 1
	UnknownOrUnspecified              ReturnValue = 2
	CannotCompleteWithinTimeoutPeriod ReturnValue = 3
	Failed                            ReturnValue = 4
	InvalidParameter                  ReturnValue = 5
	InUse                             ReturnValue = 6
	MethodParametersCheckedJobStarted ReturnValue = 4096
	InvalidStateTransition            ReturnValue = 4097
	UseOfTimeoutParameterNotSupported ReturnValue = 4098
	Busy                              ReturnValue = 4099
)

func (ReturnValue) String added in v2.2.4

func (rv ReturnValue) String() string

String returns a string representation of ReturnValue.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewRedirectionServiceWithClient

func NewRedirectionServiceWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Service

NewRedirectionServiceWithClient instantiates a new Service.

func (Service) Enumerate

func (service Service) Enumerate() (response Response, err error)

Enumerate returns an enumeration context which is used in a subsequent Pull call.

func (Service) Get

func (service Service) Get() (response Response, err error)

Get retrieves the representation of the instance.

func (Service) Pull

func (service Service) Pull(enumerationContext string) (response Response, err error)

Pull returns the instances of this class. An enumeration context provided by the Enumerate call is used as input.

func (Service) Put

func (service Service) Put(redirectionService RedirectionRequest) (response Response, err error)

Put changes properties of the selected instance. The following properties must be included in any representation of AMT_RedirectionService:

- Name(cannot be modified)

- CreationClassName(cannot be modified)

- SystemName (cannot be modified)

- SystemCreationClassName (cannot be modified)

- ListenerEnabled.

func (Service) RequestStateChange

func (service Service) RequestStateChange(requestedState RequestedState) (response Response, err error)

RequestStateChange requests that AMT change the state of the element to the value specified in the RequestedState parameter. When the requested state change takes place, the EnabledState and RequestedState of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition.

Jump to

Keyboard shortcuts

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