本文整理汇总了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);
}