Examples of IVcTaskBody


Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

               return true;
            }

            @Override
            protected Void body() throws Exception {
               VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
                  public VcTask body() throws Exception {
                     return new VcTask(TaskType.DeleteFolder, folder.destroy(), null);
                  }
               });
               task.waitForCompletion();
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

    * @see com.vmware.aurora.vc.VcCluster#reconfigure(com.vmware.vim.binding.vim.cluster.ConfigSpec, com.vmware.aurora.vc.IVcTaskCallback)
    */
   @Override
   public VcTask reconfigure(final ConfigSpecEx spec,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         public VcTask body() throws Exception {
            final ClusterComputeResource cluster = getManagedObject();
            return new VcTask(TaskType.ReconfigCluster, cluster.reconfigureEx(
                  spec, true), callback);
         }
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

    */
   protected static VcTask copyVirtualDisk(final String srcDsPath,
         final VcDatacenter srcDc, final String dstDsPath,
         final VcDatacenter dstDc, final VirtualDiskSpec diskSpec,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            final VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.CopyVmdk,
               mgr.copyVirtualDisk(srcDsPath, srcDc.getMoRef(),
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

    */
   protected static VcTask moveVirtualDisk(final String srcDsPath,
         final VcDatacenter srcDc, final String dstDsPath,
         final VcDatacenter dstDc,
         final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            final VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.CopyVmdk,
               mgr.moveVirtualDisk(srcDsPath, srcDc.getMoRef(),
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

    * @throws Exception
    */
   protected static VcTask deleteVirtualDisk(final String dsPath,
         final VcDatacenter dc, final IVcTaskCallback callback)
         throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            VirtualDiskManager mgr = VcContext.getService().getVirtualDiskManager();
            return new VcTask(TaskType.DeleteVmdk, mgr.deleteVirtualDisk(
                  dsPath, dc.getMoRef()), callback);
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

   public static VcTask copyFile(final VcDatastore srcDs, final String srcPath,
         final VcDatastore dstDs, final String dstPath,
         final IVcTaskCallback callback) throws Exception {
      final String srcDsPath = getDsPath(srcDs, srcPath);
      final String dstDsPath = getDsPath(dstDs, dstPath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.CopyFile,
               mgr.copyFile(srcDsPath, srcDs.getDatacenterMoRef(),
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

    * @throws Exception
    */
   public static VcTask deleteFile(final VcDatastore datastore, final String filePath,
         final IVcTaskCallback callback) throws Exception {
      final String dsPath = getDsPath(datastore, filePath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.DeleteFile,
                  mgr.deleteFile(dsPath, datastore.getDatacenterMoRef()), callback);
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

         final VcDatastore dstDs, final String dstPath,
         final IVcTaskCallback callback)
   throws Exception {
      final String srcDsPath = getDsPath(srcDs, srcPath);
      final String dstDsPath = getDsPath(dstDs, dstPath);
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            FileManager mgr = VcContext.getService().getFileManager();
            return new VcTask(TaskType.MoveFile,
                  mgr.moveFile(srcDsPath, srcDs.getDatacenterMoRef(),
View Full Code Here

Examples of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

      String fileDir = filePath.substring(0, index);

      final String dsPath = getDsPath(ds, fileDir);
      final SearchSpec spec = new DatastoreBrowser_Impl.SearchSpecImpl();
      spec.setMatchPattern(new String[]{fname});
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         @Override
         public VcTask body() throws Exception {
            Datastore mo = ds.getManagedObject();
            DatastoreBrowser browser = MoUtil.getManagedObject(mo.getBrowser());
            return new VcTask(TaskType.SearchFile,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.