Scripting Object - VcApplyHostProfileConfigurationSpec

Parameter to
applyEntitiesConfig_Task
Returned by
hostdGenerateHostConfigTaskSpec

Scripting Object Description

The data object that contains the objects needed to remediate a host in host profile batch apply.

Attributes

Name Type Description
configSpecVcHostConfigSpec

Host configuration specification. This data is valid only if the status value is success. See {@link vim.profile.host.ExecuteResult.Status}.

Use this data object when you apply the configuration to a host. See the configSpec parameter to the {@link vim.profile.host.ProfileManager}.{@link vim.profile.host.ProfileManager#applyHostConfiguration} method. @since vSphere API 4.0

dynamicPropertyVcDynamicProperty []

@since Unknown
dynamicTypeString

@since Unknown
errorVcProfileExecuteError []

List of errors that were encountered during execute. This field will be set if status is set to error. @since vSphere API 4.0
faultDataVcLocalizedMethodFault

This contains the error details. @since vSphere API 6.5
hostVcHostSystem

The host to be remediated. @since vSphere API 6.5
inapplicablePathString []

List of property paths. Each path identifies a policy that does not apply to this host. For example, if the precheck policies for a port group are not satisfied, the port group will not be created when you apply the profile to the host. Based on this information, the client might not display that part of the profile tree. @since vSphere API 4.0
rebootHostBoolean

For regular apply, when some of the tasks requires reboot, that this variable istrue indicates that the reboot automatically happens in the batch profile apply than that the user will manually reboot the system later. For stateless host, this variable takes effect only when the variable rebootStateless above is false. @since vSphere API 6.5
rebootStatelessBoolean

For a stateless host, there are two approaches to apply a host profile: (1) Reboot the host and apply the host profile at boot time. (2) Apply the host profile directly from VC. We call this as regular apply. The variable rebootStateless allows users to choose the first approach from the two approaches above: apply host profile by rebooting this host. @since vSphere API 6.5
requireInputVcProfileDeferredPolicyOptionParameter []

List that describes the required input for host configuration and identifies any policy options that still require parameter data. Each entry in the list specifies the path to a policy and a parameter list. If the call to {@link vim.profile.host.HostProfile#execute} includes deferred parameters, the requireInput entries (requireInput[].{@link vim.profile.DeferredPolicyOptionParameter#parameter}[]) will be populated with the parameter data that was passed to the execute method. For policies that still require input data, the parameter list in the corresponding entry will be null.

A vSphere client that displays a GUI can use this information to show the host-specific configuration policy options. The client can highlight required input fields and ask the user for data in increments instead of collecting all of the input at once. For example, in the first pass, the client collects a minimum of user input and sends that to the Server. The Server evaluates the profile and might decide to invalidate a particular part of the subtree or enable a new subtree in the profile. This would result in a new set of invalid paths ({@link vim.profile.host.ExecuteResult#inapplicablePath}[]) and required input property paths ({@link vim.profile.DeferredPolicyOptionParameter}.{@link vim.profile.DeferredPolicyOptionParameter#inputPath}). The client can make a series of calls to the method until it achieves a success status.

When {@link vim.profile.host.HostProfile#execute} returns a success status, the requireInput list contains the complete list of parameters, consisting of the following data:

  • Deferred parameter values resolved through successive calls to {@link vim.profile.host.HostProfile#execute}.
  • Default parameter values from the host configuration.
  • User-specified values that override the defaults.

You can specify the returned requireInput list in the userInput parameter to the {@link vim.profile.host.ProfileManager}.{@link vim.profile.host.ProfileManager#applyHostConfiguration} method. The Server will use the list to update the {@link vim.profile.host.AnswerFile} associated with the host. @since vSphere API 4.0

statusString

Status of the profile execution operation. The value is a string that contains one of the {@link vim.profile.host.ExecuteResult.Status} enumerations. @since vSphere API 4.0
taskDescriptionVcLocalizableMessage []

Description of tasks that will be performed on the host to carry out HostProfile application. @since vSphere API 6.5
taskListRequirementString []

The task requirements from the results of {@link vim.profile.host.ProfileManager#generateConfigTaskList} method @since vSphere API 6.5

Methods

Methods defined in this Scripting Object
isRebootHost, isRebootStateless

isRebootStateless

For a stateless host, there are two approaches to apply a host profile: (1) Reboot the host and apply the host profile at boot time. (2) Apply the host profile directly from VC. We call this as regular apply. The variable rebootStateless allows users to choose the first approach from the two approaches above: apply host profile by rebooting this host. @since vSphere API 6.5

Parameters

NameTypeDescription
None

Return Value

Type Description
Boolean

isRebootHost

For regular apply, when some of the tasks requires reboot, that this variable istrue indicates that the reboot automatically happens in the batch profile apply than that the user will manually reboot the system later. For stateless host, this variable takes effect only when the variable rebootStateless above is false. @since vSphere API 6.5

Parameters

NameTypeDescription
None

Return Value

Type Description
Boolean