@Before
  public void setUp() throws Exception {
    DBUtil.reDeployDB();
    WebBeanConstructor con = new WebBeanConstructor();
    deployer = new Deployer("deployerXml/mevoco/TestMevocoMultipleNetwork.xml", con);
    deployer.addSpringConfig("mevocoRelated.xml");
    deployer.load();

    loader = deployer.getComponentLoader();
    bus = loader.getComponent(CloudBus.class);
    dbf = loader.getComponent(DatabaseFacade.class);
    config = loader.getComponent(LocalStorageSimulatorConfig.class);
    fconfig = loader.getComponent(FlatNetworkServiceSimulatorConfig.class);
    kconfig = loader.getComponent(KVMSimulatorConfig.class);
    psRatioMgr = loader.getComponent(PrimaryStorageOverProvisioningManager.class);
    hostRatioMgr = loader.getComponent(HostCapacityOverProvisioningManager.class);

    Capacity c = new Capacity();
    c.total = totalSize;
    c.avail = totalSize;

    config.capacityMap.put("host1", c);

    deployer.build();
    api = deployer.getApi();
    session = api.loginAsAdmin();
  }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   deployer = new Deployer("deployerXml/vm/TestCreateVm.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
 }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/kvm/TestStartVmOnTargetHost.xml", con);
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   config = loader.getComponent(SftpBackupStorageSimulatorConfig.class);
   session = api.loginAsAdmin();
 }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/kvm/TestTakeSnapshotOnKvm43.xml", con);
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   snapshotKvmSimulator = loader.getComponent(VolumeSnapshotKvmSimulator.class);
   session = api.loginAsAdmin();
 }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/kvm/TestCreateVmOnKvm.xml", con);
   deployer.addSpringConfig("KVMRelated.xml");
   ThreadGlobalProperty.MAX_THREAD_NUM = 500;
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   config = loader.getComponent(KVMSimulatorConfig.class);
   session = api.loginAsAdmin();
 }
 @BeforeClass
 public static void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/kvm/TestKvmAttachL2Network.xml", con);
   deployer.addSpringConfig("Kvm.xml");
   deployer.addSpringConfig("KVMSimulator.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   kvmFactory = loader.getComponent(KVMHostFactory.class);
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   config = loader.getComponent(KVMSimulatorConfig.class);
   session = api.loginAsAdmin();
 }
  @Before
  public void setUp() throws Exception {
    DBUtil.reDeployDB();
    WebBeanConstructor con = new WebBeanConstructor();
    deployer = new Deployer("deployerXml/localStorage/TestLocalStorage11.xml", con);
    deployer.addSpringConfig("KVMRelated.xml");
    deployer.addSpringConfig("localStorageSimulator.xml");
    deployer.addSpringConfig("localStorage.xml");
    deployer.load();

    loader = deployer.getComponentLoader();
    bus = loader.getComponent(CloudBus.class);
    dbf = loader.getComponent(DatabaseFacade.class);
    config = loader.getComponent(LocalStorageSimulatorConfig.class);

    Capacity c = new Capacity();
    c.total = totalSize;
    c.avail = totalSize;

    config.capacityMap.put("host1", c);
    config.capacityMap.put("host2", c);

    deployer.build();
    api = deployer.getApi();
    session = api.loginAsAdmin();
  }
  @Before
  public void setUp() throws Exception {
    DBUtil.reDeployDB();
    WebBeanConstructor con = new WebBeanConstructor();
    deployer =
        new Deployer(
            "deployerXml/mevoco/imageStore/TestQuotaUsageForImageOnImageStoreBackupStorage.xml",
            con);

    deployer.addSpringConfig("imagestore.xml");
    deployer.addSpringConfig("ImageStoreBackupStorageSimulator.xml");

    deployer.build();
    api = deployer.getApi();
    loader = deployer.getComponentLoader();

    bus = loader.getComponent(CloudBus.class);
    dbf = loader.getComponent(DatabaseFacade.class);
    iConfig = loader.getComponent(ImageStoreBackupStorageSimulatorConfig.class);
    gcf = loader.getComponent(GlobalConfigFacade.class);
  }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/eip/TestVirtualRouterEip.xml", con);
   deployer.addSpringConfig("VirtualRouter.xml");
   deployer.addSpringConfig("VirtualRouterSimulator.xml");
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.addSpringConfig("vip.xml");
   deployer.addSpringConfig("eip.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   vconfig = loader.getComponent(VirtualRouterSimulatorConfig.class);
   kconfig = loader.getComponent(KVMSimulatorConfig.class);
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   session = api.loginAsAdmin();
 }
Exemple #10
0
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/ha/TestHaOnKvm9.xml", con);
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.addSpringConfig("ha.xml");
   deployer.addSpringConfig("haSimulator.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   config = loader.getComponent(KVMSimulatorConfig.class);
   hconfig = loader.getComponent(HaKvmSimulatorConfig.class);
   session = api.loginAsAdmin();
 }
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer =
       new Deployer("deployerXml/iscsiBtrfsPrimaryStorage/TestIscsiBtrfsPrimaryStorage.xml", con);
   deployer.addSpringConfig("iscsiBtrfsPrimaryStorage.xml");
   deployer.addSpringConfig("iscsiFileSystemPrimaryStorageSimulator.xml");
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   kconfig = loader.getComponent(KVMSimulatorConfig.class);
   iconfig = loader.getComponent(IscsiBtrfsPrimaryStorageSimulatorConfig.class);
 }
Exemple #12
0
 @Before
 public void setUp() throws Exception {
   DBUtil.reDeployDB();
   WebBeanConstructor con = new WebBeanConstructor();
   deployer = new Deployer("deployerXml/ceph/TestCeph15.xml", con);
   deployer.addSpringConfig("ceph.xml");
   deployer.addSpringConfig("cephSimulator.xml");
   deployer.addSpringConfig("KVMRelated.xml");
   deployer.build();
   api = deployer.getApi();
   loader = deployer.getComponentLoader();
   bus = loader.getComponent(CloudBus.class);
   dbf = loader.getComponent(DatabaseFacade.class);
   config = loader.getComponent(CephPrimaryStorageSimulatorConfig.class);
   kconfig = loader.getComponent(KVMSimulatorConfig.class);
   bconfig = loader.getComponent(CephBackupStorageSimulatorConfig.class);
   restf = loader.getComponent(RESTFacade.class);
   session = api.loginAsAdmin();
 }