pub struct Agent { /* private fields */ }Expand description
Deprecated as of vSphere 9.0. Please refer to vLCM APIs.
An Agent is the vSphere ESX Agent Manager managed object
responsible for deploying an Agency on a single host.
The
Agent maintains the state of the current deployment in its
runtime information (see Agent.runtime).
An Agent has the same goalState and
status properties as an Agency, that are used in
the same way:
goalState. The goal state describes the overall goal of thisAgent. It can beenabledoruninstalled:enabled. TheAgentdeploys its VIB, its agent virtual machine, and powers on the agent virtual machine. TheAgentmonitors in vCenter the status of the installation of the VIB (in case it is uninstalled outside of vSphere ESX Agent Manager) and of the agent virtual machine (in case an operation is performed on it outside of vSphere ESX Agent Manager).uninstalled. TheAgentuninstalls any installed VIB and power off and delete the deployed agent virtual machine.
status. The status of theAgentregarding the given goal state. Status can be either red, yellow or green:red. An issue is preventing theAgentfrom reaching its desired goal state. See EamObjectRuntimeInfo.issue in Agent.runtime for the types of issues that can block thisAgent.yellow. TheAgentis actively working to reach the desired goal state. For theenabledgoal state, this means that thisAgentis installing its VIB, deploying the agent virtual machine, and powering it on.green. TheAgenthas reached the desired goal state. TheAgentis no longer actively scheduling new tasks but is monitoring vCenter for changes that might conflict with thisAgent’s goal state.
Implementations§
Source§impl Agent
impl Agent
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn mark_as_available(&self) -> Result<()>
pub async fn mark_as_available(&self) -> Result<()>
Mark this agent’s VM as available.
Used when the agency this agent belongs to
has
AgencyConfigInfo.manuallyMarkAgentVmAvailableAfterProvisioning or
AgencyConfigInfo.manuallyMarkAgentVmAvailableAfterPowerOn set to
true and AgentRuntimeInfo.vmHook is present.
See AgentRuntimeInfo.vmHook
Sourcepub async fn agent_query_config(&self) -> Result<AgentConfigInfo>
pub async fn agent_query_config(&self) -> Result<AgentConfigInfo>
Deprecated use Agent.config instead.
The configuration of this Agent.
Sourcepub async fn query_issue(
&self,
issue_key: Option<&[i32]>,
) -> Result<Option<Vec<Box<dyn IssueTrait>>>>
pub async fn query_issue( &self, issue_key: Option<&[i32]>, ) -> Result<Option<Vec<Box<dyn IssueTrait>>>>
Current issues that have been detected for this entity.
Each issue can be remediated by invoking EamObject.Resolve or EamObject.ResolveAll.
Requires view privileges.
§Parameters:
§issue_key
An optional array of issue keys. If not set, all issues for this entity are returned.
§Returns:
A possibly empty array of issues that match the input issueKey array. Note
that the returned array can be smaller than issueKey if one or more
issue keys refers to issues that this entity does not have.
Sourcepub async fn agent_query_runtime(&self) -> Result<AgentRuntimeInfo>
pub async fn agent_query_runtime(&self) -> Result<AgentRuntimeInfo>
Deprecated use Agent.runtime instead.
Runtime information for the agent.
This includes important information about the current deployment of the agent’s VIB, virtual machine, and host.
Requires view privileges.
§Returns:
The Agent’s runtime information.
Sourcepub async fn resolve(&self, issue_key: &[i32]) -> Result<Option<Vec<i32>>>
pub async fn resolve(&self, issue_key: &[i32]) -> Result<Option<Vec<i32>>>
Resolves the issues specified in the input.
If an issue is remediable, ESX Agent Manager tries to resolve the misconfiguration that caused the issue. If it is not remediable, the offending issue is removed and ESX Agent Manager assumes that the issue has been resolved.
Requires modify privileges.
See also Issue.
§Parameters:
§issue_key
A non-empty array of issue keys.
§Returns:
A possibly empty array of issue keys for the issues that were not found on the
entity. This can happen if resolve is called with issue keys that were
resolved just prior to calling resolve or if an issue is currenly not resolvable.
Sourcepub async fn resolve_all(&self) -> Result<()>
pub async fn resolve_all(&self) -> Result<()>
Resolve all outstanding issues.
The method calls EamObject.Resolve
with all issues the EsxAgentManager, Agency, or
Agent have encountered. It is the equivalent of calling the following methods:
agent.resolve(getIssueKeys(agent.getRuntime().getIssue()));forAgentobjectsagency.resolve(getIssueKeys(agency.getRuntime().getIssue()));forAgencyobjectsesxAgentManager.resolve(getIssueKeys(esxAgentManager.getIssue()));for theEsxAgentManagerobject.
Requires modify privileges.
See also Issue.
Sourcepub async fn config(&self) -> Result<AgentConfigInfo>
pub async fn config(&self) -> Result<AgentConfigInfo>
The configuration of this Agent.
Sourcepub async fn runtime(&self) -> Result<AgentRuntimeInfo>
pub async fn runtime(&self) -> Result<AgentRuntimeInfo>
Runtime information for this agent.
This includes important information about the current deployment of the agent’s VIB, virtual machine, and host.
Requires view privileges.
§Returns:
This Agent’s runtime information.