From 8ef497e4be62dde1f7714ce60ebd32254f5a1bba Mon Sep 17 00:00:00 2001 From: Jeremy Unruh Date: Fri, 17 Apr 2015 15:29:37 -0700 Subject: [PATCH] Issue #326 --- .../model/storage/block/builder/VolumeBuilder.java | 9 +++++++++ .../openstack/storage/block/domain/CinderVolume.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/core/src/main/java/org/openstack4j/model/storage/block/builder/VolumeBuilder.java b/core/src/main/java/org/openstack4j/model/storage/block/builder/VolumeBuilder.java index 09b798a83..cc2431c9a 100644 --- a/core/src/main/java/org/openstack4j/model/storage/block/builder/VolumeBuilder.java +++ b/core/src/main/java/org/openstack4j/model/storage/block/builder/VolumeBuilder.java @@ -83,4 +83,13 @@ public interface VolumeBuilder extends Builder { * @return VolumeBuilder */ VolumeBuilder metadata(Map metadata); + + /** + * The associated availability zone. Optional + * + * @param zone The associated availability zone. + * @return VolumeBuilder + */ + VolumeBuilder zone(String zone); + } diff --git a/core/src/main/java/org/openstack4j/openstack/storage/block/domain/CinderVolume.java b/core/src/main/java/org/openstack4j/openstack/storage/block/domain/CinderVolume.java index 40965bea2..36c00c373 100644 --- a/core/src/main/java/org/openstack4j/openstack/storage/block/domain/CinderVolume.java +++ b/core/src/main/java/org/openstack4j/openstack/storage/block/domain/CinderVolume.java @@ -298,5 +298,11 @@ public VolumeBuilder from(Volume in) { m = (CinderVolume) in; return this; } + + @Override + public VolumeBuilder zone(String zone) { + m.zone = zone; + return this; + } } }