Skip to main content

VsanRemoteDatastoreSystem

Struct VsanRemoteDatastoreSystem 

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

The managed object provides support for vSAN remote datastore management operations.

It can be accessed with MOID of ‘vsan-remote-datastore-system’, through vSAN service at vCenter server side.

Implementations§

Source§

impl VsanRemoteDatastoreSystem

Source

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

Source

pub async fn vsan_create_datastore_source( &self, datastore_source: &VsanHciMeshDatastoreSource, ) -> Result<ManagedObjectReference>

Create a new Datastore Source.

Required privileges: Host.Config.Storage

§Parameters:
§datastore_source

The information of the Datastore Source to be created. If the vCenter is an ELM linked vCenter, only VsanRemoteVcInfo.vcHost needs to be specified. For a standalone vCenter, the VsanRemoteVcInfoStandalone.user and VsanRemoteVcInfoStandalone.password needs to be specified for an user credential with the privileges to create the service account.

§Returns:

The task for creating Datastore Source operation.

Refers instance of Task.

§Errors:

AlreadyExists: if the Datastore Source being created has existed.

VsanSslVerifyCertFault: SSL verification fault for remote vCenter such as certificate not verified.

VsanFault: Other vSAN related faults.

Source

pub async fn vsan_destroy_datastore_source( &self, datastore_source: &VsanHciMeshDatastoreSource, ) -> Result<ManagedObjectReference>

Destroy an existing Datastore Source configuration.

Required privileges: Host.Config.Storage

§Parameters:
§datastore_source

The Datastore Source to be destroyed. If the vCenter is an ELM linked vCenter, only VsanRemoteVcInfo.vcHost needs to be specified. For a standalone vCenter, the VsanRemoteVcInfoStandalone.user and VsanRemoteVcInfoStandalone.password needs to be specified for an user credential with the privileges to delete the service account.

§Returns:

The task for destroying Datastore Source operation.

Refers instance of Task.

§Errors:

NotFound: The specified Datastore Source is not found.

ResourceInUse: The specified Datastore Source still has datastores being mounted.

VsanFault: Other vSAN related faults.

Source

pub async fn mount_precheck( &self, cluster: &ManagedObjectReference, datastore: &ManagedObjectReference, server_cluster_info: Option<&VcRemoteVsanServerClusterInfo>, ) -> Result<Box<dyn VsanMountPrecheckResultTrait>>

Checks mount compatibility of a vSAN datastore with given vSAN cluster.

Get mount pre-check results of a client cluster and remote vSAN datastore. Different types of checks are needed, see VsanMountPrecheckResult for details.

§Parameters:
§cluster

Client cluster that triggers the mount precheck request.

Required privileges: Host.Config.Storage

Refers instance of ClusterComputeResource.

§datastore

The server vSAN datastore to be checked for mount.

Refers instance of Datastore.

§server_cluster_info

The server cluster information of the vSAN datastore to be checked for mount. It’s used for stretched cluster and remote data-in-transit configuration check.

§Returns:

Pre-check results of a client cluster mounting server vSAN datastore.

Source

pub async fn vsan_precheck_datastore_source( &self, datastore_source: &VsanHciMeshDatastoreSource, operation: Option<&str>, ) -> Result<VsanDatastoreSourcePrecheckResult>

Run prechecks for a Datastore Source.

This can be used before creating, updating, destroying a Datastore Source or other places needing to verify a Datastore Source.

Required privileges: Host.Config.Storage

§Parameters:
§datastore_source

The information of the Datastore Source to be prechecked.

§operation

The hint of the operation which the precheck is performed against, see PrecheckDatastoreSourceOperation_enum.

§Returns:

Pre-check results of the specified Datastore Source.

§Errors:

VsanSslVerifyCertFault: SSL verification fault for remote vCenter such as certificate not verified.

VsanFault: Other vSAN related faults.

Source

