use of org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters in project ovirt-engine by oVirt.
the class HostSetupNetworksCommand method invokeSetupNetworksCommand.
private FutureVDSCall<VDSReturnValue> invokeSetupNetworksCommand(int timeout) {
final HostSetupNetworksVdsCommandParameters parameters = createSetupNetworksParameters(timeout);
FutureVDSCall<VDSReturnValue> setupNetworksTask = getVdsBroker().runFutureVdsCommand(FutureVDSCommandType.HostSetupNetworks, parameters);
if (parameters.isRollbackOnFailure()) {
PollTechnique pollTechnique = FeatureSupported.isConfirmConnectivitySupportedByVdsm(getVds().getClusterCompatibilityVersion()) ? CONFIRM_CONNECTIVITY : POLL;
HostPoller poller = new HostPoller(new TimeBoundPollVDSCommandParameters(getVdsId(), pollTechnique));
while (!setupNetworksTask.isDone()) {
poller.poll();
}
}
return setupNetworksTask;
}
use of org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters in project ovirt-engine by oVirt.
the class HostSetupNetworksCommand method createSetupNetworksParameters.
private HostSetupNetworksVdsCommandParameters createSetupNetworksParameters(int timeout) {
SwitchType clusterSwitchType = getCluster().getRequiredSwitchTypeForCluster();
List<HostNetwork> networksToConfigure = calculateNetworksToConfigure();
final HostSetupNetworksVdsCommandParameters hostCmdParams = new HostSetupNetworksVdsCommandParameters(getVds(), networksToConfigure, getAllNetworksToRemove(), getParameters().getCreateOrUpdateBonds(), getRemovedBondNames(), clusterSwitchType);
hostCmdParams.setRollbackOnFailure(getParameters().rollbackOnFailure());
hostCmdParams.setConnectivityTimeout(timeout);
hostCmdParams.setManagementNetworkChanged(isManagementNetworkChanged(networksToConfigure));
return hostCmdParams;
}
use of org.ovirt.engine.core.common.vdscommands.HostSetupNetworksVdsCommandParameters in project ovirt-engine by oVirt.
the class HostSetupNetworksVDSCommandTest method setUp.
@Before
public void setUp() {
hostSetupNetworksVdsCommandParameters = new HostSetupNetworksVdsCommandParameters();
underTest = new TestableHostSetupNetworksVDSCommand(hostSetupNetworksVdsCommandParameters);
}
Aggregations