public static HostInventory valueOf(HostVO vo) { return new HostInventory(vo); }
public static APIReconnectHostEvent __example__() { APIReconnectHostEvent event = new APIReconnectHostEvent(); HostInventory hi = new HostInventory(); hi.setName("example"); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setAvailableCpuCapacity(100000L); hi.setAvailableMemoryCapacity(100000L); return event; }
public static APIGetVmMigrationCandidateHostsReply __example__() { APIGetVmMigrationCandidateHostsReply reply = new APIGetVmMigrationCandidateHostsReply(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); hi.setCreateDate(new Timestamp(org.zstack.header.message.DocUtils.date)); hi.setLastOpDate(new Timestamp(org.zstack.header.message.DocUtils.date)); reply.setInventories(asList(hi)); return reply; }
public static APIQueryHostReply __example__() { APIQueryHostReply reply = new APIQueryHostReply(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); reply.setInventories(Arrays.asList(hi)); return reply; }
HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L);
String clusterUuid = uuid(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L);
public static APIUpdateHostEvent __example__() { APIUpdateHostEvent event = new APIUpdateHostEvent(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); event.setInventory(hi); return event; }
public static APIChangeHostStateEvent __example__() { APIChangeHostStateEvent event = new APIChangeHostStateEvent(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); event.setInventory(hi); return event; }
public static APIAddHostEvent __example__() { APIAddHostEvent event = new APIAddHostEvent(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); event.setInventory(hi); return event; }