ServerMania logo

Assign Recipe to Control Panel

To assign a recipe to a Control Panel, use the following request:

POST /settings/control_panel/recipe_joins.xml
POST /settings/control_panel/recipe_joins.json

XML Request Example

curl -i -X POST -H "Accept: application/xml" -H "Content-type:application/xml" -d '<recipe_join><recipe_id>6</recipe_id><event_type>vm_provisioning</event_type></recipe_join>' -u user:userpass http://test/settings/control_panel/recipe_joins.xml

JSON Request Example

curl -i -X POST -H "Accept: application/json" -H "Content-type:application/json" -d '{"recipe_join":{"recipe_id":"6", "event_type":"vm_provisioning"}}' -u user:userpass http://test/settings/control_panel/recipe_joins.json

Where:

recipe_id - ID of a recipe you want to assign

event_type - type of the event you want to assign the recipe to:

  • kvm_hv_goes_online - run the recipe when the KVM compute resource comes online

  • kvm_hv_goes_offline - run the recipe when the KVM compute resource goes offline

  • xen_hv_goes_online - run the recipe when the Xen compute resource comes online

  • xen_hv_goes_offline - run the recipe when the Xen compute resource goes offline

  • vmware_hv_goes_online - run the recipe when the VMware compute resource comes online

  • vmware_hv_goes_offline - run the recipe when the VMware compute resource goes offline

    NOTE: The recipe will be triggered when the statistics is not received from a compute resource for a certain period of time for some reason. If the compute resource is offline, the recipe will not run.

  • hv_added - run the recipe when the new compute resource is added
  • hv_removed - run the recipe when compute resource is removed
  • (lightbulb)ip_allocated_to_vm_nic - run the recipe when adding an IP address to the VS network interface
  • (lightbulb)ip_revoked_from_vm_nic - run the recipe when removing an IP address from the VS network interface

  • vm_provisioning - run the recipe during VS provisioning
  • vm_network_rebuild - run the recipe when rebuilding a network
  • vm_disk_add - run the recipe when adding a disk
  • vm_nic_add - run the recipe when adding a network interface
  • (lightbulb) vm_nic_remove - run the recipe while deleting a network interface 
  • vm_disk_resize - run the recipe when resizing a VS disk
  • vm_resize - run the recipe when resizing a VS
  • (lightbulb) vm_ip_address_add - run the recipe when adding an IP address to a VS
  • (lightbulb) vm_ip_address_remove - run the recipe when removing an IP address from a VS
  • (lightbulb) vm_start - run the recipe while starting the virtual server
  • (lightbulb) vm_reboot - run the recipe while rebooting the virtual server
  • (lightbulb) vm_hot_migrate - run the recipe during the hot migration of the virtual server
  • (lightbulb) vm_hot_full_migrate - run the recipe during the hot migration of the virtual server with disk
  • (lightbulb) vm_failover - run the recipe during the failover process


Page History 

v. 6.1 

  • added the following parameters: 
    • ip_allocated_to_vm_nic
    • ip_revoked_from_vm_nic
    • vm_nic_remove
    • vm_ip_address_add
    • vm_ip_address_remove
    • vm_start 
    • vm_reboot 
    • vm_hot_migrate
    • vm_hot_full_migrate 
    • vm_failover