Example usage for com.amazonaws.services.ecs.model HostVolumeProperties HostVolumeProperties

List of usage examples for com.amazonaws.services.ecs.model HostVolumeProperties HostVolumeProperties

Introduction

In this page you can find the example usage for com.amazonaws.services.ecs.model HostVolumeProperties HostVolumeProperties.

Prototype

HostVolumeProperties

Source Link

Usage

From source file:com.cloudbees.jenkins.plugins.amazonecs.ECSTaskTemplate.java

License:Open Source License

private Collection<Volume> getVolumeEntries() {
    if (null == mountPoints || mountPoints.isEmpty())
        return null;
    Collection<Volume> vols = new ArrayList<Volume>();
    for (MountPointEntry mount : mountPoints) {
        String name = mount.name;
        String sourcePath = mount.sourcePath;
        HostVolumeProperties hostVolume = new HostVolumeProperties();
        if (StringUtils.isEmpty(name))
            continue;
        if (!StringUtils.isEmpty(sourcePath))
            hostVolume.setSourcePath(sourcePath);
        vols.add(new Volume().withName(name).withHost(hostVolume));
    }/*from w ww .  j a va  2 s . co m*/
    return vols;
}