Package org.jenkinsci.plugins.vsphere.tools
package org.jenkinsci.plugins.vsphere.tools
-
ClassDescriptionHow we decide what template to create the next agent on.There's a delay between when we give a bunch of nodes to Jenkins (when it asks us to provision some) and when those nodes appear in vSphere and in Jenkins, so we need to keep a record of what's in progress so we don't over-commit.Utility class that works out what agents we should start up in response to Jenkins asking us to start things.Works out the inventory folder for a clone from the folder of its source, for inventories that group VMs in per-host folders: the source's folder path has an element named after the source's host, and the clone's folder is the same path with that element replaced by the name of the clone's host.Minimal amounts of free resources a host must have right now to be a candidate for a new VM at all (see
VSphereHostSelection.limitShortfall(org.jenkinsci.plugins.vsphere.tools.VSphereHostSelection.HostCandidate, org.jenkinsci.plugins.vsphere.tools.HostLimits)), as opposed toHostWeights, which only decide which of the candidates is preferred.Optional refinements for automatic host selection (seeVSphereHostSelection), already resolved from cloud-level defaults and call-site overrides, soVSphereonly has to apply them.Told that host selection found no host to use at the moment; seeHostSelectionOptions.withWaitListener(org.jenkinsci.plugins.vsphere.tools.HostSelectionOptions.Listener, boolean).Adapts a pipeline'shostSelectionWaitNotificationto theHostSelectionOptions.Listenerthat host selection tells.Why automatic host selection found no host to place a new VM on at the moment, which is whenhostSelectionWaitSecondscomes into play.How much each of four measures of a host's free resources counts towards its score when automatically choosing the "most available" host (seeVSphereHostSelection.rank(java.util.List<org.jenkinsci.plugins.vsphere.tools.VSphereHostSelection.HostCandidate>, org.jenkinsci.plugins.vsphere.tools.HostWeights)): free CPU in MHz (absolute: a big host with the same load percentage has more to give), free CPU as a share of the host's CPU capacity (relative: how idle the host is), free memory in MB (absolute), free memory as a share of the host's memory (relative).Knows which Ethernet address ranges vSphere reserves for what, so that an address that vCenter is going to refuse can be flagged up front and explained (JENKINS-34001).Where an address falls, as far as vSphere's allocation scheme is concerned.Generated localization support class.Utility class for checking security permissions.The optional CPU and memory settings a VM is to be created with, in the same operation that creates it, instead of being reconfigured afterwards.Maintains a single long-lived vSphere session for onevSphereCloudinstance, eliminating the per-operation login/logout overhead that occurs when every API call creates and destroys its own session.KeepsVSphereConnectionPoolinstances honest across two events that Jenkins core has no dedicated "cloud replaced/removed" hook for: Saving the Jenkins configuration (e.g.Pure, yavijava-free logic for picking a "best" ESXi host out of a cluster's members, given per-host stats and an optional admin-supplied allow-list.What one look at the cluster's hosts found: either the hosts that may be given the new VM, or, if there are none, thereasonwhy not and a description for the log.Describes one candidate host's name, availability and current load, as needed to decide whether/how favourably it can be used for a new clone.A candidate host with its availability score (0 worst ..Waits for a while;Thread.sleep(long)in real life.