We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ed502b commit 3ab7712Copy full SHA for 3ab7712
lib/fog/vsphere/requests/compute/create_vm.rb
@@ -125,8 +125,11 @@ def get_storage_pod_from_volumes(attributes)
125
def vm_path_name(attributes)
126
return '' if get_storage_pod_from_volumes(attributes)
127
datastore = attributes[:volumes].first.datastore unless attributes[:volumes].empty?
128
- datastore ||= 'datastore1'
129
- "[#{datastore}]"
+ if datastore
+ "[#{datastore}]"
130
+ else
131
+ raise ArgumentError, 'Please mention the storage pod or the datastore'
132
+ end
133
end
134
135
def device_change(attributes)
0 commit comments