API Hooks Examples
before_config_change (object, config)
Parameters:
- object - Object name to hook into
- config - The configuration entity being changed
Description: An API hook that runs before an object's configuration is changed.
Examples of Object/configuration:
'appliance' : 'domainname', 'hostname', 'kbd_layout', 'timezone'
'autosvc' : 'create','destroy'
'iscsi' : 'setup_discovery_
'mailer' : 'smtp_server', 'smtp_password', 'smtp_user','smtp_timeout', 'smtp_addresses', 'smtp_auth', 'smtp_from'
Returns: No return defined
after_config_change (object, config)
Parameters:
- object - Object name to hook into
- config - The configuration entity being changed
Description: An API hook that runs after an object's configuration changes.
Examples of Object/configuration:
'appliance' : 'domainname', 'hostname', 'kbd_layout', 'timezone'
'autosvc' : 'create','destroy'
'iscsi' : 'setup_discovery_
'mailer' : 'smtp_server', 'smtp_password', 'smtp_user','smtp_timeout', 'smtp_addresses', 'smtp_auth', 'smtp_from'
Returns: No return defined
save_volume_config (file, volname)
Parameters:
- file - Configuration file
- volname - Volume name whose configuration is being saved
Description: An API hook called when volume configuration is written
Returns: No return defined
restore_volume_config (type, file, volname, guid, ask_notify)
Parameters:
- type - Type of Volume
- file - Configuration file
- volname - Name of Volume
- guid - Guid of Volume
- ask_notify - Notification message
Description: An API hook called when a volume configuration is restored
Returns: No return defined