Java 类com.vmware.vim25.HostNasVolumeSpec 实例源码

项目:cloudstack    文件:HostDatastoreSystemMO.java   
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);
    }