Package com.vmware.aurora.vc.VcTaskMgr

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


    * @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

    */
   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

    */
   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

    * @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

   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

    * @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

         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

      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

Related Classes of com.vmware.aurora.vc.VcTaskMgr.IVcTaskBody

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.