Class HostFolderPath

java.lang.Object
org.jenkinsci.plugins.vsphere.tools.HostFolderPath

public final class HostFolderPath extends Object
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.
  • Method Details

    • rewrite

      @CheckForNull public static List<String> rewrite(List<String> sourceFolderPath, @CheckForNull String fromHost, @CheckForNull String toHost)
      Returns sourceFolderPath with the first element naming fromHost replaced by one naming toHost, or null if no element names fromHost. An element names a host if it equals the host's name, or its short name (the part before the first dot), or is the full name of a host given by its short name, ignoring case; the replacement is the short name of toHost where the element was a short name, else toHost as given.