Revision a54ed786

View differences:

src/vmm_mad/remotes/vcenter/shutdown
52 52
# Get disk elements from drv_action
53 53
disks = drv_action.retrieve_xmlelements("VM/TEMPLATE/DISK")
54 54

  
55
## TODO keep_disks and copy_template
56
keep_disks =
57
    !drv_action['/VMM_DRIVER_ACTION_DATA/VM/USER_TEMPLATE/KEEP_DISKS_ON_DONE'].nil? &&
58
    drv_action['/VMM_DRIVER_ACTION_DATA/VM/USER_TEMPLATE/KEEP_DISKS_ON_DONE'].downcase=="yes"
55
## TODO copy_template
59 56

  
60 57
# Manage instantiate to persistent
61 58
instantiate_to_persistent =
......
73 70
    # If Terminate action has been called
74 71
    if lcm_state_str == "SHUTDOWN"
75 72

  
76
        # TODO: KEEP_DISKS_ON_DONE deprecation / invisible disks
77
        if keep_disks
78
            # Detach all disks from VM so they are not deleted if VM is destroyed
79
            vm.detach_all_disks
80
        end
81

  
82 73
        # If the VM was instantiated to persistent keep the VM
83 74
        if instantiate_to_persistent
84 75
            vm.mark_as_template #Convert VM to template in vCenter

Also available in: Unified diff