Examples of HostNasVolumeSpec


Examples of com.vmware.vim25.HostNasVolumeSpec

  }

  public ManagedObjectReference createNfsDatastore(String host, int port,
    String exportPath, String uuid) throws Exception {

    HostNasVolumeSpec spec = new HostNasVolumeSpec();
    spec.setRemoteHost(host);
    spec.setRemotePath(exportPath);
    spec.setType("nfs");
    spec.setLocalPath(uuid);

    // readOnly/readWrite
    spec.setAccessMode("readWrite");
    return _context.getService().createNasDatastore(_mor, spec);
  }
View Full Code Here

Examples of com.vmware.vim25.HostNasVolumeSpec

        return false;
    }

    public ManagedObjectReference createNfsDatastore(String host, int port, String exportPath, String uuid) throws Exception {

        HostNasVolumeSpec spec = new HostNasVolumeSpec();
        spec.setRemoteHost(host);
        spec.setRemotePath(exportPath);
        spec.setType("nfs");
        spec.setLocalPath(uuid);

        // readOnly/readWrite
        spec.setAccessMode("readWrite");
        return _context.getService().createNasDatastore(_mor, spec);
    }
View Full Code Here

Examples of com.vmware.vim25.HostNasVolumeSpec

  }
 
  public ManagedObjectReference createNfsDatastore(String host, int port,
    String exportPath, String uuid) throws Exception {
   
    HostNasVolumeSpec spec = new HostNasVolumeSpec();
    spec.setRemoteHost(host);
    spec.setRemotePath(exportPath);
    spec.setType("nfs");
    spec.setLocalPath(uuid);
   
    // readOnly/readWrite
    spec.setAccessMode("readWrite");
    return _context.getService().createNasDatastore(_mor, spec);
  }
View Full Code Here

Examples of com.vmware.vim25.HostNasVolumeSpec

      return;
    }
   
    HostDatastoreSystem hds = host.getHostDatastoreSystem();
   
    HostNasVolumeSpec hnvs = new HostNasVolumeSpec();
    hnvs.setRemoteHost("10.20.140.25");
    hnvs.setRemotePath("/home/vm_share");
    hnvs.setLocalPath("VM_Share");
    hnvs.setAccessMode("readWrite"); // or, "readOnly"
   
    Datastore ds = hds.createNasDatastore(hnvs);
    DatastoreInfo di = ds.getInfo();
   
    System.out.println("Name:" + di.getName());
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.