Class ReconfigureNetworkAdapters
java.lang.Object
hudson.model.AbstractDescribableImpl<ReconfigureStep>
org.jenkinsci.plugins.vsphere.builders.ReconfigureStep
org.jenkinsci.plugins.vsphere.builders.ReconfigureNetworkAdapters
- All Implemented Interfaces:
ExtensionPoint,Describable<ReconfigureStep>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classNested classes/interfaces inherited from class org.jenkinsci.plugins.vsphere.builders.ReconfigureStep
ReconfigureStep.DeviceAction, ReconfigureStep.ReconfigureStepDescriptor, ReconfigureStep.SpecSubmitter, ReconfigureStep.StepActionNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields inherited from class org.jenkinsci.plugins.vsphere.builders.ReconfigureStep
spec, vm, vsphere -
Constructor Summary
ConstructorsConstructorDescriptionReconfigureNetworkAdapters(ReconfigureStep.DeviceAction deviceAction, String deviceLabel, String macAddress, boolean standardSwitch, String portGroup, boolean distributedSwitch, String distributedPortGroup, String distributedPortId) -
Method Summary
Modifier and TypeMethodDescriptionThe MAC address is normally set as a manual one.booleanbooleanvoidperform(EnvVars env, TaskListener listener) voidperform(Run<?, ?> run, FilePath filePath, Launcher launcher, TaskListener listener) booleanreconfigureNetwork(Run<?, ?> run, Launcher launcher, TaskListener listener) voidsetDeviceNumber(String deviceNumber) Methods inherited from class org.jenkinsci.plugins.vsphere.builders.ReconfigureStep
all, extractEnvironment, findDeviceByLabel, getVirtualMachineConfigSpec, getVM, getVsphere, perform, reconfigureVm, setVirtualMachineConfigSpec, setVM, setVsphereMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.model.Describable
getDescriptor
-
Constructor Details
-
ReconfigureNetworkAdapters
@DataBoundConstructor public ReconfigureNetworkAdapters(ReconfigureStep.DeviceAction deviceAction, String deviceLabel, String macAddress, boolean standardSwitch, String portGroup, boolean distributedSwitch, String distributedPortGroup, String distributedPortId) throws VSphereException - Throws:
VSphereException
-
-
Method Details
-
getDeviceAction
-
getDeviceLabel
-
getDeviceNumber
-
setDeviceNumber
-
getMacAddress
-
isStandardSwitch
public boolean isStandardSwitch() -
isDistributedSwitch
public boolean isDistributedSwitch() -
getPortGroup
-
getDistributedPortGroup
-
getDistributedPortId
-
perform
- Specified by:
performin classReconfigureStep- Throws:
VSphereException
-
perform
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath filePath, @NonNull Launcher launcher, @NonNull TaskListener listener) throws InterruptedException, IOException- Specified by:
performin classReconfigureStep- Throws:
InterruptedExceptionIOException
-
reconfigureNetwork
public boolean reconfigureNetwork(Run<?, ?> run, Launcher launcher, TaskListener listener) throws VSphereException- Throws:
VSphereException
-
fallbackVariant
The MAC address is normally set as a manual one. If vCenter refuses that (e.g. because the address is in the range that it hands out itself), the reconfiguration is retried once with a step that does not claim the address to be manual.- Overrides:
fallbackVariantin classReconfigureStep- Returns:
- the variant to retry with, or null if this step has none
-