File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed
core/src/main/java/org/openstack4j Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,20 @@ public interface BlockDeviceMappingBuilder extends Buildable.Builder<BlockDevice
6767
6868 /**
6969 * Set to create a volume from a volume id
70+ *
7071 * @param volumeId
7172 * @return BlockDeviceMappingBuilder
7273 */
7374 BlockDeviceMappingBuilder volumeId (String volumeId );
75+
76+ /**
77+ * Used to set the volume size of the destination volume (typically needed when source type is image)
78+ *
79+ * @param size the size of the volume
80+ * @return BlockDeviceMappingBuilder
81+ */
82+ BlockDeviceMappingBuilder volumeSize (Integer size );
83+
84+
7485
7586}
Original file line number Diff line number Diff line change 991010 */
1111public class NovaBlockDeviceMappingCreate implements BlockDeviceMappingCreate {
12- // {
13- // "device_name": "/dev/sda1",
14- // "source_type": "volume",
15- // "destination_type": "volume",
16- // "uuid": "fake-volume-id-1",
17- // "boot_index": "0"
18- // }
1912
2013 public String device_name ;
2114 public String source_type = "volume" ;
2215 public String destination_type = "volume" ;
2316 public String uuid ;
2417 public String boot_index ;
18+ public Integer volume_size ;
2519 public boolean delete_on_termination = false ;
2620
2721 @ JsonProperty ("snapshot_id" )
@@ -95,15 +89,18 @@ public BlockDeviceMappingBuilder volumeId(String volumeId) {
9589 create .volumeId = volumeId ;
9690 return this ;
9791 }
92+
93+ @ Override
94+ public BlockDeviceMappingBuilder volumeSize (Integer volumeSize ) {
95+ create .volume_size = volumeSize ;
96+ return this ;
97+ }
9898
9999 @ Override
100100 public BlockDeviceMappingCreate build () {
101101 return create ;
102102 }
103103
104-
105-
106-
107104 @ Override
108105 public BlockDeviceMappingBuilder from (BlockDeviceMappingCreate in ) {
109106 return new NovaBlockDeviceMappingBuilder ((NovaBlockDeviceMappingCreate ) in );
You can’t perform that action at this time.
0 commit comments