Class ProxmoxClient

java.lang.Object
org.jenkinsci.plugins.proxmox.api.ProxmoxClient

public class ProxmoxClient extends Object
  • Constructor Details

    • ProxmoxClient

      public ProxmoxClient(String apiUrl, String tokenId, Secret tokenSecret, boolean ignoreSslErrors)
  • Method Details

    • getVersion

      public String getVersion()
    • getNodes

      public List<ClusterNode> getNodes()
    • getVms

      public List<VirtualMachine> getVms(String node)
    • getTemplates

      public List<VirtualMachine> getTemplates(String node)
    • getNextVmId

      public int getNextVmId()
    • getNextVmId

      public int getNextVmId(int minId)
    • cloneVm

      public String cloneVm(String node, int templateId, CloneOptions opts)
    • resizeVmDisk

      public void resizeVmDisk(String node, int vmId, String disk, int sizeGb)
    • configureVm

      public String configureVm(String node, int vmId, VmConfig config)
    • setNetworkBridge

      public void setNetworkBridge(String node, int vmId, String bridge)
      Point the VM's primary NIC (net0) at the given bridge, preserving the NIC model, MAC, and every other net0 option (firewall, VLAN tag, MTU, rate, ...). Reads the current net0, swaps only its bridge= component, and writes it back. If the VM has no net0 the call is a no-op (logged at WARNING). Used to apply the template's "Network Bridge" override after a clone, which otherwise inherits the template's bridge.
    • startVm

      public String startVm(String node, int vmId)
    • stopVm

      public String stopVm(String node, int vmId)
    • shutdownVm

      public String shutdownVm(String node, int vmId, int timeout)
    • destroyVm

      public String destroyVm(String node, int vmId, boolean purge)
    • getVmStatus

      public VirtualMachine getVmStatus(String node, int vmId)
    • getVmConfig

      public com.google.gson.JsonObject getVmConfig(String node, int vmId)
    • getVmNetworkInterfaces

      public List<NetworkInterface> getVmNetworkInterfaces(String node, int vmId)
    • getStoragePools

      public List<StoragePool> getStoragePools(String node)
    • getNetworkDevices

      public List<NetworkDevice> getNetworkDevices(String node)
    • getPools

      public List<ResourcePool> getPools()
    • getTaskStatus

      public TaskStatus getTaskStatus(String node, String upid)
    • waitForTask

      public void waitForTask(String node, String upid, int timeoutSeconds)