Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd {
description = "the ID of the disk offering. Either diskOfferingId or snapshotId must be passed in.")
private Long diskOfferingId;

@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the disk volume")
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the disk volume")
private String volumeName;

@Parameter(name = ApiConstants.SIZE, type = CommandType.LONG, description = "Arbitrary volume size")
Expand Down
2 changes: 1 addition & 1 deletion server/src/com/cloud/storage/VolumeApiServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public VolumeVO allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationExcept
}

String userSpecifiedName = cmd.getVolumeName();
if (userSpecifiedName == null) {
if (userSpecifiedName == null || userSpecifiedName.isEmpty()) {
userSpecifiedName = getRandomVolumeName();
}

Expand Down
2 changes: 1 addition & 1 deletion ui/scripts/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ cloudStack.docs = {
},
// Add volume
helpVolumeName: {
desc: 'Give the volume a unique name so you can find it later.',
desc: 'Give the volume a unique name. If not, it will be generated randomly.',
externalLink: ''
},
helpVolumeAvailabilityZone: {
Expand Down
5 changes: 1 addition & 4 deletions ui/scripts/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@
fields: {
name: {
docID: 'helpVolumeName',
label: 'label.name',
validation: {
required: true
}
label: 'label.name'
},
availabilityZone: {
label: 'label.availability.zone',
Expand Down