本文整理匯總了Java中org.oscm.app.iaas.data.VServerStatus類的典型用法代碼示例。如果您正苦於以下問題:Java VServerStatus類的具體用法?Java VServerStatus怎麽用?Java VServerStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
VServerStatus類屬於org.oscm.app.iaas.data包,在下文中一共展示了VServerStatus類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: manageModificationProcess_VSERVER_STOPPING_FOR_MODIFICATION_VServerIsRunning
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationProcess_VSERVER_STOPPING_FOR_MODIFICATION_VServerIsRunning()
throws Exception {
// given
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
FlowState newState = vServerProcessor.manageModificationProcess(null,
null, paramHandler,
FlowState.VSERVER_STOPPING_FOR_MODIFICATION, null);
// then the state is not modified.
assertNull(newState);
}
示例2: manageModificationProcess_VSERVER_STOPPING_FOR_MODIFICATION
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationProcess_VSERVER_STOPPING_FOR_MODIFICATION()
throws Exception {
// given
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(VServerStatus.STOPPED).when(vServerProcessor.vserverComm)
.getNonErrorVServerStatus(any(PropertyHandler.class));
doReturn(FlowState.VSERVER_UPDATING).when(vServerProcessor.vserverComm)
.modifyVServerAttributes(any(PropertyHandler.class));
// when
FlowState newState = vServerProcessor.manageModificationProcess(null,
null, paramHandler,
FlowState.VSERVER_STOPPING_FOR_MODIFICATION, null);
// then
assertEquals(FlowState.VSERVER_UPDATING, newState);
}
示例3: manageModificationVDiskCreation_VSERVER_MODIFICATION_REQUESTED_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_MODIFICATION_REQUESTED_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_MODIFICATION_REQUESTED;
FlowState newState = null;
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertNull(newState);
verify(vServerProcessor.vserverComm, times(1)).stopVServer(
eq(paramHandler));
}
示例4: manageModificationVDiskCreation_VSERVER_MODIFICATION_REQUESTED_Stopped
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_MODIFICATION_REQUESTED_Stopped()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_MODIFICATION_REQUESTED;
FlowState newState = null;
doReturn(VServerStatus.STOPPED).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertEquals(FlowState.VSERVER_STOPPED_FOR_MODIFICATION, newState);
}
示例5: manageModificationVDiskCreation_VSERVER_UPDATING_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_UPDATING_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_UPDATING;
FlowState newState = null;
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertNull(newState);
}
示例6: manageModificationVDiskCreation_VSERVER_UPDATING_Stopped
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_UPDATING_Stopped()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_UPDATING;
FlowState newState = null;
doReturn(VServerStatus.STOPPED).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertEquals(FlowState.VSERVER_UPDATED, newState);
}
示例7: manageModificationVDiskCreation_VSERVER_UPDATED_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_UPDATED_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_UPDATED;
FlowState newState = null;
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertNull(newState);
}
示例8: manageModificationVDiskCreation_VSERVER_STARTING_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_STARTING_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_STARTING;
FlowState newState = null;
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertEquals(FlowState.VSERVER_STARTED, newState);
}
示例9: manageModificationVDiskCreation_VSERVER_STARTING_Stopped
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_STARTING_Stopped()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_STARTING;
FlowState newState = null;
doReturn(VServerStatus.STOPPED).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertNull(newState);
}
示例10: manageModificationVDiskCreation_VSERVER_STARTED_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskCreation_VSERVER_STARTED_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_STARTED;
FlowState newState = null;
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor
.manageModificationVDiskCreation("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertEquals(FlowState.VSERVER_RETRIEVEGUEST, newState);
}
示例11: manageModificationProcess_VSERVERS_STARTING_NextStatusNotNormal
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationProcess_VSERVERS_STARTING_NextStatusNotNormal()
throws Exception {
// given
doReturn(Boolean.TRUE).when(vSystemProcessor.vsysComm)
.getCombinedVServerState(paramHandler, VServerStatus.RUNNING);
doReturn(Boolean.FALSE).when(vSystemProcessor).checkNextStatus(
CONTROLLER_ID, INSTANCE_ID,
FlowState.VSYSTEM_SCALING_COMPLETED, paramHandler);
// when
FlowState newState = vSystemProcessor.manageModificationProcess(
CONTROLLER_ID, INSTANCE_ID, paramHandler,
FlowState.VSERVERS_STARTING);
// then
assertNull(newState);
}
示例12: manageDeletionProcess_VSERVER_DELETION_REQUESTED_Stopped
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageDeletionProcess_VSERVER_DELETION_REQUESTED_Stopped()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_DELETION_REQUESTED;
FlowState newState = null;
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(VServerStatus.STOPPED).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor.manageDeletionProcess("controllerId",
"instanceId", paramHandler, flowState, newState);
// then
assertEquals(FlowState.VSERVER_STOPPED_FOR_DELETION, newState);
}
示例13: manageDeletionProcess_VSERVER_STOPPED_FOR_DELETION_NoAttachedVDisks_NotStopped
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageDeletionProcess_VSERVER_STOPPED_FOR_DELETION_NoAttachedVDisks_NotStopped()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_STOPPED_FOR_DELETION;
FlowState newState = null;
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(Boolean.FALSE).when(vServerProcessor.vdiskInfo)
.isAttachedVDisksFound(paramHandler);
doReturn(VServerStatus.FAILOVER).when(vServerProcessor.vserverComm)
.getVServerStatus(any(PropertyHandler.class));
// when
newState = vServerProcessor.manageDeletionProcess("controllerId",
"instanceId", paramHandler, flowState, newState);
// then
assertNull(newState);
}
示例14: manageModificationVDiskDeletion_VSERVER_MODIFICATION_REQUESTED
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskDeletion_VSERVER_MODIFICATION_REQUESTED()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_MODIFICATION_REQUESTED;
FlowState newState = null;
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(VServerStatus.STOPPING).when(vServerProcessor.vserverComm)
.getVServerStatus(paramHandler);
// when
newState = vServerProcessor
.manageModificationVDiskDeletion("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
assertNull(newState);
}
示例15: manageModificationVDiskDeletion_VSERVER_MODIFICATION_REQUESTED_Running
import org.oscm.app.iaas.data.VServerStatus; //導入依賴的package包/類
@Test
public void manageModificationVDiskDeletion_VSERVER_MODIFICATION_REQUESTED_Running()
throws Exception {
// given
FlowState flowState = FlowState.VSERVER_MODIFICATION_REQUESTED;
FlowState newState = null;
paramHandler.getIaasContext().setVSystemStatus("NORMAL");
doReturn(VServerStatus.RUNNING).when(vServerProcessor.vserverComm)
.getVServerStatus(paramHandler);
// when
newState = vServerProcessor
.manageModificationVDiskDeletion("controllerId", "instanceId",
paramHandler, flowState, newState);
// then
verify(vServerProcessor.vserverComm, times(1))
.stopVServer(paramHandler);
assertNull(newState);
}