Skip to content

Commit eb04691

Browse files
committed
Simplify Xapi_vm.create: just refer to helper fn.
Instead of taking dozens of params and passing them on to the helper function, now we just define Xapi_vm.create as Xapi_vm_helpers.create. Signed-off-by: Thomas Sanders <[email protected]>
1 parent f95be34 commit eb04691

File tree

2 files changed

+2
-97
lines changed

2 files changed

+2
-97
lines changed

ocaml/xapi/xapi_vm.ml

Lines changed: 1 addition & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -359,102 +359,7 @@ let resume_on ~__context ~vm ~host ~start_paused ~force =
359359
assert_host_is_localhost ~__context ~host;
360360
resume ~__context ~vm ~start_paused ~force
361361

362-
let create ~__context
363-
~name_label
364-
~name_description
365-
~user_version
366-
~is_a_template
367-
~affinity
368-
~memory_target
369-
~memory_static_max
370-
~memory_dynamic_max
371-
~memory_dynamic_min
372-
~memory_static_min
373-
~vCPUs_params
374-
~vCPUs_max
375-
~vCPUs_at_startup
376-
~actions_after_shutdown
377-
~actions_after_reboot
378-
~actions_after_crash
379-
~pV_bootloader
380-
~pV_kernel
381-
~pV_ramdisk
382-
~pV_args
383-
~pV_bootloader_args
384-
~pV_legacy_args
385-
~hVM_boot_policy
386-
~hVM_boot_params
387-
~hVM_shadow_multiplier
388-
~platform
389-
~pCI_bus
390-
~other_config
391-
~recommendations
392-
~xenstore_data
393-
~ha_always_run
394-
~ha_restart_priority
395-
~tags
396-
~blocked_operations
397-
~protection_policy
398-
~is_snapshot_from_vmpp
399-
~appliance
400-
~start_delay
401-
~shutdown_delay
402-
~order
403-
~suspend_SR
404-
~version
405-
~generation_id
406-
~hardware_platform_version
407-
~auto_update_drivers
408-
~has_vendor_device
409-
: API.ref_VM =
410-
411-
create ~__context
412-
~name_label
413-
~name_description
414-
~user_version
415-
~is_a_template
416-
~affinity
417-
~memory_target
418-
~memory_static_max
419-
~memory_dynamic_max
420-
~memory_dynamic_min
421-
~memory_static_min
422-
~vCPUs_params
423-
~vCPUs_max
424-
~vCPUs_at_startup
425-
~actions_after_shutdown
426-
~actions_after_reboot
427-
~actions_after_crash
428-
~pV_bootloader
429-
~pV_kernel
430-
~pV_ramdisk
431-
~pV_args
432-
~pV_bootloader_args
433-
~pV_legacy_args
434-
~hVM_boot_policy
435-
~hVM_boot_params
436-
~hVM_shadow_multiplier
437-
~platform
438-
~pCI_bus
439-
~other_config
440-
~recommendations
441-
~xenstore_data
442-
~ha_always_run
443-
~ha_restart_priority
444-
~tags
445-
~blocked_operations
446-
~protection_policy
447-
~is_snapshot_from_vmpp
448-
~appliance
449-
~start_delay
450-
~shutdown_delay
451-
~order
452-
~suspend_SR
453-
~version
454-
~generation_id
455-
~hardware_platform_version
456-
~auto_update_drivers
457-
~has_vendor_device
362+
let create = create (* Use the function from Xapi_vm_helpers *)
458363

459364
let destroy ~__context ~self =
460365
let parent = Db.VM.get_parent ~__context ~self in

ocaml/xapi/xapi_vm_helpers.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ let create ~__context ~name_label ~name_description
9191
~pV_kernel ~pV_ramdisk ~pV_args ~pV_bootloader_args ~pV_legacy_args
9292
~hVM_boot_policy ~hVM_boot_params ~hVM_shadow_multiplier
9393
~platform
94-
~pCI_bus ~other_config ~xenstore_data ~recommendations
94+
~pCI_bus ~other_config ~recommendations ~xenstore_data
9595
~ha_always_run ~ha_restart_priority ~tags
9696
~blocked_operations ~protection_policy
9797
~is_snapshot_from_vmpp

0 commit comments

Comments
 (0)