當前位置: 首頁>>代碼示例>>Java>>正文


Java VServerStatus類代碼示例

本文整理匯總了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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:17,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:20,代碼來源:VServerProcessorBeanTest.java

示例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));
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:21,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm,代碼行數:19,代碼來源:VSystemProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:17,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:19,代碼來源:VServerProcessorBeanTest.java

示例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);
}
 
開發者ID:servicecatalog,項目名稱:oscm-app,代碼行數:21,代碼來源:VServerProcessorBeanTest.java


注:本文中的org.oscm.app.iaas.data.VServerStatus類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。