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

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

Introduction

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

Prototype

Volume

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   www  .j av a 2  s  .  c  o m*/
    return vols;
}