Skip to main content

HostVsanSystem

Struct HostVsanSystem 

Source
pub struct HostVsanSystem { /* private fields */ }
Expand description

The VsanSystem managed object type exposes VSAN configuration primitives and serves as a host-level access point for relevant VSAN data objects.

Implementations§

Source§

impl HostVsanSystem

Source

pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self

Source

pub async fn add_disks_task( &self, disk: &[HostScsiDisk], ) -> Result<ManagedObjectReference>

Add the set of given disks for use by the VSAN service on this host.

Users may use this API to manually add disks for use by VSAN, without specifying an explicit VsanHostDiskMapping, when the VSAN service not configured to automatically claim storage. Any ineligible disk in the set of given disks and disks which would have exceeded the capacity will be ignored and will not be published in returned TaskInfo.result.

Mount a VsanHostDiskMapping if the specified disk belongs to the unmounted mapping and is of type VsanHostDiskMapping.ssd.

Upon successful completion of the returned Task, its TaskInfo.result field will be populated with a VsanHostDiskMapResult[] and caller must inspect VsanHostDiskMapResult[] to check result for individual VsanHostDiskMapping.

See also HostVsanSystem.QueryDisksForVsan, VsanHostConfigInfoStorageInfo.autoClaimStorage, VsanHostDiskMapInfo.mounted.

Required privileges: Host.Config.Storage

§Parameters:
§disk

list of disks to add for use by the VSAN service

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

Source

pub async fn evacuate_vsan_node_task( &self, maintenance_spec: &HostMaintenanceSpec, timeout: i32, ) -> Result<ManagedObjectReference>

Evacuate this host from VSAN cluster.

The task is cancellable.

Required privileges: Host.Config.Storage

§Parameters:
§maintenance_spec

Specifies the data evacuation mode. See HostMaintenanceSpec. If unspecified, the default mode chosen will be ensureObjectAccessibility.

§timeout

Time to wait for the task to complete in seconds. If the value is less than or equal to zero, there is no timeout. The operation fails with a Timedout exception if it timed out.

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

§Errors:

InvalidState: If the host is entering maintenance mode or evacuating data.

RequestCanceled: if the operation is canceled.

Timedout: if the operation timed out.

VsanFault: if operation fails with VSAN-specific error.

Source

pub async fn initialize_disks_task( &self, mapping: &[VsanHostDiskMapping], ) -> Result<ManagedObjectReference>

Initialize and use the sets of disks in the given VsanHostDiskMapping list for the VSAN service on this host.

Users may use this API to specify or change disk mappings when the VSAN service is not configured to automatically claim storage. For appending new non-SSDs to an existing VsanHostDiskMapping, users need to specify only the new non-SSDs with its VsanHostDiskMapping.ssd.

Mount a VsanHostDiskMapping if the specified VsanHostDiskMapping is not mounted in this host.

Upon successful completion of the returned Task, its TaskInfo.result field will be populated with a VsanHostDiskMapResult[] and caller must inspect VsanHostDiskMapResult[] to check result for individual VsanHostDiskMapping.

See also HostVsanSystem.QueryDisksForVsan, VsanHostConfigInfoStorageInfo.autoClaimStorage.

Required privileges: Host.Config.Storage

§Parameters:
§mapping

list of disk mappings to initialize

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

Source

pub async fn query_disks_for_vsan( &self, canonical_name: Option<&[String]>, ) -> Result<Option<Vec<Box<dyn VsanHostDiskResultTrait>>>>

Queries disks on this host for suitability to use with the VSAN service, and returns the result.

See also ScsiLun.canonicalName.

Required privileges: System.Read

§Parameters:
§canonical_name

may be set to restrict the query to the list of HostScsiDisk objects named by the given paths

§Returns:

a list of populated VsanHostDiskResult entries

Source

pub async fn query_host_status(&self) -> Result<VsanHostClusterStatus>

Queries this host’s current runtime status for the VSAN service.

Required privileges: System.Read

§Returns:

a populated VsanHostClusterStatus entry

Source

pub async fn recommission_vsan_node_task( &self, ) -> Result<ManagedObjectReference>

Recommission this host to VSAN cluster.

Users may use this API to recommission a node that has been evacuated in VsanHostDecommissionMode.

See also HostVsanSystem.EvacuateVsanNode_Task, VsanHostDecommissionMode.

Required privileges: Host.Config.Storage

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

§Errors:

InvalidState: if the host is not evacuated.

VsanFault: if operation fails with VSAN-specific error.

Source

pub async fn remove_disk_task( &self, disk: &[HostScsiDisk], maintenance_spec: Option<&HostMaintenanceSpec>, timeout: Option<i32>, ) -> Result<ManagedObjectReference>

Remove the set of given disks from use by the VSAN service on this host.

Users may use this API to manually remove a VsanHostDiskMapping.nonSsd from a VsanHostDiskMapping. This operation is only permitted if the VSAN service on this host is not configured to automatically claim storage.

The task is cancellable.

This method may not be used to remove the last VsanHostDiskMapping.nonSsd from any given VsanHostDiskMapping. Removal of the last VsanHostDiskMapping.nonSsd can be accomplished by using HostVsanSystem.RemoveDiskMapping_Task.

Upon successful completion of the returned Task, its TaskInfo.result field will be populated with a VsanHostDiskResult[]. Sets DiskIsLastRemainingNonSSD fault in returned task if specified disk is the last VsanHostDiskMapping.nonSsd member of VsanHostDiskMapping.