pub async fn vsan_query_datastore_source( &self, vc_hosts: Option<&[String]>, ) -> Result<Option<Vec<VsanHciMeshDatastoreSource>>>

Query Datastore Source information for specified remote vCenters.

If no vCenter is specified, all Datastore Sources configured are returned.

Required privileges: System.Read

§Parameters:
§vc_hosts

The names (e.g. FQDNs) of the remote vCenters to be queried. Only those names configured through VsanRemoteDatastoreSystem.VsanCreateDatastoreSource are valid to be used.

§Returns:

The Datastore Sources information queried.

§Errors:

VsanFault: vSAN related faults.

Source

pub async fn vsan_query_hci_mesh_datastores( &self, query_specs: Option<&[VsanXvcQuerySpec]>, extra_vc_infos: Option<&[Box<dyn VsanRemoteVcInfoTrait>]>, ) -> Result<Option<Vec<VsanXvcQueryResultSet>>>

This method takes a list of VsanXvcQuerySpec, then returns a list of VsanXvcQueryResultSet.

Each element of returned VsanXvcQueryResultSet list maps to the query spec in the VsanXvcQuerySpec list by index. Caller can provide a proper VsanXvcQuerySpec, and specify the required properties to be returned. The full list of the properties for each kind of returned object is described in VsanXvcQueryResultSet. Optionally, user can provide a list of remote VCs’ information VsanRemoteVcInfo to specify the remote VC to query. The supported objects are listed in VsanXvcQuerySpec.objectModel. Each item is one datastore’s info mapping to the specified properties VsanXvcQuerySpec.properties in spec.

Required privileges: System.Read

§Parameters:
§query_specs

The spec information to specify what to be queried.

§extra_vc_infos

The remote vCenter information for communication if caller needs to explicitly specify a remote vCenter as a provider vCenter which is not configured as a Datastore Source configuration. The user credential needs to be provided in the remote vCenter information, e.g., use VsanRemoteVcInfoStandalone.

§Returns:

The query result information per the query specs.

§Errors:

VsanFault: vSAN related faults.

Source

pub async fn remote_vc_mount_precheck( &self, cluster: &ManagedObjectReference, xvc_datastore: &VsanXvcDatastoreInfo, ) -> Result<Box<dyn VsanMountPrecheckResultTrait>>

Checks mount compatibility of a cross VC vSAN datastore with given vSAN cluster.

Get mount pre-check results of a client cluster and cross VC remote vSAN datastore. Different types of checks are needed, see VsanMountPrecheckResult for details.

§Parameters:
§cluster

Client cluster that trigger the mount precheck request.

Required privileges: Host.Config.Storage

Refers instance of ClusterComputeResource.

§xvc_datastore
§Returns:

Pre-check results of a client cluster mounting cross VC vSAN datastore.

§Errors:

VsanFault: vSAN related faults.

Source

pub async fn vsan_update_datastore_source( &self, datastore_source: &VsanHciMeshDatastoreSource, ) -> Result<ManagedObjectReference>

Update the configuration of an existing Datastore Source.

Required privileges: Host.Config.Storage

§Parameters:
§datastore_source

The information of the Datastore Source to be updated. The updated Datastore Source is identified by the vcHost specified in the remote vCenter info of this param. If the original or updated vCenter is a standalone vCenter, the VsanRemoteVcInfoStandalone.user and VsanRemoteVcInfoStandalone.password needs to be specified for an user credential with the privilege to update the service account. If both original and updated vCenters are ELM vCenters only VsanRemoteVcInfo.vcHost needs to be specified.

§Returns:

The task for updating Datastore Source operation.

Refers instance of Task.

§Errors:

NotFound: The specified Datastore Source is not found.

VsanFault: Other vSAN related faults.

Trait Implementations§

Source§

impl Clone for VsanRemoteDatastoreSystem

Source§

fn clone(&self) -> VsanRemoteDatastoreSystem

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,