lsInv.setStatus(PrimaryStorageStatus.Connected.toString()); lsInv.setType("LocalStorage"); lsInv.setCreateDate(new Timestamp(org.zstack.header.message.DocUtils.date)); lsInv.setLastOpDate(new Timestamp(org.zstack.header.message.DocUtils.date)); lsInv.setUrl("/zstack_ps"); nfsInv.setStatus(PrimaryStorageStatus.Connected.toString()); nfsInv.setType("NFS"); nfsInv.setCreateDate(new Timestamp(org.zstack.header.message.DocUtils.date)); nfsInv.setLastOpDate(new Timestamp(org.zstack.header.message.DocUtils.date)); nfsInv.setUrl("/opt/zstack/nfsprimarystorage/prim-" + uuid);
protected PrimaryStorageInventory(PrimaryStorageVO vo) { setZoneUuid(vo.getZoneUuid()); setCreateDate(vo.getCreateDate()); setDescription(vo.getDescription()); setLastOpDate(vo.getLastOpDate()); setName(vo.getName()); setState(vo.getState().toString()); setType(vo.getType()); setUrl(vo.getUrl()); setUuid(vo.getUuid()); setMountPath(vo.getMountPath()); setStatus(vo.getStatus().toString()); attachedClusterUuids = new ArrayList<String>(vo.getAttachedClusterRefs().size()); for (PrimaryStorageClusterRefVO ref : vo.getAttachedClusterRefs()) { attachedClusterUuids.add(ref.getClusterUuid()); } if (vo.getCapacity() != null) { setTotalCapacity(vo.getCapacity().getTotalCapacity()); setAvailableCapacity(vo.getCapacity().getAvailableCapacity()); setTotalPhysicalCapacity(vo.getCapacity().getTotalPhysicalCapacity()); setAvailablePhysicalCapacity(vo.getCapacity().getAvailablePhysicalCapacity()); setSystemUsedCapacity(vo.getCapacity().getSystemUsedCapacity()); } }