See also HostVsanSystem.RemoveDiskMapping_Task, HostVsanSystem.UpdateVsan_Task, VsanHostConfigInfoStorageInfo.autoClaimStorage.

Required privileges: Host.Config.Storage

§Parameters:
§disk

list of disks to be removed from use by the VSAN service.

§maintenance_spec

Any additional actions to move data out of the disk before removing it. See HostMaintenanceSpec. If unspecified, there is no action taken to move data from the disk.

§timeout

Time to wait for the task to complete in seconds. If the value is less than or equal to zero, there is no timeout. The operation fails with a Timedout exception if it timed out.

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

Source

pub async fn remove_disk_mapping_task( &self, mapping: &[VsanHostDiskMapping], maintenance_spec: Option<&HostMaintenanceSpec>, timeout: Option<i32>, ) -> Result<ManagedObjectReference>

Delete given set of disk mappings from use by the VSAN service on this host.

This API may be used to remove all disks in a given mapping, including its VsanHostDiskMapping.ssd. This operation is only permitted if the VSAN service on this host is not configured to automatically claim storage.

The task is cancellable.

Upon successful completion of the returned Task, its TaskInfo.result field will be populated with an empty VsanHostDiskMapResult[]. If any errors are encountered, the returned field will instead contain populated error information.

See also HostVsanSystem.RemoveDisk_Task, HostVsanSystem.UpdateVsan_Task, VsanHostConfigInfoStorageInfo.autoClaimStorage.

Required privileges: Host.Config.Storage

§Parameters:
§mapping

list of disk mappings to be removed from VSAN usage.

§maintenance_spec

Any additional actions to move data out of the disk before removing it. See HostMaintenanceSpec. If unspecified, there is no action taken to move data from the disk.

§timeout

Time to wait for the task to complete in seconds. If the value is less than or equal to zero, there is no timeout. The operation fails with a Timedout exception if it timed out.

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

Source

pub async fn unmount_disk_mapping_task( &self, mapping: &[VsanHostDiskMapping], ) -> Result<ManagedObjectReference>

Unmount the mounted VsanHostDiskMapping.

An unmounted volume cannot be used for any VSAN operations. In contrast to HostVsanSystem.RemoveDiskMapping_Task, this operation does not destroy or alter VSAN data on the disks. HostVsanSystem.AddDisks_Task and HostVsanSystem.InitializeDisks_Task can be used to re-mount the diskMapping.

In case of shared-SAS, where diskMappings are visible to more than one VSAN hosts, Users may use this API to manually unmount and re-mount diskMappings.

Upon successful completion of the returned Task, its TaskInfo.result field will be populated with VsanHostDiskMapResult[]. If any errors are encountered, the returned field will instead contain populated error information.

See also HostVsanSystem.RemoveDiskMapping_Task, HostVsanSystem.AddDisks_Task, HostVsanSystem.InitializeDisks_Task.

Required privileges: Host.Config.Storage

§Parameters:
§mapping
§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

§Errors:

InvalidState: If the VsanHostDiskMapping is already unmounted.

VsanFault: if operation fails with VSAN-specific error.

Source

pub async fn update_vsan_task( &self, config: &dyn VsanHostConfigInfoTrait, ) -> Result<ManagedObjectReference>

Update the VSAN service on this host according to the given host configuration specification.

Enabling and disabling the VSAN service can be achieved by using the VsanHostConfigInfo.enabled flag. Host storage settings can be specified through use of VsanHostConfigInfo.storageInfo. If this value is omitted, changes will not be made to the existing storage configuration. Host cluster settings can be specified through use of VsanHostConfigInfo.clusterInfo. If this value is omitted, changes will not be made to the existing cluster configuration. Host network settings can be specified through use of VsanHostConfigInfo.networkInfo. If this value is omitted, changes will not be made to the existing network configuration.

See also VsanHostConfigInfo, VsanHostConfigInfo.storageInfo, VsanHostConfigInfo.clusterInfo, VsanHostConfigInfo.networkInfo, HostVsanSystem.QueryDisksForVsan.

Required privileges: Host.Config.Storage

§Parameters:
§config

host configuration settings to use for the VSAN service.

§Returns:

This method returns a Task object with which to monitor the operation.

Refers instance of Task.

Source

pub async fn config(&self) -> Result<Box<dyn VsanHostConfigInfoTrait>>

The current VSAN service configuration information for this host.

Required privileges: System.Read

Trait Implementations§

Source§

impl Clone for HostVsanSystem

Source§

fn clone(&self) -> HostVsanSystem

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: 'static,

Source§

fn as_any_ref<'a>(&'a self) -> &'a (dyn Any + 'static)

Cast a reference to Any trait.

Source§

fn as_any_box(self: Box<T>) -> Box<dyn Any>

Cast to a boxed reference to Any trait.

Source§

fn type_id(&self) -> TypeId

Get the underlying type identifier.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<To, T> CastInto<To> for T
where To: CastFrom<T> + ?Sized, T: 'static + ?Sized,

Source§

fn into_ref<'a>(&'a self) -> Option<&'a To>

Casts a reference to a trait object. If the cast fails, std::option::Option::None is returned.
Source§

fn into_box(self: Box<T>) -> Result<Box<To>, Box<dyn Any>>

Casts a boxed trait object to another trait object. If the cast fails, the original boxed trait object is returned in std::result::Result::Err.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,