Package com.cloud.simulator

Examples of com.cloud.simulator.MockVMVO


            if (cmd.getVmName() != null) {
                MockVm vm = _mockVMDao.findByVmName(cmd.getVmName());
                vm.setState(State.Expunging);
                if (vm != null) {
                    MockVMVO vmVo = _mockVMDao.createForUpdate(vm.getId());
                    _mockVMDao.update(vm.getId(), vmVo);
                }
            }
            txn.commit();
        } catch (Exception ex) {
View Full Code Here


        Map<String, State> changes = _simMgr.getVmStates(this.hostGuid);
        Map<String, MockVMVO> vmsMaps = _simMgr.getVms(this.hostGuid);
        totalCpu = agentHost.getCpuCount() * agentHost.getCpuSpeed();
        totalMem = agentHost.getMemorySize();
        for (Map.Entry<String, MockVMVO> entry : vmsMaps.entrySet()) {
    MockVMVO vm = entry.getValue();
    usedCpu += vm.getCpu();
    usedMem += vm.getMemory();
    _runningVms.put(entry.getKey(), new Pair<Long, Long>(Long.valueOf(vm.getCpu()), vm.getMemory()));
        }

        List<Object> info = getHostInfo();

        StartupRoutingCommand cmd = new StartupRoutingCommand((Integer) info.get(0), (Long) info.get(1), (Long) info.get(2), (Long) info.get(4), (String) info.get(3), HypervisorType.Simulator,
View Full Code Here

        Map<String, State> changes = _simMgr.getVmStates(this.hostGuid);
        Map<String, MockVMVO> vmsMaps = _simMgr.getVms(this.hostGuid);
        totalCpu = agentHost.getCpuCount() * agentHost.getCpuSpeed();
        totalMem = agentHost.getMemorySize();
        for (Map.Entry<String, MockVMVO> entry : vmsMaps.entrySet()) {
    MockVMVO vm = entry.getValue();
    usedCpu += vm.getCpu();
    usedMem += vm.getMemory();
    _runningVms.put(entry.getKey(), new Pair<Long, Long>(Long.valueOf(vm.getCpu()), vm.getMemory()));
        }

        List<Object> info = getHostInfo();

        StartupRoutingCommand cmd = new StartupRoutingCommand((Integer) info.get(0), (Long) info.get(1), (Long) info.get(2), (Long) info.get(4), (String) info.get(3), HypervisorType.Simulator,
View Full Code Here

TOP

Related Classes of com.cloud.simulator.MockVMVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.