Package com.vmware.vim.binding.vim.vm

Examples of com.vmware.vim.binding.vim.vm.FileLayoutEx


    *
    * Note: This is done at configuration time,
    *       so it won't get updated if file size ever changes.
    */
   private void updateSize() {
      FileLayoutEx fileLayout = vm.getFileLayout();

      // create file map to avoid unnecessary loops
      Map<Integer, FileInfo> fileMap = new HashMap<Integer, FileInfo>();
      if (fileLayout.getFile() != null) {
         for (FileInfo fileInfo : fileLayout.getFile()) {
            fileMap.put(fileInfo.getKey(), fileInfo);
         }
      }

      sizeDetail = new HashMap<DeviceId, DiskSize>();
      size = new DiskSize(0);

      if (fileLayout.getSnapshot() == null) {
         logger.info("missing snapshot layout in " + vm);
         return;
      }
      // search for the snapshot's files
      for (SnapshotLayout snapshotLayout : fileLayout.getSnapshot()) {
         if (getMoRef().equals(snapshotLayout.getKey())) {
            // loop through each disk and count the last diskunit in the chain only
            // because the previous ones are shared with the other snapshots so don't double counting
            VirtualDevice[] devices = getConfig().getHardware().getDevice();
            for(DiskLayout disk : snapshotLayout.getDisk()) {
View Full Code Here

TOP

Related Classes of com.vmware.vim.binding.vim.vm.FileLayoutEx

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.