Search in sources :

Example 1 with HostNasVolumeSpec

use of com.vmware.vim25.HostNasVolumeSpec in project CloudStack-archive by CloudStack-extras.

the class HostDatastoreSystemMO method createNfsDatastore.

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);
}
Also used : HostNasVolumeSpec(com.vmware.vim25.HostNasVolumeSpec)

Example 2 with HostNasVolumeSpec

use of com.vmware.vim25.HostNasVolumeSpec in project cloudstack by apache.

the class HostDatastoreSystemMO method createNfsDatastore.

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);
}
Also used : HostNasVolumeSpec(com.vmware.vim25.HostNasVolumeSpec)

Aggregations

HostNasVolumeSpec (com.vmware.vim25.HostNasVolumeSpec)2