Skip to main content

EnvironmentBrowser

Struct EnvironmentBrowser 

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

This managed object type provides access to the environment that a ComputeResource presents for creating and configuring a virtual machine.

The environment consists of three main components:

  • The virtual machine configuration options. Each vim.vm.ConfigOption describes the execution environment for a virtual machine, the particular set of virtual hardware that is supported. A ComputeResource might support multiple sets. Access is provided through the configOptionDescriptor property and the EnvironmentBrowser.QueryConfigOption operation.
  • The supported device targets. Each virtual device specified in the virtual machine needs to be hooked up to a “physical” counterpart. For networks, this means choosing a network name; for a virtual CD-rom this might be an ISO image, etc. The environment browser provides access to the device targets through the EnvironmentBrowser.QueryConfigTarget operation.
  • Storage locations and files. A selection of locations where the virtual machine files can be stored, and the possibility to browse for existing virtual disks and ISO images. The datastore browser, provided by the datastoreBrowser property, provides access to the contents of one or more datastores. The items in a datastore are files that contain configuration, virtual disk, and the other data associated with a virtual machine.
  • The capabilities supported by the ComputeResource to which the virtual machine belongs.

Implementations§

Source§

impl EnvironmentBrowser

Source

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

Source

pub async fn query_config_option( &self, key: Option<&str>, host: Option<&ManagedObjectReference>, ) -> Result<Option<VirtualMachineConfigOption>>

Query for a specific virtual machine configuration option (the ConfigOption).

If the EnvironmentBrowser is from a ComputeResource or ClusterComputeResource, the key or host, or both arguments can be used to return the required config options. If a key is specified, then the ConfigOption corresponding to that key value is returned. If a host is specified, then the default ConfigOption for that host is returned. If key and host both are specified, the ConfigOption corresponding to the given key for that host is returned. If neither is specified, then the default ConfigOption for this environment browser is returned. Typically, the default contains the options for the most recent virtual hardware supported.

If the EnvironmentBrowser is from a VirtualMachine neither a host nor a key should be specified.

Required privileges: System.View

§Parameters:
§key

The key found in the VirtualMachineConfigOptionDescriptor, obtained by invoking the EnvironmentBrowser.QueryConfigOptionDescriptor operation.

§host

The host whose ConfigOption is requested.

Refers instance of HostSystem.

§Returns:

Returns the ConfigOption object. If invoked on a cluster with no hosts, or if the ConfigOption with given key is not found for the given host, null is returned.

Source

pub async fn query_config_option_descriptor( &self, ) -> Result<Option<Vec<VirtualMachineConfigOptionDescriptor>>>

The list of ConfigOption keys available on this entity.

Required privileges: System.View

Source

pub async fn query_config_option_ex( &self, spec: Option<&EnvironmentBrowserConfigOptionQuerySpec>, ) -> Result<Option<VirtualMachineConfigOption>>

Query for a virtual machine configuration option matching the key or host or both given in the EnvironmentBrowserConfigOptionQuerySpec.

For more details see EnvironmentBrowser.QueryConfigOption

If the Environment Browser belongs to a virtual machine and the spec argument is omitted, the method returns the ConfigOption object corresponding to the vmx version of the virutal machine and the guestOSDescriptor list contains only the guestId of the virutal machine.

Required privileges: System.View

§Parameters:
§spec

Search criteria and filters to control the result. If a EnvironmentBrowserConfigOptionQuerySpec.key or EnvironmentBrowserConfigOptionQuerySpec.host (or both) are specified, they will be used to search for a config option. If EnvironmentBrowserConfigOptionQuerySpec.guestId is nonempty, the VirtualMachineConfigOption.guestOSDescriptor array of the config option is filtered to match against the guest IDs in the spec. If there is no match, the whole list is returned. If the spec argument is omitted, the default VirtualMachineConfigOption for this environment browser is returned.

§Returns:

Returns the VirtualMachineConfigOption object. If invoked on a cluster with no hosts, or if the VirtualMachineConfigOption with given key is not found for the given host, null is returned.

Source

pub async fn query_config_target( &self, host: Option<&ManagedObjectReference>, ) -> Result<Option<ConfigTarget>>

Queries for information about a specific target, a “physical” device that can be used to back virtual devices.

The ConfigTarget that is returned specifies the set of values that can be used in the device backings to connect the virtual machine to physical (or logical) host devices.

If the EnvironmentBrowser is from a ComputeResource or ClusterComputeResource, the host argument can be used to return the ConfigTarget provided by a particular host in the compute resource or cluster. If host is not specified and the EnvironmentBrowser is from a ComputeResource or ClusterComputeResource, then the union of all the devices is returned and the vim.vm.TargetInfo.configurationTag field indicates how widely the device is available across the compute resource or cluster.

If the EnvironmentBrowser is from a VirtualMachine a host should not be specified.

Required privileges: System.View

§Parameters:
§host

If specified, the host whose default BackingInfo is requested.

Refers instance of HostSystem.

§Returns:

Returns the ConfigTarget object. If invoked on a cluster with no hosts, null is returned.

Source

pub async fn query_target_capabilities( &self, host: Option<&ManagedObjectReference>, ) -> Result<Option<HostCapability>>

Queries for information on the capabilities supported by the ComputeResource associated with the EnvironmentBrowser.

If the EnvironmentBrowser is from a ComputeResource or ClusterComputeResource, the host argument can be used to return the capabilities associated with a specific host in the compute resource or cluster. If the host argument is not specified and the EnvironmentBrowser is from a ComputeResource or ClusterComputeResource, then the intersection of the capabilities supported by all the hosts in the cluster is returned. If the EnvironmentBrowser is from a VirtualMachine, the compute resource associated with the virtual machine will be queried for its capabilities.

If the EnvironmentBrowser is from a VirtualMachine a host should not be specified.

Required privileges: System.View

§Parameters:
§host

If specified, the host whose capabilities are requested.

Refers instance of HostSystem.

§Returns:

Returns the set of capabilities supported by the ComputeResource associated with the EnvironmentBrowser. If invoked on a cluster with no hosts, null is returned.

Source

pub async fn datastore_browser(&self) -> Result<Option<ManagedObjectReference>>

DatastoreBrowser to browse datastores that are available on this entity.

Required privileges: System.View

§Returns:

Refers instance of HostDatastoreBrowser.

Trait Implementations§

Source§

impl Clone for EnvironmentBrowser

Source§

fn clone(&self) -> EnvironmentBrowser

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,