pub struct HostPatchManager { /* private fields */ }Expand description
This managed object is the interface for scanning and patching an ESX server.
VMware publishes updates through its external website. A patch update is synonymous with a bulletin. An update may contain many individual patch binaries, but its installation and uninstallation are atomic.
Implementations§
Source§impl HostPatchManager
impl HostPatchManager
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn check_host_patch_task(
&self,
meta_urls: Option<&[String]>,
bundle_urls: Option<&[String]>,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn check_host_patch_task( &self, meta_urls: Option<&[String]>, bundle_urls: Option<&[String]>, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Check the list of metadata and returns the dependency, obsolete and conflict information The operation is cancelable through the returned Task object.
No integrity checks are performed on the metadata.
Required privileges: System.Read
§Parameters:
§meta_urls
a list of urls pointing to metadata.zip.
§bundle_urls
a list of urls pointing to an “offline” bundle. It is not supported in 5.0 or later.
§spec
§Returns:
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
InvalidState: if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string.
Sourcepub async fn install_host_patch_task(
&self,
repository: &HostPatchManagerLocator,
update_id: &str,
force: Option<bool>,
) -> Result<ManagedObjectReference>
pub async fn install_host_patch_task( &self, repository: &HostPatchManagerLocator, update_id: &str, force: Option<bool>, ) -> Result<ManagedObjectReference>
Deprecated method is deprecated, use HostPatchManager.InstallHostPatchV2_Task instead.
Patch the host.
The operation is not cancelable. If the patch installation failed, an atomic rollback of the installation will be attempted. Manual rollback is required if the atomic rollback failed, see PatchInstallFailed for details.
Required privileges: Host.Config.Patch
§Parameters:
§repository
Location of the repository that contains the bulletin depot. The depot must be organized as a flat collection of bulletins with each one being a folder named after the bulletin ID. Each folder must contain both update metadata and required binaries.
§update_id
The update to be installed on the host.
§force
Specify whether to force reinstall an update. By default, installing an already-installed update would fail with the PatchAlreadyInstalled fault. If force is set to true, the update will be forcefully reinstalled, thus overwriting the already installed update.
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
PatchMetadataInvalid: if the required metadata is invalid - for example, it is not found in the repository, is corrupted and so on. Typically a more specific subclass of PatchMetadataInvalid is thrown.
PatchBinariesNotFound: if required update related binaries were not available.
PatchNotApplicable: if the patch is not applicable. Typically a more specific subclass of PatchNotApplicable is thrown to indicate a specific problem - for example, PatchSuperseded if the patch is superseded, MissingDependency if required patch or libraries are not installed, AlreadyInstalled if the patch is already installed.
NoDiskSpace: if the update can not be installed because there is insufficient disk space for the installation, including temporary space used for rollback.
PatchInstallFailed: if the installation failed, PlatformConfigFault.text has details of the failure. Automatic rollback might have succeeded or failed.
RebootRequired: if the update cannot be installed without restarting the host. This might occur on account of a prior update installation which needed to be installed separately from other updates.
InvalidState: if the host is not in maintenance mode but the patch install requires all virtual machines to be powered off.
TaskInProgress: if there is already a patch installation in progress.
Sourcepub async fn install_host_patch_v_2_task(
&self,
meta_urls: Option<&[String]>,
bundle_urls: Option<&[String]>,
vib_urls: Option<&[String]>,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn install_host_patch_v_2_task( &self, meta_urls: Option<&[String]>, bundle_urls: Option<&[String]>, vib_urls: Option<&[String]>, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Patch the host.
The operation is not cancelable. If the patch installation failed, an atomic rollback of the installation will be attempted. Manual rollback is required if the atomic rollback failed, see PatchInstallFailed for details.
Required privileges: Host.Config.Patch
§Parameters:
§meta_urls
A list of urls pointing to metadata.zip.
§bundle_urls
a list of urls pointing to an “offline” bundle. It is not supported in 5.0 or later.
§vib_urls
The urls of update binary files to be installed.
§spec
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
InvalidState: if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string.
Sourcepub async fn query_host_patch_task(
&self,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn query_host_patch_task( &self, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Query the host for installed bulletins.
Required privileges: System.Read
§Parameters:
§spec
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
InvalidState: if the bulletin ID did not exist.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string.
Sourcepub async fn scan_host_patch_task(
&self,
repository: &HostPatchManagerLocator,
update_id: Option<&[String]>,
) -> Result<ManagedObjectReference>
pub async fn scan_host_patch_task( &self, repository: &HostPatchManagerLocator, update_id: Option<&[String]>, ) -> Result<ManagedObjectReference>
Deprecated as of VI API 4.0, use HostPatchManager.ScanHostPatchV2_Task.
Scan the host for the patch status.
The operation is cancelable through the returned Task object. Integrity checks are performed on the metadata only during the scan operation.
Required privileges: System.Read
§Parameters:
§repository
Location of the repository that contains the bulletin depot. The depot must be organized as a flat collection of bulletins with each one being a folder named after the bulletin ID. Each folder must contain the full update metadata.
§update_id
The updates to scan. Wildcards can be used to specify the update IDs. The wildcards will be expanded to include all updates whose IDs match the specified wildcard and whose metadata is available in the repository. Specifying no update is equivalent to a wildcard “*”. In this case all updates available in the repository will be scanned.
§Returns:
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
PatchMetadataInvalid: if query required metadata is invalid - for example, it is not found in the repository, is corrupted and so on. Typically a more specific subclass of PatchMetadataInvalid is thrown.
PlatformConfigFault: if there is any error in the repository access, metadata download, repository level integrity check, or reading the metadata. See PlatformConfigFault.text for specific details.
Sourcepub async fn scan_host_patch_v_2_task(
&self,
meta_urls: Option<&[String]>,
bundle_urls: Option<&[String]>,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn scan_host_patch_v_2_task( &self, meta_urls: Option<&[String]>, bundle_urls: Option<&[String]>, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Scan the host for the patch status.
The operation is cancelable through the returned Task object. Integrity checks are performed on the metadata only during the scan operation.
Required privileges: System.Read
§Parameters:
§meta_urls
a list of urls pointing to metadata.zip.
§bundle_urls
a list of urls pointing to an “offline” bundle. It is not supported in 5.0 or later.
§spec
§Returns:
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
InvalidState: if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if there is any error in the repository access, metadata download, repository level integrity check, or reading the metadata. See PlatformConfigFault.text for specific details.
Sourcepub async fn stage_host_patch_task(
&self,
meta_urls: Option<&[String]>,
bundle_urls: Option<&[String]>,
vib_urls: Option<&[String]>,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn stage_host_patch_task( &self, meta_urls: Option<&[String]>, bundle_urls: Option<&[String]>, vib_urls: Option<&[String]>, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Stage the vib files to esx local location and possibly do some run time check.
Required privileges: Host.Config.Patch
§Parameters:
§meta_urls
A list of urls pointing to metadata.zip.
§bundle_urls
a list of urls pointing to an “offline” bundle. It is not supported in 5.0 or later.
§vib_urls
The urls of update binary files to be staged.
§spec
§Returns:
This method returns a Task object with which to monitor the operation. The info.result property in the Task contains the HostPatchManagerStatus upon success.
Refers instance of Task.
§Errors:
RequestCanceled: if the operation is canceled.
InvalidState: if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string.
Sourcepub async fn uninstall_host_patch_task(
&self,
bulletin_ids: Option<&[String]>,
spec: Option<&HostPatchManagerPatchManagerOperationSpec>,
) -> Result<ManagedObjectReference>
pub async fn uninstall_host_patch_task( &self, bulletin_ids: Option<&[String]>, spec: Option<&HostPatchManagerPatchManagerOperationSpec>, ) -> Result<ManagedObjectReference>
Deprecated as of vSphere 8.0u3, and there is no replacement available.
Uninstall patch from the host.
The operation is not cancelable.
Required privileges: Host.Config.Patch
§Parameters:
§bulletin_ids
A list of bulletin IDs to be removed.
§spec
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
§Errors:
InvalidState: if the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.
TaskInProgress: if there is already a patch installation in progress.
PlatformConfigFault: if any error occurs during the operation. More detailed information will be returned within the payload of the exception as xml string.
Trait Implementations§
Source§impl Clone for HostPatchManager
impl Clone for HostPatchManager
Source§fn clone(&self) -> HostPatchManager
fn clone(&self) -> HostPatchManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more