1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453
|
.. _str: https://docs.python.org/2/library/stdtypes.html
.. _config: ../../../vim/profile/Profile.rst#config
.. _vswitch: ../../../vim/profile/host/NetworkProfile.rst#vswitch
.. _vim.Task: ../../../vim/Task.rst
.. _userInput: ../../../vim/profile/host/AnswerFile.rst#userInput
.. _AnswerFile: ../../../vim/profile/host/AnswerFile.rst
.. _HostProfile: ../../../vim/profile/host/HostProfile.rst
.. _applyProfile: ../../../vim/profile/host/HostProfile/ConfigInfo.rst#applyProfile
.. _NetworkProfile: ../../../vim/profile/host/NetworkProfile.rst
.. _vim.HostSystem: ../../../vim/HostSystem.rst
.. _vSphere API 5.5: ../../../vim/version.rst#vimversionversion9
.. _vSphere API 5.1: ../../../vim/version.rst#vimversionversion8
.. _vSphere API 5.0: ../../../vim/version.rst#vimversionversion7
.. _vSphere API 4.0: ../../../vim/version.rst#vimversionversion5
.. _UpdateHostProfile: ../../../vim/profile/host/HostProfile.rst#update
.. _vim.host.ConfigSpec: ../../../vim/host/ConfigSpec.rst
.. _vim.profile.Profile: ../../../vim/profile/Profile.rst
.. _VirtualSwitchProfile: ../../../vim/profile/host/VirtualSwitchProfile.rst
.. _GenerateConfigTaskList: ../../../vim/profile/host/ProfileManager.rst#generateConfigTaskList
.. _vim.fault.InvalidState: ../../../vim/fault/InvalidState.rst
.. _vim.profile.ApplyProfile: ../../../vim/profile/ApplyProfile.rst
.. _vim.profile.ProfileManager: ../../../vim/profile/ProfileManager.rst
.. _vim.fault.HostConfigFailed: ../../../vim/fault/HostConfigFailed.rst
.. _CheckAnswerFileStatus_Task: ../../../vim/profile/host/ProfileManager.rst#checkAnswerFileStatus
.. _vim.profile.ProfileMetadata: ../../../vim/profile/ProfileMetadata.rst
.. _vmodl.fault.InvalidArgument: ../../../vmodl/fault/InvalidArgument.rst
.. _vim.profile.host.AnswerFile: ../../../vim/profile/host/AnswerFile.rst
.. _vim.profile.ProfileStructure: ../../../vim/profile/ProfileStructure.rst
.. _HostProfileCompleteConfigSpec: ../../../vim/profile/host/HostProfile/CompleteConfigSpec.rst
.. _vim.fault.AnswerFileUpdateFailed: ../../../vim/fault/AnswerFileUpdateFailed.rst
.. _vim.profile.host.HostApplyProfile: ../../../vim/profile/host/HostApplyProfile.rst
.. _HostProfileManagerAnswerFileStatus: ../../../vim/profile/host/ProfileManager/AnswerFileStatus.rst
.. _vim.fault.InvalidProfileReferenceHost: ../../../vim/fault/InvalidProfileReferenceHost.rst
.. _vim.profile.host.AnswerFileStatusResult: ../../../vim/profile/host/AnswerFileStatusResult.rst
.. _vim.profile.DeferredPolicyOptionParameter: ../../../vim/profile/DeferredPolicyOptionParameter.rst
.. _vim.profile.host.ProfileManager.ConfigTaskList: ../../../vim/profile/host/ProfileManager/ConfigTaskList.rst
.. _vim.profile.host.ProfileManager.AnswerFileCreateSpec: ../../../vim/profile/host/ProfileManager/AnswerFileCreateSpec.rst
vim.profile.host.ProfileManager
===============================
The `HostProfileManager`_ provides access to a list of `HostProfile`_ s and it defines methods to manipulate profiles and `AnswerFile`_ s.
:extends: vim.profile.ProfileManager_
:since: `vSphere API 4.0`_
Attributes
----------
Methods
-------
ApplyHostConfig(host, configSpec, userInput):
Apply the configuration to the host. If you specify any user input, the configuration will be saved in the `AnswerFile`_ associated with the host. If there is no answer file, the Profile Engine will create one.
Privilege:
dynamic
Args:
host (`vim.HostSystem`_):
Host to be updated. User must have sufficient credentials and privileges to satisfy the contents of theconfigSpec.
configSpec (`vim.host.ConfigSpec`_):
Set of configuration changes to be applied to the host. The changes are returned by the `HostProfile`_ . `ExecuteHostProfile`_ method in the `ProfileExecuteResult`_ . `configSpec`_ property.
userInput (`vim.profile.DeferredPolicyOptionParameter`_, optional, since `vSphere API 5.0`_ ):
Additional host-specific data to be applied to the host. This data is the complete list of deferred parameters verified by the `HostProfile`_ . `ExecuteHostProfile`_ method, contained in the `ProfileExecuteResult`_ object returned by the method.
Returns:
`vim.Task`_:
Raises:
`vim.fault.InvalidState`_:
if the host is not in maintenance mode and the configuration specification requires it.
`vim.fault.HostConfigFailed`_:
if the ESX Server cannot apply the configuration changes.
GenerateConfigTaskList(configSpec, host):
Generate a list of configuration tasks that will be performed on the host during HostProfile application.
Privilege:
System.View
Args:
configSpec (`vim.host.ConfigSpec`_):
ConfigSpec which was proposed by `ExecuteHostProfile`_ method.
host (`vim.HostSystem`_):
Host on which the HostProfile application needs to be carried out.
Returns:
`vim.profile.host.ProfileManager.ConfigTaskList`_:
List of Configuration tasks.
GenerateHostProfileTaskList(configSpec, host):
Generate a list of configuration tasks that will be performed on the host during HostProfile application. This differs from the `GenerateConfigTaskList`_ method in that it returns a task to monitor the progress of the operation.
since: `vSphere API 5.5`_
Privilege:
System.View
Args:
configSpec (`vim.host.ConfigSpec`_):
ConfigSpec which was proposed by `ExecuteHostProfile`_ method.
host (`vim.HostSystem`_):
Host on which the HostProfile application needs to be carried out.
Returns:
`vim.Task`_:
List of Configuration tasks.
QueryHostProfileMetadata(profileName, profile):
Retrieve the metadata for a set of profiles.
Privilege:
System.View
Args:
profileName (`str`_, optional):
Names of the profiles for which metadata is requested. If not set, the method returns metadata for all the profiles.
profile (`vim.profile.Profile`_, optional, since `vSphere API 5.0`_ ):
Base profile whose context needs to be used during the operation
Returns:
[`vim.profile.ProfileMetadata`_]:
List of profile metadata objects.
Raises:
`vmodl.fault.InvalidArgument`_:
If profileName parameter is invalid.
`vim.fault.InvalidProfileReferenceHost`_:
if the reference host associated with the profile is incompatible or there is no reference host for the profile.
QueryProfileStructure(profile):
Get information about the structure of the profile.
since: `vSphere API 5.0`_
Privilege:
System.View
Args:
profile (`vim.profile.Profile`_, optional, since `vSphere API 5.0`_ ):
Base profile whose context needs to be used during the operation
Returns:
`vim.profile.ProfileStructure`_:
The profile structure.
Raises:
`vim.fault.InvalidProfileReferenceHost`_:
if the reference host associated with the profile is incompatible or there is no reference host for the profile.
CreateDefaultProfile(profileType, profileTypeName, profile):
Create a default subprofile of a given type (for example, a `VirtualSwitchProfile`_ ). After you create the subprofile, you can add it to a configuration specification and update the host profile:
* Call the
* CreateDefaultProfile
* method.
* Create a
* `HostProfileCompleteConfigSpec`_
* object.
* Copy the existing profile from the host configuration information (
* `HostProfile`_
* .
* `config`_
* .
* `applyProfile`_
* ) to the configuration specification.
* Add the new subprofile to the configuration specification. For example, if you create a
* VirtualSwitchProfile
* , you would add it to the list of virtual switches in the network profile for the configuration specification (
* `NetworkProfile`_
* .
* `vswitch`_
* []).
* Call
* `HostProfile`_
* .
* `UpdateHostProfile`_
* to save the new subprofile.
Privilege:
System.View
Args:
profileType (`str`_):
Type of profile to create. The profile types are system-defined ( `ApplyProfile`_ . `profileTypeName`_ ).
profileTypeName (`str`_, optional, since `vSphere API 5.0`_ ):
If specified, the method returns a profile object containing data for the named profile. The type name does not have to be system-defined. A user-defined profile can include various dynamically-defined profiles.
profile (`vim.profile.Profile`_, optional, since `vSphere API 5.0`_ ):
Base profile used during the operation.
Returns:
`vim.profile.ApplyProfile`_:
Derived subprofile of typeprofileType.
Raises:
`vmodl.fault.InvalidArgument`_:
If either the profileType or profileTypeName is incorrect.
`vim.fault.InvalidProfileReferenceHost`_:
if the reference host associated with the profile is incompatible or there is no reference host for the profile.
UpdateAnswerFile(host, configSpec):
Update the `AnswerFile`_ for the specified host. If there is no answer file associated with the host, the Profile Engine uses the answer file configuration specification to create a new one.
since: `vSphere API 5.0`_
Privilege:
Profile.Edit
Args:
host (`vim.HostSystem`_):
Host with which the answer file is associated.
configSpec (`vim.profile.host.ProfileManager.AnswerFileCreateSpec`_):
Host-specific configuration data. If the configuration specification does not contain any host-specific user input (configSpec. `userInput`_ ), the method does not perform any operation on the answer file.
Returns:
`vim.Task`_:
Raises:
`vim.fault.AnswerFileUpdateFailed`_:
If the answer file could not be updated.
`vmodl.fault.InvalidArgument`_:
If the input parameteres are incorrect.
RetrieveAnswerFile(host):
Returns the answer file associated with a particular host.
since: `vSphere API 5.0`_
Privilege:
Args:
host (`vim.HostSystem`_):
Host with which the answer file is associated.
Returns:
`vim.profile.host.AnswerFile`_:
Answer file object will be returned if it exists.
RetrieveAnswerFileForProfile(host, applyProfile):
Returns the answer file associated with a particular host, augmented with whatever answer file values are required for the supplied host profile.
since: `vSphere API 5.1`_
Privilege:
Args:
host (`vim.HostSystem`_):
Host with which the answer file is associated.
applyProfile (`vim.profile.host.HostApplyProfile`_):
Profile configuration used to generate answer file
Returns:
`vim.profile.host.AnswerFile`_:
Answer file object will be returned.
ExportAnswerFile(host):
Export a host's answer file into a serialized form. The method returns a string that contains only the list of user input options. See `AnswerFile`_ . `userInput`_ .
since: `vSphere API 5.0`_
Privilege:
Profile.Export
Args:
host (`vim.HostSystem`_):
Host with which the answer file is associated.
Returns:
`vim.Task`_:
Serialized form of the answer file.
CheckAnswerFileStatus(host):
Check the validity of the answer files for the specified hosts. The Profile Engine uses the profile associated with a host to check the answer file.
since: `vSphere API 5.0`_
Privilege:
System.View
Args:
host (`vim.HostSystem`_):
Set of hosts for which the answer file status will be checked.
Returns:
`vim.Task`_:
Returns the resulting answer file status.
Raises:
`vim.fault.InvalidProfileReferenceHost`_:
if the reference host associated with the profile is incompatible or there is no reference host for the profile.
QueryAnswerFileStatus(host):
Returns the status of the answer files associated with specified hosts. This method returns the most recent status determined by `CheckAnswerFileStatus_Task`_ . See `HostProfileManagerAnswerFileStatus`_ for valid values.
since: `vSphere API 5.0`_
Privilege:
System.View
Args:
host (`vim.HostSystem`_):
The hosts the answer file is associated with.
Returns:
[`vim.profile.host.AnswerFileStatusResult`_]:
List of answer file status objects.
|