Documentation ¶
Overview ¶
Package redirection facilitiates communication with Intel® AMT devices to configure the IDER and SOL redirection functionalities
Index ¶
- Constants
- type Body
- type EnabledState
- type PullResponse
- type RedirectionRequest
- type RedirectionResponse
- type RequestStateChange_OUTPUT
- type RequestedState
- type Response
- type Service
- func (service Service) Enumerate() (response Response, err error)
- func (service Service) Get() (response Response, err error)
- func (service Service) Pull(enumerationContext string) (response Response, err error)
- func (service Service) Put(redirectionService RedirectionRequest) (response Response, err error)
- func (service Service) RequestStateChange(requestedState RequestedState) (response Response, err error)
Constants ¶
const ( AMT_RedirectionService string = "AMT_RedirectionService" RequestStateChange string = "RequestStateChange" )
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 = 32768 IDERIsEnabledAndSOLIsDisabled = 32769 SOLIsEnabledAndIDERIsDisabled = 32770 IDERAndSOLAreEnabled = 32771 )
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. AccessLog []string `xml:"AccessLog,omitempty"` // Read only. 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' }
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 int `xml:"ReturnValue"` }
OUTPUT Response Types
type RequestedState ¶
type RequestedState int
The state requested for the element. This information will be placed into the RequestedState property of the instance if the return code of the RequestStateChange method is 0 ('Completed with No Error'), 3 ('Timeout'), or 4096 (0x1000) ('Job Started'). Refer to the description of the EnabledState and RequestedState properties for the detailed explanations of the RequestedState values.
ValueMap={2, 3, 4, 6, 7, 8, 9, 10, 11, .., 32768, 32769, 32770, 32771, 32772..65535}
Values={Enabled, Disabled, Shut Down, Offline, Test, Defer, Quiesce, Reboot, Reset, DMTF Reserved, disable IDER and SOL, enable IDER and disable SOL, enable SOL and disable IDER, enable IDER and SOL, Vendor Reserved}
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
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 ¶
Enumerate returns an enumeration context which is used in a subsequent Pull call
func (Service) Pull ¶
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.